ImageEnricher extends BaseEnricher { @Override public void create(PlatformMode platformMode, KubernetesListBuilder builder) { if (!hasImageConfiguration()) { log.verbose(Logger.LogVerboseCategory.BUILD, "No images resolved. Skipping ..."); return; } ensureTemplateSpecs(builder); updateContainers(builder); } ImageEnricher(MavenEnricherContext buildContext); @Override void create(PlatformMode platformMode, KubernetesListBuilder builder);  }
@Test public void checkEnrichDeployment() throws Exception { KubernetesListBuilder builder = new KubernetesListBuilder() .addToItems(new DeploymentBuilder().build()); imageEnricher.create(PlatformMode.kubernetes, builder); assertCorrectlyGeneratedResources(builder.build(), "Deployment"); }
@Test public void checkEnrichReplicaSet() throws Exception { KubernetesListBuilder builder = new KubernetesListBuilder() .addToItems(new ReplicaSetBuilder().build()); imageEnricher.create(PlatformMode.kubernetes, builder); assertCorrectlyGeneratedResources(builder.build(), "ReplicaSet"); }
@Test public void checkEnrichReplicationController() throws Exception { KubernetesListBuilder builder = new KubernetesListBuilder() .addNewReplicationControllerItem() .endReplicationControllerItem(); imageEnricher.create(PlatformMode.kubernetes, builder); assertCorrectlyGeneratedResources(builder.build(), "ReplicationController"); }
@Test public void checkEnrichDaemonSet() throws Exception { KubernetesListBuilder builder = new KubernetesListBuilder() .addToItems(new DaemonSetBuilder().build()); imageEnricher.create(PlatformMode.kubernetes, builder); assertCorrectlyGeneratedResources(builder.build(), "DaemonSet"); }
@Test public void checkEnrichStatefulSet() throws Exception { KubernetesListBuilder builder = new KubernetesListBuilder() .addToItems(new StatefulSetBuilder().build()); imageEnricher.create(PlatformMode.kubernetes, builder); assertCorrectlyGeneratedResources(builder.build(), "StatefulSet"); }
@Test public void checkEnrichDeploymentConfig() throws Exception { KubernetesListBuilder builder = new KubernetesListBuilder() .addToItems(new DeploymentConfigBuilder().build()); imageEnricher.create(PlatformMode.kubernetes, builder); assertCorrectlyGeneratedResources(builder.build(), "DeploymentConfig"); }