mirror of
https://github.com/floci-io/floci.git
synced 2026-11-28 16:11:48 -05:00
test(compat): pick a home region check region other than the run's own in LambdaWebTest (#6990)
This commit is contained in:
1 parent
5ad2f64840
commit
83ed905253
1 file changed
+3
-2
@@ -156,10 +156,11 @@ class LambdaWebTest {
|
||||
.extracting(f -> f.functionName()).contains(FUNCTION_NAME);
|
||||
assertThat(lambdaWeb.getWebAccountSettings(r -> {}).accountQuotas().maxEndpointsPerFunction()).isEqualTo(10);
|
||||
|
||||
String foreignRegion = functionArn.replace(":" + TestFixtures.region().id() + ":", ":eu-west-1:");
|
||||
String otherRegion = "eu-west-1".equals(TestFixtures.region().id()) ? "us-west-2" : "eu-west-1";
|
||||
String foreignRegion = functionArn.replace(":" + TestFixtures.region().id() + ":", ":" + otherRegion + ":");
|
||||
assertThatThrownBy(() -> lambdaWeb.getWebFunction(r -> r.functionName(foreignRegion)))
|
||||
.isInstanceOf(ValidationException.class)
|
||||
.hasMessageContaining("The operation is only allowed in the function's home region eu-west-1.");
|
||||
.hasMessageContaining("The operation is only allowed in the function's home region " + otherRegion + ".");
|
||||
assertThatThrownBy(() -> lambdaWeb.getWebFunction(r -> r.functionName("sdk-test-no-such-web-fn")))
|
||||
.isInstanceOf(ResourceNotFoundException.class)
|
||||
.hasMessageContaining("does not exist.");
|
||||
|
||||
Reference in new issue
Block a user