Skip to content

Commit b9f4aae

Browse files
committed
clean
1 parent 9726e06 commit b9f4aae

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

src/test/java/common/KmsHelper.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,13 @@
2222
*/
2323
public final class KmsHelper {
2424

25-
private static final String DEFAULT_LOCALSTACK_ENDPOINT = "http://localhost:5001";
25+
private static final String LOCALSTACK_ENDPOINT = "http://localstack:5001";
2626
private static final String KMS_KEY_ID = "ff275b92-0def-4dfc-b0f6-87c96b26c6c7";
2727
private static final Region REGION = Region.US_EAST_1;
2828

2929
private KmsHelper() {
3030
}
3131

32-
private static String getLocalstackEndpoint() {
33-
String endpoint = EnvUtil.getEnv(Const.Config.Core.LOCALSTACK_URL, false);
34-
return (endpoint != null && !endpoint.isBlank()) ? endpoint : DEFAULT_LOCALSTACK_ENDPOINT;
35-
}
36-
3732
/**
3833
* Fetches the public key from LocalStack KMS for the configured key ID.
3934
*
@@ -81,9 +76,8 @@ public static PublicKey getPublicKeyObjectFromLocalstack() throws Exception {
8176
}
8277

8378
private static KmsClient createLocalstackKmsClient() {
84-
String endpoint = getLocalstackEndpoint();
8579
return KmsClient.builder()
86-
.endpointOverride(URI.create(endpoint))
80+
.endpointOverride(URI.create(LOCALSTACK_ENDPOINT))
8781
.region(REGION)
8882
.credentialsProvider(StaticCredentialsProvider.create(
8983
AwsBasicCredentials.create("test", "test")))

0 commit comments

Comments
 (0)