Skip to content

Commit fcadb92

Browse files
committed
More testing
1 parent dce177f commit fcadb92

File tree

3 files changed

+15
-19
lines changed

3 files changed

+15
-19
lines changed

powertools-e2e-tests/src/test/java/software/amazon/lambda/powertools/ParametersE2ET.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ public void setup() {
4848
functionName = infrastructure.deploy();
4949
}
5050

51-
// @AfterAll
52-
// public void tearDown() {
53-
// if (infrastructure != null)
54-
// infrastructure.destroy();
55-
// }
51+
@AfterAll
52+
public void tearDown() {
53+
if (infrastructure != null)
54+
infrastructure.destroy();
55+
}
5656

5757
@Test
5858
public void test_getAppConfigValue() {

powertools-parameters/src/main/java/software/amazon/lambda/powertools/parameters/AppConfigProvider.java

-8
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,6 @@ private EstablishedSession(String nextSessionToken, String value) {
3838
this.nextSessionToken = nextSessionToken;
3939
this.lastConfigurationValue = value;
4040
}
41-
42-
public String getNextSessionToken() {
43-
return nextSessionToken;
44-
}
45-
46-
public String getLastConfigurationValue() {
47-
return lastConfigurationValue;
48-
}
4941
}
5042

5143
private final AppConfigDataClient client;

powertools-parameters/src/test/java/software/amazon/lambda/powertools/parameters/AppConfigProviderTest.java

+10-6
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@
1414
import software.amazon.awssdk.services.appconfigdata.model.StartConfigurationSessionRequest;
1515
import software.amazon.awssdk.services.appconfigdata.model.StartConfigurationSessionResponse;
1616
import software.amazon.lambda.powertools.parameters.cache.CacheManager;
17+
import software.amazon.lambda.powertools.parameters.transform.TransformationManager;
18+
1719
import static org.assertj.core.api.Assertions.assertThat;
1820

21+
import java.time.Duration;
1922
import java.util.Optional;
2023

2124
import static org.mockito.ArgumentMatchers.eq;
@@ -26,9 +29,6 @@ public class AppConfigProviderTest {
2629
@Mock
2730
AppConfigDataClient client;
2831

29-
// @Mock
30-
// GetEnvironmentResponse environment;
31-
3232
private AppConfigProvider provider;
3333

3434
@Captor
@@ -49,9 +49,13 @@ public class AppConfigProviderTest {
4949
@BeforeEach
5050
public void init() {
5151
openMocks(this);
52-
53-
CacheManager cacheManager = new CacheManager();
54-
provider = new AppConfigProvider(cacheManager, client, environmentName, applicationName);
52+
provider = AppConfigProvider.builder()
53+
.withClient(client)
54+
.withApplication(applicationName)
55+
.withEnvironment(environmentName)
56+
.withCacheManager(new CacheManager())
57+
.withTransformationManager(new TransformationManager())
58+
.build();
5559
}
5660

5761

0 commit comments

Comments
 (0)