@@ -166,7 +166,7 @@ void mergePodSpec_withFragmentWithNoContainerNameAndSidecarDisabled_shouldGetCon
166
166
.hasFieldOrPropertyWithValue ("resources.requests.memory.amount" , "256" )
167
167
.hasFieldOrPropertyWithValue ("resources.limits.cpu.amount" , "1.0" )
168
168
.hasFieldOrPropertyWithValue ("resources.limits.memory.amount" , "512" )
169
- .extracting ("ports" ).asList ( ).extracting ("containerPort" )
169
+ .extracting ("ports" ).asInstanceOf ( InstanceOfAssertFactories . list ( ContainerPort . class ) ).extracting ("containerPort" )
170
170
.containsExactly (8080 , 9779 , 8778 );
171
171
}
172
172
@@ -300,7 +300,7 @@ void mergeResources_whenDeploymentProvidedAndFirstDeploymentWithEmptySpec_thenSh
300
300
.extracting (DeploymentSpec ::getTemplate )
301
301
.extracting (PodTemplateSpec ::getSpec )
302
302
.extracting (PodSpec ::getContainers )
303
- .asList ( )
303
+ .asInstanceOf ( InstanceOfAssertFactories . list ( Container . class ) )
304
304
.singleElement (InstanceOfAssertFactories .type (Container .class ))
305
305
.hasFieldOrPropertyWithValue ("env" , Collections .singletonList (new EnvVarBuilder ().withName ("E1" ).withValue ("V1" ).build ()))
306
306
.hasFieldOrPropertyWithValue ("name" , "foo" );
@@ -338,7 +338,7 @@ void mergeResources_whenDeploymentProvidedAndSecondDeploymentWithEmptySpec_thenS
338
338
.extracting (DeploymentSpec ::getTemplate )
339
339
.extracting (PodTemplateSpec ::getSpec )
340
340
.extracting (PodSpec ::getContainers )
341
- .asList ( )
341
+ .asInstanceOf ( InstanceOfAssertFactories . list ( Container . class ) )
342
342
.singleElement (InstanceOfAssertFactories .type (Container .class ))
343
343
.hasFieldOrPropertyWithValue ("name" , "foo" );
344
344
}
@@ -393,7 +393,7 @@ void mergeResources_whenBothDeploymentNonEmptySpec_thenShouldMergeBothObjects()
393
393
.extracting (DeploymentSpec ::getTemplate )
394
394
.extracting (PodTemplateSpec ::getSpec )
395
395
.extracting (PodSpec ::getContainers )
396
- .asList ( )
396
+ .asInstanceOf ( InstanceOfAssertFactories . list ( Container . class ) )
397
397
.singleElement (InstanceOfAssertFactories .type (Container .class ))
398
398
.hasFieldOrPropertyWithValue ("name" , "c1" );
399
399
}
@@ -486,7 +486,7 @@ void mergeResources_whenPodsProvided_thenMergeBothPodMetadataOnly() {
486
486
.hasFieldOrPropertyWithValue ("metadata.labels.l2" , "v2" )
487
487
.extracting (Pod ::getSpec )
488
488
.extracting (PodSpec ::getContainers )
489
- .asList ( )
489
+ .asInstanceOf ( InstanceOfAssertFactories . list ( Container . class ) )
490
490
.singleElement (InstanceOfAssertFactories .type (Container .class ))
491
491
.hasFieldOrPropertyWithValue ("name" , "c1" )
492
492
.hasFieldOrPropertyWithValue ("image" , "image1:latest" );
0 commit comments