Skip to content

Commit

Permalink
fix: replace AssertJ's deprecated asList() DSL method in KubernetesRe…
Browse files Browse the repository at this point in the history
…sourceUtilTest (3275)

Signed-off-by: jpcairesf <[email protected]>
  • Loading branch information
jpcairesf authored Aug 5, 2024
1 parent 0a46918 commit 7e5b4b9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import io.fabric8.kubernetes.api.model.ConfigMapBuilder;
import io.fabric8.kubernetes.api.model.Container;
import io.fabric8.kubernetes.api.model.ContainerBuilder;
import io.fabric8.kubernetes.api.model.ContainerPort;
import io.fabric8.kubernetes.api.model.EnvVarBuilder;
import io.fabric8.kubernetes.api.model.HasMetadata;
import io.fabric8.kubernetes.api.model.KubernetesListBuilder;
Expand Down Expand Up @@ -130,7 +131,8 @@ void mergePodSpec_withFragmentWithContainerNameAndSidecarDisabled_shouldPreserve
.hasFieldOrPropertyWithValue("name", "demo")
.hasFieldOrPropertyWithValue("image", "spring-boot-test:latest")
.hasFieldOrPropertyWithValue("args", Collections.singletonList("/usr/local/s2i/run"))
.extracting("ports").asList().extracting("containerPort")
.extracting("ports").asInstanceOf(InstanceOfAssertFactories.list(ContainerPort.class))
.extracting("containerPort")
.containsExactly(8080, 9779, 8778);
}

Expand Down

0 comments on commit 7e5b4b9

Please sign in to comment.