fix: correcting test assertions (#28373)

closes: #28370

Signed-off-by: Steve Hawkins <shawkins@redhat.com>
This commit is contained in:
Steven Hawkins 2024-04-02 13:48:40 -04:00 committed by GitHub
parent bd64b8f40f
commit c2a2d04950
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -399,13 +399,13 @@ public class PodTemplateTest {
// Act
var podTemplate = getDeployment(additionalPodTemplate, null,
s -> s.addToAdditionalOptions(new ValueOrSecret(KeycloakDeploymentDependentResource.KC_TRUSTSTORE_PATHS, "/something")))
s -> s.addToAdditionalOptions(new ValueOrSecret("truststore-paths", "/something")))
.getSpec().getTemplate();
// Assert
assertThat(podTemplate.getSpec().getContainers().get(0).getEnv().stream()
assertThat(podTemplate.getSpec().getContainers().get(0).getEnv().stream())
.anyMatch(envVar -> envVar.getName().equals(KeycloakDeploymentDependentResource.KC_TRUSTSTORE_PATHS)
&& envVar.getValue().equals("/something")));
&& envVar.getValue().equals("/something"));
}
@Test
@ -419,7 +419,7 @@ public class PodTemplateTest {
.getSpec().getTemplate();
// Assert
assertThat(podTemplate.getSpec().getContainers().get(0).getCommand().contains(KeycloakDeploymentDependentResource.OPTIMIZED_ARG));
assertThat(podTemplate.getSpec().getContainers().get(0).getArgs()).contains(KeycloakDeploymentDependentResource.OPTIMIZED_ARG);
}
@Test