-
Notifications
You must be signed in to change notification settings - Fork 65
apollo_http_server: turn off unsupported tx version test #11625
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
meship-starkware
left a comment
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.
@meship-starkware made 1 comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @einat-starkware and @noaov1).
crates/apollo_http_server/src/http_server_test.rs line 304 at r1 (raw file):
// let starknet_error = serde_json::from_str::<StarknetError>(&serialized_err).unwrap(); // assert_eq!(starknet_error, expected_err); // }
Instate of commenting add #[ignore] + TODO
Suggestion:
// TODO(Einat): turn test back on when port issue is fixed.
#[ignore]
// #[rstest]
// #[case::missing_version(
// 0,
// None,
// StarknetError {
// code: StarknetErrorCode::KnownErrorCode(KnownStarknetErrorCode::MalformedRequest),
// message: "Missing version field".to_string(),
// }
// )]
// #[case::bad_version(
// 1,
// Some("bad version"),
// StarknetError {
// code: StarknetErrorCode::KnownErrorCode(KnownStarknetErrorCode::MalformedRequest),
// message: "Version field is not a valid hex string: badversion".to_string(), //Note:
// whitespaces are removed when parsing malformed tx jsons }
// )]
// #[case::old_version(2, Some("0x1"), StarknetError {
// code: StarknetErrorCode::KnownErrorCode(
// KnownStarknetErrorCode::InvalidTransactionVersion,
// ),
// message: "Transaction version 1 is not supported. Supported versions: [3]."
// .to_string(),
// },
// )]
// #[case::newer_version(3, Some("0x4"), StarknetError {
// code: StarknetErrorCode::KnownErrorCode(
// KnownStarknetErrorCode::InvalidTransactionVersion,
// ),
// message: "Transaction version 4 is not supported. Supported versions: [3]."
// .to_string(),
// }
// )]
// #[tokio::test]
// async fn test_unsupported_tx_version(
// #[case] index: u16,
// #[case] version: Option<&str>,
// #[case] expected_err: StarknetError,
// ) {
// // Set the tx version to the given version.
// let mut tx_json =
// TransactionSerialization(serde_json::to_value(deprecated_gateway_invoke_tx()).unwrap());
// let as_object = tx_json.0.as_object_mut().unwrap();
// if let Some(version) = version {
// as_object.insert("version".to_string(), Value::String(version.to_string())).unwrap();
// } else {
// as_object.remove("version").unwrap();
// }
// let mock_gateway_client = MockGatewayClient::new();
// let mock_config_manager_client = MockConfigManagerClient::new();
// let http_client =
// add_tx_http_client(mock_config_manager_client, mock_gateway_client, 9 + index).await;
// let serialized_err =
// http_client.assert_add_tx_error(tx_json, reqwest::StatusCode::BAD_REQUEST).await;
// let starknet_error = serde_json::from_str::<StarknetError>(&serialized_err).unwrap();
// assert_eq!(starknet_error, expected_err);
// }63e6f18 to
64f2701
Compare
einat-starkware
left a comment
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.
@einat-starkware made 1 comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @meship-starkware and @noaov1).
crates/apollo_http_server/src/http_server_test.rs line 304 at r1 (raw file):
Previously, meship-starkware (Meshi Peled) wrote…
Instate of commenting add #[ignore] + TODO
Done.
meship-starkware
left a comment
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.
@meship-starkware reviewed 1 file and all commit messages, and resolved 1 discussion.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @noaov1).

No description provided.