|
1 | 1 | package org.testcontainers.containers.localstack; |
2 | 2 |
|
3 | | -import com.amazonaws.client.builder.AwsClientBuilder; |
4 | 3 | import com.github.dockerjava.api.DockerClient; |
5 | 4 | import lombok.AllArgsConstructor; |
6 | 5 | import org.junit.BeforeClass; |
|
20 | 19 | @RunWith(Enclosed.class) |
21 | 20 | public class LegacyModeTest { |
22 | 21 |
|
23 | | - private static DockerImageName LOCALSTACK_CUSTOM_TAG = LocalstackTestImages.LOCALSTACK_IMAGE.withTag("custom"); |
| 22 | + private static DockerImageName LOCALSTACK_CUSTOM_TAG = DockerImageName |
| 23 | + .parse("localstack/localstack:0.12.8") |
| 24 | + .withTag("custom"); |
24 | 25 |
|
25 | 26 | @RunWith(Parameterized.class) |
26 | 27 | @AllArgsConstructor |
@@ -54,21 +55,9 @@ public void samePortIsExposedForAllServices() { |
54 | 55 | assertThat(localstack.getEndpointOverride(Service.SQS).toString()) |
55 | 56 | .as("Endpoint overrides are different") |
56 | 57 | .isEqualTo(localstack.getEndpointOverride(Service.S3).toString()); |
57 | | - assertThat( |
58 | | - new AwsClientBuilder.EndpointConfiguration( |
59 | | - localstack.getEndpointOverride(Service.SQS).toString(), |
60 | | - localstack.getRegion() |
61 | | - ) |
62 | | - .getServiceEndpoint() |
63 | | - ) |
| 58 | + assertThat(localstack.getEndpointOverride(Service.SQS).toString()) |
64 | 59 | .as("Endpoint configuration have different endpoints") |
65 | | - .isEqualTo( |
66 | | - new AwsClientBuilder.EndpointConfiguration( |
67 | | - localstack.getEndpointOverride(Service.S3).toString(), |
68 | | - localstack.getRegion() |
69 | | - ) |
70 | | - .getServiceEndpoint() |
71 | | - ); |
| 60 | + .isEqualTo(localstack.getEndpointOverride(Service.S3).toString()); |
72 | 61 | } finally { |
73 | 62 | localstack.stop(); |
74 | 63 | } |
@@ -119,21 +108,9 @@ public void differentPortsAreExposed() { |
119 | 108 | assertThat(localstack.getEndpointOverride(Service.SQS).toString()) |
120 | 109 | .as("Endpoint overrides are different") |
121 | 110 | .isNotEqualTo(localstack.getEndpointOverride(Service.S3).toString()); |
122 | | - assertThat( |
123 | | - new AwsClientBuilder.EndpointConfiguration( |
124 | | - localstack.getEndpointOverride(Service.SQS).toString(), |
125 | | - localstack.getRegion() |
126 | | - ) |
127 | | - .getServiceEndpoint() |
128 | | - ) |
| 111 | + assertThat(localstack.getEndpointOverride(Service.SQS).toString()) |
129 | 112 | .as("Endpoint configuration have different endpoints") |
130 | | - .isNotEqualTo( |
131 | | - new AwsClientBuilder.EndpointConfiguration( |
132 | | - localstack.getEndpointOverride(Service.S3).toString(), |
133 | | - localstack.getRegion() |
134 | | - ) |
135 | | - .getServiceEndpoint() |
136 | | - ); |
| 113 | + .isNotEqualTo(localstack.getEndpointOverride(Service.S3).toString()); |
137 | 114 | } finally { |
138 | 115 | localstack.stop(); |
139 | 116 | } |
|
0 commit comments