Skip to content

Commit 9a38c1b

Browse files
committed
get unit tests to pass
1 parent 7dc1b4c commit 9a38c1b

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

model/src/main/java/oracle/kubernetes/weblogic/domain/v2/DomainSpec.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,11 @@ public void setDomainHomeInImage(boolean domainHomeInImage) {
482482
this.domainHomeInImage = domainHomeInImage;
483483
}
484484

485+
public DomainSpec withDomainHomeInImage(boolean domainHomeInImage) {
486+
setDomainHomeInImage(domainHomeInImage);
487+
return this;
488+
}
489+
485490
/**
486491
* The desired number of running managed servers in each WebLogic cluster that is not explicitly
487492
* configured in clusters.

operator/src/main/java/oracle/kubernetes/operator/helpers/PodStepContext.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ private V1Container createContainer(TuningParameters tuningParameters) {
637637
.env(getEnvironmentVariables(tuningParameters))
638638
.addPortsItem(new V1ContainerPort().containerPort(getPort()).protocol("TCP"))
639639
.lifecycle(createLifecycle())
640-
// .addVolumeMountsItem(volumeMount(STORAGE_VOLUME, STORAGE_MOUNT_PATH))
640+
// .addVolumeMountsItem(volumeMount(STORAGE_VOLUME, STORAGE_MOUNT_PATH))
641641
.addVolumeMountsItem(readOnlyVolumeMount(SECRETS_VOLUME, SECRETS_MOUNT_PATH))
642642
.addVolumeMountsItem(readOnlyVolumeMount(SCRIPTS_VOLUME, SCRIPTS_MOUNTS_PATH))
643643
.addVolumeMountsItem(readOnlyVolumeMount(DEBUG_CM_VOLUME, DEBUG_CM_MOUNTS_PATH))
@@ -647,7 +647,6 @@ private V1Container createContainer(TuningParameters tuningParameters) {
647647
v1Container.addVolumeMountsItem(volumeMount(STORAGE_VOLUME, STORAGE_MOUNT_PATH));
648648
}
649649

650-
651650
if (!mockWLS()) {
652651
v1Container.readinessProbe(createReadinessProbe(tuningParameters.getPodTuning()));
653652
}

operator/src/test/java/oracle/kubernetes/operator/helpers/DomainIntrospectorJobTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ private DomainSpec createDomainSpec() {
169169
.withAdminSecret(new V1SecretReference().name(ADMIN_SECRET_NAME))
170170
.withConfigOverrides(OVERRIDES_CM)
171171
.withCluster(cluster)
172-
.withImage(LATEST_IMAGE);
172+
.withImage(LATEST_IMAGE)
173+
.withDomainHomeInImage(false);
173174

174175
List<String> overrideSecrets = new ArrayList();
175176
overrideSecrets.add(OVERRIDE_SECRET_1);

operator/src/test/java/oracle/kubernetes/operator/helpers/PodHelperTestBase.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,10 @@ public void whenPodCreatedWithPullSecret_addToPod() {
258258

259259
@Test
260260
public void whenPodCreated_containerHasExpectedVolumeMounts() {
261+
domainPresenceInfo
262+
.getClaims()
263+
.addItemsItem(
264+
new V1PersistentVolumeClaim().metadata(new V1ObjectMeta().name("claim-name")));
261265
assertThat(
262266
getCreatedPodSpecContainer().getVolumeMounts(),
263267
containsInAnyOrder(

0 commit comments

Comments
 (0)