Skip to content

Commit

Permalink
updated the SDK build number
Browse files Browse the repository at this point in the history
  • Loading branch information
scmacdon committed Jan 7, 2025
1 parent 3dbc416 commit da9a7a6
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 34 deletions.
16 changes: 13 additions & 3 deletions javav2/example_code/glue/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.21.20</version>
<version>2.29.45</version>
<type>pom</type>
</dependency>
</dependencies>
Expand All @@ -59,7 +59,7 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>secretsmanager</artifactId>
<version>2.20.45</version>
<version>2.29.45</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
Expand All @@ -80,7 +80,17 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>glue</artifactId>
<version>2.20.26</version>
<version>2.29.45</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>sso</artifactId>
<version>2.29.45</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>ssooidc</artifactId>
<version>2.29.45</version>
</dependency>
</dependencies>
</project>
10 changes: 9 additions & 1 deletion javav2/example_code/guardduty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.21.20</version>
<version>2.29.45</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -81,5 +81,13 @@
<version>1.9.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>sso</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>ssooidc</artifactId>
</dependency>
</dependencies>
</project>
4 changes: 1 addition & 3 deletions javav2/example_code/iam/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.21.20</version>
<version>2.29.45</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -121,8 +121,6 @@
<groupId>software.amazon.awssdk</groupId>
<artifactId>accessanalyzer</artifactId>
</dependency>


<!-- Needed to adapt Apache Commons Logging used by Apache HTTP Client to Slf4j to avoid
ClassNotFoundException: org.apache.commons.logging.impl.LogFactoryImpl during runtime -->
<dependency>
Expand Down
44 changes: 17 additions & 27 deletions javav2/example_code/iam/src/test/java/IAMServiceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
import software.amazon.awssdk.services.secretsmanager.SecretsManagerClient;
import software.amazon.awssdk.services.secretsmanager.model.GetSecretValueRequest;
import software.amazon.awssdk.services.secretsmanager.model.GetSecretValueResponse;

import java.util.UUID;
import java.util.concurrent.TimeUnit;

/**
Expand Down Expand Up @@ -50,14 +52,14 @@ public static void setUp() {
Gson gson = new Gson();
String json = getSecretValues();
SecretValues values = gson.fromJson(json, SecretValues.class);
userName = values.getUserName();
policyName = values.getPolicyName();
roleName = values.getRoleName();
userName = values.getUserName()+ UUID.randomUUID();
policyName = values.getPolicyName() + UUID.randomUUID();;
roleName = values.getRoleName() + UUID.randomUUID();;
accountAlias = values.getAccountAlias();
usernameSc = values.getUsernameSc();
policyNameSc = values.getPolicyNameSc();
roleNameSc = values.getRoleNameSc();
roleSessionName = values.getRoleName();
roleSessionName = values.getRoleName() + UUID.randomUUID();;
fileLocationSc = values.getFileLocationSc();
bucketNameSc = values.getBucketNameSc();

Expand Down Expand Up @@ -120,89 +122,77 @@ public void CreateAccessKey() {
System.out.println("Test 3 passed");
}

@Test
@Tag("IntegrationTest")
@Order(4)
public void AttachRolePolicy() {
assertDoesNotThrow(() -> AttachRolePolicy.attachIAMRolePolicy(iam, roleName, policyARN));
System.out.println("\n Test 4 passed");
}

@Test
@Tag("IntegrationTest")
@Order(5)
public void DetachRolePolicy() {
assertDoesNotThrow(() -> DetachRolePolicy.detachPolicy(iam, roleName, policyARN));
System.out.println("Test 5 passed");
}



@Test
@Tag("IntegrationTest")
@Order(6)
@Order(4)
public void GetPolicy() {
assertDoesNotThrow(() -> GetPolicy.getIAMPolicy(iam, policyARN));
System.out.println("Test 6 passed");
}

@Test
@Tag("IntegrationTest")
@Order(7)
@Order(5)
public void ListAccessKeys() {
assertDoesNotThrow(() -> ListAccessKeys.listKeys(iam, userName));
System.out.println("Test 7 passed");
}

@Test
@Tag("IntegrationTest")
@Order(8)
@Order(6)
public void ListUsers() {
assertDoesNotThrow(() -> ListUsers.listAllUsers(iam));
System.out.println("Test 8 passed");
}

@Test
@Tag("IntegrationTest")
@Order(9)
@Order(7)
public void CreateAccountAlias() {
assertDoesNotThrow(() -> CreateAccountAlias.createIAMAccountAlias(iam, accountAlias));
System.out.println("Test 9 passed");
}

@Test
@Tag("IntegrationTest")
@Order(10)
@Order(8)
public void DeleteAccountAlias() {
assertDoesNotThrow(() -> DeleteAccountAlias.deleteIAMAccountAlias(iam, accountAlias));
System.out.println("Test 10 passed");
}

@Test
@Tag("IntegrationTest")
@Order(11)
@Order(9)
public void DeletePolicy() {
assertDoesNotThrow(() -> DeletePolicy.deleteIAMPolicy(iam, policyARN));
System.out.println("Test 12 passed");
}

@Test
@Tag("IntegrationTest")
@Order(12)
@Order(10)
public void DeleteAccessKey() {
assertDoesNotThrow(() -> DeleteAccessKey.deleteKey(iam, userName, keyId));
System.out.println("Test 12 passed");
}

@Test
@Tag("IntegrationTest")
@Order(13)
@Order(11)
public void DeleteUser() {
assertDoesNotThrow(() -> DeleteUser.deleteIAMUser(iam, userName));
System.out.println("Test 13 passed");
}

@Test
@Tag("IntegrationTest")
@Order(14)
@Order(12)
public void TestIAMScenario() throws Exception {
String DASHES = new String(new char[80]).replace("\0", "-");
System.out.println(DASHES);
Expand Down

0 comments on commit da9a7a6

Please sign in to comment.