@@ -45,7 +45,6 @@ public static void setUp() {
4545 Region region = Region .AWS_GLOBAL ;
4646 iam = IamClient .builder ()
4747 .region (region )
48- .credentialsProvider (EnvironmentVariableCredentialsProvider .create ())
4948 .build ();
5049
5150 // Get the values to run these tests from AWS Secrets Manager.
@@ -62,37 +61,6 @@ public static void setUp() {
6261 roleSessionName = values .getRoleName () + UUID .randomUUID ();;
6362 fileLocationSc = values .getFileLocationSc ();
6463 bucketNameSc = values .getBucketNameSc ();
65-
66- // Uncomment this code block if you prefer using a config.properties file to
67- // retrieve AWS values required for these tests.
68- /*
69- *
70- * try (InputStream input =
71- * IAMServiceTest.class.getClassLoader().getResourceAsStream("config.properties"
72- * )) {
73- * Properties prop = new Properties();
74- * prop.load(input);
75- * userName = prop.getProperty("userName");
76- * policyName= prop.getProperty("policyName");
77- * policyARN= prop.getProperty("policyARN");
78- * roleName=prop.getProperty("roleName");
79- * accountAlias=prop.getProperty("accountAlias");
80- * usernameSc=prop.getProperty("usernameSc");
81- * policyNameSc=prop.getProperty("policyNameSc");
82- * roleNameSc=prop.getProperty("roleNameSc");
83- * roleSessionName=prop.getProperty("roleSessionName");
84- * fileLocationSc=prop.getProperty("fileLocationSc");
85- * bucketNameSc=prop.getProperty("bucketNameSc");
86- *
87- * if (input == null) {
88- * System.out.println("Sorry, unable to find config.properties");
89- * return;
90- * }
91- *
92- * } catch (IOException ex) {
93- * ex.printStackTrace();
94- * }
95- */
9664 }
9765
9866 @ Test
@@ -122,10 +90,6 @@ public void CreateAccessKey() {
12290 System .out .println ("Test 3 passed" );
12391 }
12492
125-
126-
127-
128-
12993 @ Test
13094 @ Tag ("IntegrationTest" )
13195 @ Order (4 )
@@ -254,7 +218,6 @@ public void TestIAMScenario() throws Exception {
254218 private static String getSecretValues () {
255219 SecretsManagerClient secretClient = SecretsManagerClient .builder ()
256220 .region (Region .US_EAST_1 )
257- .credentialsProvider (EnvironmentVariableCredentialsProvider .create ())
258221 .build ();
259222 String secretName = "test/iam" ;
260223
0 commit comments