Skip to content

Commit

Permalink
fix: 'initContainersInSpec.size() == 0' replaced with 'initContainers…
Browse files Browse the repository at this point in the history
…InSpec.isEmpty()' in KubernetesResourceUtilTest

initContainersInSpec.size() == 0' replaced with 'initContainersInSpec.isEmpty()

Signed-off-by: Piotr Filochowski <[email protected]>
  • Loading branch information
Piotr-Filochowski authored Aug 5, 2024
1 parent 9a80401 commit 1b80688
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ void isContainerImage_whenImageAbsentInInitContainerConfig_thenReturnTrue() {
private void verifyBuilder(PodTemplateSpecBuilder builder, List<Container> initContainers) {
PodTemplateSpec spec = builder.build();
List<Container> initContainersInSpec = spec.getSpec().getInitContainers();
if (initContainersInSpec.size() == 0) {
if (initContainersInSpec.isEmpty()) {
assertThat(initContainers).isNull();;
} else {
assertThat(initContainers).hasSameSizeAs(initContainersInSpec);
Expand Down

0 comments on commit 1b80688

Please sign in to comment.