File tree Expand file tree Collapse file tree 3 files changed +382
-0
lines changed
src/it/java/software.amazon.awssdk.services.s3control Expand file tree Collapse file tree 3 files changed +382
-0
lines changed Original file line number Diff line number Diff line change 88
88
<version >${awsjavasdk.version} </version >
89
89
<scope >test</scope >
90
90
</dependency >
91
+ <dependency >
92
+ <groupId >software.amazon.awssdk</groupId >
93
+ <artifactId >auth-crt</artifactId >
94
+ <version >${awsjavasdk.version} </version >
95
+ <scope >test</scope >
96
+ </dependency >
91
97
</dependencies >
92
98
</project >
Original file line number Diff line number Diff line change 41
41
import software .amazon .awssdk .services .s3 .model .NoSuchBucketException ;
42
42
import software .amazon .awssdk .services .s3 .model .S3Exception ;
43
43
import software .amazon .awssdk .services .s3 .model .S3Object ;
44
+ import software .amazon .awssdk .services .sts .StsClient ;
44
45
import software .amazon .awssdk .testutils .Waiter ;
45
46
import software .amazon .awssdk .testutils .service .AwsTestBase ;
46
47
@@ -58,6 +59,10 @@ public class S3ControlIntegrationTestBase extends AwsTestBase {
58
59
59
60
protected static S3AsyncClient s3Async ;
60
61
62
+ protected static StsClient sts ;
63
+
64
+ protected static String accountId ;
65
+
61
66
/**
62
67
* Loads the AWS account info for the integration tests and creates an S3
63
68
* client for tests to use.
@@ -66,6 +71,11 @@ public class S3ControlIntegrationTestBase extends AwsTestBase {
66
71
public static void setUp () throws Exception {
67
72
s3 = s3ClientBuilder ().build ();
68
73
s3Async = s3AsyncClientBuilder ().build ();
74
+ sts = StsClient .builder ()
75
+ .region (DEFAULT_REGION )
76
+ .credentialsProvider (CREDENTIALS_PROVIDER_CHAIN )
77
+ .build ();
78
+ accountId = sts .getCallerIdentity ().account ();
69
79
}
70
80
71
81
protected static S3ClientBuilder s3ClientBuilder () {
You can’t perform that action at this time.
0 commit comments