-
Notifications
You must be signed in to change notification settings - Fork 44
Fixes/Optimizations for the Mithril Aggregator #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
3da20b9
to
0a44226
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would expect such changes to be kind of reflected in a test somewhere but perhaps this is taken into account by our existing API spec test? I mean, if I change the API only, without changing the Rust data structure, does this break a test?
@abailly-iohk This is taken in account by our API spec test, adding the $ cargo test
Finished test [unoptimized + debuginfo] target(s) in 0.05s
Running unittests (target/debug/deps/mithril_aggregator-519222e6fa3cf851)
running 8 tests
test http_server::tests::test_snapshots_get_ok ... ok
test http_server::tests::test_register_signatures_post_ok ... ok
test http_server::tests::test_certificate_certificate_hash_get_ok ... ok
test apispec::tests::test_apispec_validate_ok ... FAILED
test http_server::tests::test_register_signer_post_ok ... ok
test http_server::tests::test_snapshot_digest_get_ok ... ok
test http_server::tests::test_certificate_pending_get_ok ... FAILED
test apispec::tests::test_apispec_validate_errors ... ok
failures:
---- apispec::tests::test_apispec_validate_ok stdout ----
thread 'apispec::tests::test_apispec_validate_ok' panicked at 'assertion failed: APISpec::from_file(API_SPEC_FILE).method(&Method::GET.as_str()).path(&\"/certificate-pending\").validate_request(&Null).unwrap().validate_response(&Response::<Bytes>::new(Bytes::from(json!(fake_data\n ::\n certificate_pending()).to_string().into_bytes()))).is_ok()', src/apispec.rs:127:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- http_server::tests::test_certificate_pending_get_ok stdout ----
thread 'http_server::tests::test_certificate_pending_get_ok' panicked at 'OpenAPI error: "\"previous_hash\" is a required property"', src/http_server.rs:202:14
failures:
apispec::tests::test_apispec_validate_ok
http_server::tests::test_certificate_pending_get_ok
test result: FAILED. 6 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.05s
error: test failed, to rerun pass '--bin mithril-aggregator' |
0a44226
to
1674f77
Compare
Great, that's what I expected! |
#109 :
openapi.yaml
tomithril-network/
and update all the dependenciesprevious_hash
field to/certificate_pending
as explained in Add missing field in OpenAPI specification #112