Skip to content

Commit

Permalink
fix: K8s resource Map fields can be null or empty
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Nuri <[email protected]>
  • Loading branch information
manusa committed Jul 13, 2022
1 parent 85be437 commit f6f0663
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
*/
package org.eclipse.jkube.enricher.generic;

import static junit.framework.TestCase.assertNull;
import static org.assertj.core.api.Assertions.assertThat;

import java.io.IOException;
Expand Down Expand Up @@ -188,7 +187,7 @@ public void should_materialize_binary_file_content_from_xml() {
final ConfigMap configMap = (ConfigMap) builder.buildFirstItem();

final Map<String, String> data = configMap.getData();
assertNull(data);
assertThat(data).isNullOrEmpty();

final Map<String, String> binaryData = configMap.getBinaryData();
assertThat(binaryData).containsEntry("test.bin", "wA==");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public void testNoDefinedPrometheusPort() {
// When
prometheusEnricher.create(PlatformMode.kubernetes, builder);
// Then
assertThat(builder.buildFirstItem().getMetadata().getAnnotations()).isNull();
assertThat(builder.buildFirstItem().getMetadata().getAnnotations()).isNullOrEmpty();
}

@Test
Expand Down

0 comments on commit f6f0663

Please sign in to comment.