Skip to content

Commit

Permalink
chore: KubernetesResourceUtilTest refactor
Browse files Browse the repository at this point in the history
initContainersInSpec.size() == 0' replaced with 'initContainersInSpec.isEmpty()

Signed-off-by: Piotr Filochowski <piotr.filochowski01@gmail.com>
  • Loading branch information
Piotr-Filochowski committed Jul 28, 2024
1 parent 1a2b8b0 commit 6102fbb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Usage:
* Fix #3220: ImageEnricher#mergeEnvVariables causes error for empty env
* Fix #3228: Springboot 3.3.1 layertools output format breaks LayeredJarGenerator


_**Note**_:
- `defaultStorageClass` and `useStorageClassAnnotation` fields have been removed from VolumePermissionEnricher (`jkube-volume-permission`). Users are advised to use these fields from PersistentVolumeClaimStorageClassEnricher (`jkube-persistentvolumeclaim-storageclass`) instead.

Expand Down
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 6102fbb

Please sign in to comment.