From c2a2d04950b762ade4ecd6bd21bfde93dce64a9f Mon Sep 17 00:00:00 2001 From: Steven Hawkins Date: Tue, 2 Apr 2024 13:48:40 -0400 Subject: [PATCH] fix: correcting test assertions (#28373) closes: #28370 Signed-off-by: Steve Hawkins --- .../keycloak/operator/testsuite/unit/PodTemplateTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/operator/src/test/java/org/keycloak/operator/testsuite/unit/PodTemplateTest.java b/operator/src/test/java/org/keycloak/operator/testsuite/unit/PodTemplateTest.java index beb6d9c97e..9aea4ab41f 100644 --- a/operator/src/test/java/org/keycloak/operator/testsuite/unit/PodTemplateTest.java +++ b/operator/src/test/java/org/keycloak/operator/testsuite/unit/PodTemplateTest.java @@ -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