public PodBuilder(){ this(new Pod()); } public PodBuilder( PodFluent<?> fluent ){
public PodBuilder(){ this(new Pod()); } public PodBuilder( PodFluent<?> fluent ){
public PodBuilder(Boolean validationEnabled){ this(new Pod(), validationEnabled); } public PodBuilder(PodFluent<?> fluent){
public PodBuilder( PodFluent<?> fluent ){ this(fluent, new Pod()); } public PodBuilder( PodFluent<?> fluent , Pod instance ){
public PodBuilder( PodFluent<?> fluent ){ this(fluent, new Pod()); } public PodBuilder( PodFluent<?> fluent , Pod instance ){
public PodBuilder(PodFluent<?> fluent,Boolean validationEnabled){ this(fluent, new Pod(), validationEnabled); } public PodBuilder(PodFluent<?> fluent,Pod instance){
public Pod build(){ Pod buildable = new Pod(fluent.getApiVersion(),fluent.getKind(),fluent.getMetadata(),fluent.getSpec(),fluent.getStatus()); validate(buildable); return buildable; }
public Pod build(){ Pod buildable = new Pod(fluent.getApiVersion(),fluent.getKind(),fluent.getMetadata(),fluent.getSpec(),fluent.getStatus()); validate(buildable); return buildable; }
@Test public void shouldCombineAllTolerations() { PodSpec podSpec1 = new PodSpec(); Pod pod1 = new Pod(); Toleration toleration1 = new Toleration("effect1", "key1", "oper1", Long.parseLong("1"), "val1"); Toleration toleration2 = new Toleration("effect2", "key2", "oper2", Long.parseLong("2"), "val2"); podSpec1.setTolerations(asList(toleration1, toleration2)); pod1.setSpec(podSpec1); pod1.setMetadata(new ObjectMeta()); PodSpec podSpec2 = new PodSpec(); Pod pod2 = new Pod(); Toleration toleration3 = new Toleration("effect3", "key3", "oper3", Long.parseLong("3"), "val3"); Toleration toleration4 = new Toleration("effect4", "key4", "oper4", Long.parseLong("4"), "val4"); podSpec2.setTolerations(asList(toleration3, toleration4)); pod2.setSpec(podSpec2); pod2.setMetadata(new ObjectMeta()); Pod result = combine(pod1, pod2); assertThat(result.getSpec().getTolerations(), containsInAnyOrder(toleration1, toleration2, toleration3, toleration4)); }
List<Pod> list = Lists.newArrayList(pods); for (int i = 0; i < createCount; i++) { Pod pod = new Pod(); pod.setKind(NodeHelper.KIND_POD);