diff --git a/jkube-kit/enricher/api/src/test/java/org/eclipse/jkube/kit/enricher/api/util/KubernetesResourceUtilTest.java b/jkube-kit/enricher/api/src/test/java/org/eclipse/jkube/kit/enricher/api/util/KubernetesResourceUtilTest.java index 5a42183664..e58c060dc4 100644 --- a/jkube-kit/enricher/api/src/test/java/org/eclipse/jkube/kit/enricher/api/util/KubernetesResourceUtilTest.java +++ b/jkube-kit/enricher/api/src/test/java/org/eclipse/jkube/kit/enricher/api/util/KubernetesResourceUtilTest.java @@ -166,7 +166,7 @@ void mergePodSpec_withFragmentWithNoContainerNameAndSidecarDisabled_shouldGetCon .hasFieldOrPropertyWithValue("resources.requests.memory.amount", "256") .hasFieldOrPropertyWithValue("resources.limits.cpu.amount", "1.0") .hasFieldOrPropertyWithValue("resources.limits.memory.amount", "512") - .extracting("ports").asList().extracting("containerPort") + .extracting("ports").asInstanceOf(InstanceOfAssertFactories.list(ContainerPort.class)).extracting("containerPort") .containsExactly(8080, 9779, 8778); } @@ -300,7 +300,7 @@ void mergeResources_whenDeploymentProvidedAndFirstDeploymentWithEmptySpec_thenSh .extracting(DeploymentSpec::getTemplate) .extracting(PodTemplateSpec::getSpec) .extracting(PodSpec::getContainers) - .asList() + .asInstanceOf(InstanceOfAssertFactories.list(Container.class)) .singleElement(InstanceOfAssertFactories.type(Container.class)) .hasFieldOrPropertyWithValue("env", Collections.singletonList(new EnvVarBuilder().withName("E1").withValue("V1").build())) .hasFieldOrPropertyWithValue("name", "foo"); @@ -338,7 +338,7 @@ void mergeResources_whenDeploymentProvidedAndSecondDeploymentWithEmptySpec_thenS .extracting(DeploymentSpec::getTemplate) .extracting(PodTemplateSpec::getSpec) .extracting(PodSpec::getContainers) - .asList() + .asInstanceOf(InstanceOfAssertFactories.list(Container.class)) .singleElement(InstanceOfAssertFactories.type(Container.class)) .hasFieldOrPropertyWithValue("name", "foo"); } @@ -393,7 +393,7 @@ void mergeResources_whenBothDeploymentNonEmptySpec_thenShouldMergeBothObjects() .extracting(DeploymentSpec::getTemplate) .extracting(PodTemplateSpec::getSpec) .extracting(PodSpec::getContainers) - .asList() + .asInstanceOf(InstanceOfAssertFactories.list(Container.class)) .singleElement(InstanceOfAssertFactories.type(Container.class)) .hasFieldOrPropertyWithValue("name", "c1"); } @@ -486,7 +486,7 @@ void mergeResources_whenPodsProvided_thenMergeBothPodMetadataOnly() { .hasFieldOrPropertyWithValue("metadata.labels.l2", "v2") .extracting(Pod::getSpec) .extracting(PodSpec::getContainers) - .asList() + .asInstanceOf(InstanceOfAssertFactories.list(Container.class)) .singleElement(InstanceOfAssertFactories.type(Container.class)) .hasFieldOrPropertyWithValue("name", "c1") .hasFieldOrPropertyWithValue("image", "image1:latest");