use of io.fabric8.kubernetes.api.Controller in project fabric8-maven-plugin by fabric8io.
the class JobHandlerTest method daemonTemplateHandlerWithInvalidNameTest.
@Test(expected = IllegalArgumentException.class)
public void daemonTemplateHandlerWithInvalidNameTest() {
// invalid controller name
ContainerHandler containerHandler = new ContainerHandler(project, envVarHandler, probeHandler);
PodTemplateHandler podTemplateHandler = new PodTemplateHandler(containerHandler);
JobHandler jobHandler = new JobHandler(podTemplateHandler);
// with invalid controller name
ResourceConfig config = new ResourceConfig.Builder().imagePullPolicy("IfNotPresent").controllerName("TesTing").withServiceAccount("test-account").volumes(volumes1).build();
jobHandler.getJob(config, images);
}
use of io.fabric8.kubernetes.api.Controller in project fabric8-maven-plugin by fabric8io.
the class ReplicaSetHandlerTest method replicaSetHandlerWithoutControllerTest.
@Test(expected = IllegalArgumentException.class)
public void replicaSetHandlerWithoutControllerTest() {
// without controller name
ContainerHandler containerHandler = new ContainerHandler(project, envVarHandler, probeHandler);
PodTemplateHandler podTemplateHandler = new PodTemplateHandler(containerHandler);
ReplicaSetHandler replicaSetHandler = new ReplicaSetHandler(podTemplateHandler);
// without controller name
ResourceConfig config = new ResourceConfig.Builder().imagePullPolicy("IfNotPresent").withServiceAccount("test-account").withReplicas(5).volumes(volumes1).build();
replicaSetHandler.getReplicaSet(config, images);
}
use of io.fabric8.kubernetes.api.Controller in project fabric8-maven-plugin by fabric8io.
the class ReplicaSetHandlerTest method replicaSetHandlerWithInvalidNameTest.
@Test(expected = IllegalArgumentException.class)
public void replicaSetHandlerWithInvalidNameTest() {
// invalid controller name
ContainerHandler containerHandler = new ContainerHandler(project, envVarHandler, probeHandler);
PodTemplateHandler podTemplateHandler = new PodTemplateHandler(containerHandler);
ReplicaSetHandler replicaSetHandler = new ReplicaSetHandler(podTemplateHandler);
// with invalid controller name
ResourceConfig config = new ResourceConfig.Builder().imagePullPolicy("IfNotPresent").controllerName("TesTing").withServiceAccount("test-account").withReplicas(5).volumes(volumes1).build();
replicaSetHandler.getReplicaSet(config, images);
}
use of io.fabric8.kubernetes.api.Controller in project fabric8-maven-plugin by fabric8io.
the class ReplicationControllerHandlerTest method replicationControllerHandlerWithoutControllerTest.
@Test(expected = IllegalArgumentException.class)
public void replicationControllerHandlerWithoutControllerTest() {
// without controller name
ContainerHandler containerHandler = new ContainerHandler(project, envVarHandler, probeHandler);
PodTemplateHandler podTemplateHandler = new PodTemplateHandler(containerHandler);
ReplicationControllerHandler replicationControllerHandler = new ReplicationControllerHandler(podTemplateHandler);
// without controller name
ResourceConfig config = new ResourceConfig.Builder().imagePullPolicy("IfNotPresent").withServiceAccount("test-account").withReplicas(5).volumes(volumes1).build();
replicationControllerHandler.getReplicationController(config, images);
}
use of io.fabric8.kubernetes.api.Controller in project fabric8-maven-plugin by fabric8io.
the class StatefulSetHandlerTest method statefulSetHandlerWithInvalidNameTest.
@Test(expected = IllegalArgumentException.class)
public void statefulSetHandlerWithInvalidNameTest() {
// invalid controller name
ContainerHandler containerHandler = new ContainerHandler(project, envVarHandler, probeHandler);
PodTemplateHandler podTemplateHandler = new PodTemplateHandler(containerHandler);
StatefulSetHandler statefulSetHandler = new StatefulSetHandler(podTemplateHandler);
// with invalid controller name
ResourceConfig config = new ResourceConfig.Builder().imagePullPolicy("IfNotPresent").controllerName("TesTing").withServiceAccount("test-account").withReplicas(5).volumes(volumes1).build();
statefulSetHandler.getStatefulSet(config, images);
}
Aggregations