Skip to content

Commit 43f498c

Browse files
committed
Fix ECS tests
1 parent 3c1427b commit 43f498c

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/main/java/eu/openanalytics/containerproxy/backend/ecs/EcsBackend.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,6 @@ public void initialize() {
131131
if (region == null) {
132132
throw new IllegalStateException("Error in configuration of ECS backend: proxy.ecs.region not set");
133133
}
134-
try (StsClient stsClient = StsClient.create()) {
135-
accountId = stsClient.getCallerIdentity().account();
136-
}
137134

138135
ecsClient = EcsClient.builder()
139136
.region(Region.of(region))
@@ -187,6 +184,10 @@ public void initialize() {
187184
throw new IllegalStateException(String.format("Error in configuration of specs: spec with id '%s' has 'dns' configured, this is not supported by ECS fargate", spec.getId()));
188185
}
189186
}
187+
188+
try (StsClient stsClient = StsClient.create()) {
189+
accountId = stsClient.getCallerIdentity().account();
190+
}
190191
}
191192

192193
@Override

0 commit comments

Comments
 (0)