Search in sources :

Example 41 with KubernetesListBuilder

use of io.fabric8.kubernetes.api.model.KubernetesListBuilder in project fabric8-maven-plugin by fabric8io.

the class ImageEnricherTest method checkEnrichDeployment.

@Test
public void checkEnrichDeployment() throws Exception {
    KubernetesListBuilder builder = new KubernetesListBuilder().addNewDeploymentItem().endDeploymentItem();
    imageEnricher.addMissingResources(builder);
    assertCorrectlyGeneratedResources(builder.build(), "Deployment");
}
Also used : KubernetesListBuilder(io.fabric8.kubernetes.api.model.KubernetesListBuilder) Test(org.junit.Test)

Example 42 with KubernetesListBuilder

use of io.fabric8.kubernetes.api.model.KubernetesListBuilder in project fabric8-maven-plugin by fabric8io.

the class ImageEnricherTest method checkEnrichDaemonSet.

@Test
public void checkEnrichDaemonSet() throws Exception {
    KubernetesListBuilder builder = new KubernetesListBuilder().addNewDaemonSetItem().endDaemonSetItem();
    imageEnricher.addMissingResources(builder);
    assertCorrectlyGeneratedResources(builder.build(), "DaemonSet");
}
Also used : KubernetesListBuilder(io.fabric8.kubernetes.api.model.KubernetesListBuilder) Test(org.junit.Test)

Example 43 with KubernetesListBuilder

use of io.fabric8.kubernetes.api.model.KubernetesListBuilder in project fabric8-maven-plugin by fabric8io.

the class ImageEnricherTest method checkEnrichReplicaSet.

@Test
public void checkEnrichReplicaSet() throws Exception {
    KubernetesListBuilder builder = new KubernetesListBuilder().addNewReplicaSetItem().endReplicaSetItem();
    imageEnricher.addMissingResources(builder);
    assertCorrectlyGeneratedResources(builder.build(), "ReplicaSet");
}
Also used : KubernetesListBuilder(io.fabric8.kubernetes.api.model.KubernetesListBuilder) Test(org.junit.Test)

Example 44 with KubernetesListBuilder

use of io.fabric8.kubernetes.api.model.KubernetesListBuilder in project fabric8-maven-plugin by fabric8io.

the class ImageEnricherTest method checkEnrichReplicationController.

@Test
public void checkEnrichReplicationController() throws Exception {
    KubernetesListBuilder builder = new KubernetesListBuilder().addNewReplicationControllerItem().endReplicationControllerItem();
    imageEnricher.addMissingResources(builder);
    assertCorrectlyGeneratedResources(builder.build(), "ReplicationController");
}
Also used : KubernetesListBuilder(io.fabric8.kubernetes.api.model.KubernetesListBuilder) Test(org.junit.Test)

Example 45 with KubernetesListBuilder

use of io.fabric8.kubernetes.api.model.KubernetesListBuilder in project fabric8-maven-plugin by fabric8io.

the class ImageEnricherTest method checkEnrichStatefulSet.

@Test
public void checkEnrichStatefulSet() throws Exception {
    KubernetesListBuilder builder = new KubernetesListBuilder().addNewStatefulSetItem().endStatefulSetItem();
    imageEnricher.addMissingResources(builder);
    assertCorrectlyGeneratedResources(builder.build(), "StatefulSet");
}
Also used : KubernetesListBuilder(io.fabric8.kubernetes.api.model.KubernetesListBuilder) Test(org.junit.Test)

Aggregations

KubernetesListBuilder (io.fabric8.kubernetes.api.model.KubernetesListBuilder)30 Test (org.junit.Test)25 KubernetesList (io.fabric8.kubernetes.api.model.KubernetesList)17 Expectations (mockit.Expectations)13 HasMetadata (io.fabric8.kubernetes.api.model.HasMetadata)8 BuildImageConfiguration (io.fabric8.maven.docker.config.BuildImageConfiguration)5 ImageConfiguration (io.fabric8.maven.docker.config.ImageConfiguration)5 File (java.io.File)5 ProcessorConfig (io.fabric8.maven.core.config.ProcessorConfig)4 MojoExecutionException (org.apache.maven.plugin.MojoExecutionException)4 ObjectMeta (io.fabric8.kubernetes.api.model.ObjectMeta)3 Secret (io.fabric8.kubernetes.api.model.Secret)3 Fabric8ServiceException (io.fabric8.maven.core.service.Fabric8ServiceException)3 IOException (java.io.IOException)3 Map (java.util.Map)3 JSONArray (org.json.JSONArray)3 JSONObject (org.json.JSONObject)3 Visitable (io.fabric8.kubernetes.api.builder.Visitable)2 Visitor (io.fabric8.kubernetes.api.builder.Visitor)2 KubernetesResource (io.fabric8.kubernetes.api.model.KubernetesResource)2