Skip to content

Commit ab2ea0d

Browse files
authored
Bifurcate the expected error message based on runtime mode (#2821)
## Motivation and Context Makes a failing test `multi_region_access_points` pass in the orchestrator ## Description The orchestrator has already an `AwsAuthStage` counterpart implemented (which is where the expected error for `multi_region_access_points` comes from in the middleware mode). This PR just updates the expected error message in the test for the orchestrator to make it pass. ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ Co-authored-by: Yuki Saito <awsaito@amazon.com>
1 parent 47b3d23 commit ab2ea0d

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

aws/sdk/integration-tests/s3/tests/endpoints.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,29 @@ async fn dual_stack() {
6262
);
6363
}
6464

65+
#[cfg(aws_sdk_orchestrator_mode)]
66+
#[tokio::test]
67+
async fn multi_region_access_points() {
68+
let (_captured_request, client) = test_client(|b| b);
69+
let response = client
70+
.get_object()
71+
.bucket("arn:aws:s3::123456789012:accesspoint/mfzwi23gnjvgw.mrap")
72+
.key("blah")
73+
.send()
74+
.await;
75+
let error = response.expect_err("should fail—sigv4a is not supported");
76+
assert!(
77+
dbg!(format!(
78+
"{}",
79+
aws_smithy_types::error::display::DisplayErrorContext(&error)
80+
))
81+
.contains("selected auth scheme / endpoint config mismatch"),
82+
"message should contain the correct error, found: {:?}",
83+
error
84+
);
85+
}
86+
87+
#[cfg(not(aws_sdk_orchestrator_mode))]
6588
#[tokio::test]
6689
async fn multi_region_access_points() {
6790
let (_captured_request, client) = test_client(|b| b);

0 commit comments

Comments
 (0)