Skip to content

Commit

Permalink
Fixed failing unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
DobromirM authored and manusa committed Nov 4, 2022
1 parent 2ee77a0 commit c502dde
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import io.fabric8.kubernetes.api.model.PodSpec;
import io.fabric8.kubernetes.api.model.Quantity;
import io.fabric8.kubernetes.api.model.Service;
import io.fabric8.kubernetes.api.model.Toleration;
import io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinition;
import io.fabric8.kubernetes.api.model.apiextensions.v1beta1.JSONSchemaProps;
import io.fabric8.kubernetes.api.model.apps.Deployment;
Expand All @@ -57,6 +58,7 @@
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.time.ZonedDateTime;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
Expand Down Expand Up @@ -178,10 +180,11 @@ void testSerializeYamlWithAlias() {
.isNotNull()
.hasFieldOrPropertyWithValue("metadata.name", "test-pod-with-alias")
.hasFieldOrPropertyWithValue("spec.nodeSelector.workload", "build")
.hasFieldOrPropertyWithValue("spec.tolerations.size", 1)
.hasFieldOrPropertyWithValue("spec.securityContext.runAsGroup", 1000L)
.hasFieldOrPropertyWithValue("spec.securityContext.runAsUser", 1000L)
.extracting(Pod::getSpec).extracting(PodSpec::getContainers).asList()
.extracting(Pod::getSpec)
.returns(Arrays.asList(new Toleration("NoSchedule", "nodeType", "Equal", null, "build")), PodSpec::getTolerations)
.extracting(PodSpec::getContainers).asList()
.hasSize(2)
.extracting("name", "image", "resources.requests.cpu")
.containsExactly(
Expand Down

0 comments on commit c502dde

Please sign in to comment.