|
@@ -61,6 +61,7 @@ import static org.apache.hadoop.fs.s3a.auth.RoleTestUtils.*;
|
|
|
import static org.apache.hadoop.fs.s3a.auth.RoleModel.*;
|
|
|
import static org.apache.hadoop.fs.s3a.auth.RolePolicies.*;
|
|
|
import static org.apache.hadoop.fs.s3a.auth.RoleTestUtils.forbidden;
|
|
|
+import static org.apache.hadoop.test.GenericTestUtils.assertExceptionContains;
|
|
|
import static org.apache.hadoop.test.LambdaTestUtils.*;
|
|
|
|
|
|
/**
|
|
@@ -148,7 +149,7 @@ public class ITestAssumeRole extends AbstractS3ATestBase {
|
|
|
Configuration conf = new Configuration();
|
|
|
conf.set(ASSUMED_ROLE_ARN, ROLE_ARN_EXAMPLE);
|
|
|
interceptClosing(AWSSecurityTokenServiceException.class,
|
|
|
- E_BAD_ROLE,
|
|
|
+ "",
|
|
|
() -> new AssumedRoleCredentialProvider(uri, conf));
|
|
|
}
|
|
|
|
|
@@ -157,8 +158,7 @@ public class ITestAssumeRole extends AbstractS3ATestBase {
|
|
|
describe("Attemnpt to create the FS with an invalid ARN");
|
|
|
Configuration conf = createAssumedRoleConfig();
|
|
|
conf.set(ASSUMED_ROLE_ARN, ROLE_ARN_EXAMPLE);
|
|
|
- expectFileSystemCreateFailure(conf, AccessDeniedException.class,
|
|
|
- E_BAD_ROLE);
|
|
|
+ expectFileSystemCreateFailure(conf, AccessDeniedException.class, "");
|
|
|
}
|
|
|
|
|
|
@Test
|
|
@@ -284,7 +284,6 @@ public class ITestAssumeRole extends AbstractS3ATestBase {
|
|
|
() -> new AssumedRoleCredentialProvider(uri, conf));
|
|
|
}
|
|
|
|
|
|
-
|
|
|
@Test
|
|
|
public void testAssumeRoleCreateFS() throws IOException {
|
|
|
describe("Create an FS client with the role and do some basic IO");
|