Skip to content

Commit 0113283

Browse files
committed
More test fixing
1 parent b81d5bf commit 0113283

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ final void updateForDeepSubstitution(V1PodSpec podSpec, Object target) {
1919
getContainer(podSpec)
2020
.ifPresent(
2121
c -> {
22-
doDeepSubstitution(deepSubVars(c.getEnv()), target);
22+
doDeepSubstitution(augmentSubVars(deepSubVars(c.getEnv())), target);
2323
});
2424
}
2525

2626
final Map<String, String> deepSubVars(List<V1EnvVar> envVars) {
2727
return varsToSubVariables(envVars);
2828
}
2929

30-
protected void augmentSubVars(Map<String, String> vars) {
31-
// no-op
30+
protected Map<String, String> augmentSubVars(Map<String, String> vars) {
31+
return vars;
3232
}
3333

3434
protected Optional<V1Container> getContainer(V1Pod v1Pod) {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,10 @@ protected String getMainContainerName() {
8383
}
8484

8585
@Override
86-
protected void augmentSubVars(Map<String, String> vars) {
86+
protected Map<String, String> augmentSubVars(Map<String, String> vars) {
8787
// HERE: placeholder that needs to be documented
8888
vars.put("SERVER_NAME", "introspector");
89+
return vars;
8990
}
9091

9192
String getWebLogicCredentialsSecretName() {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,11 +404,12 @@ V1Pod withNonHashedElements(V1Pod pod) {
404404
}
405405

406406
@Override
407-
protected void augmentSubVars(Map<String, String> vars) {
407+
protected Map<String, String> augmentSubVars(Map<String, String> vars) {
408408
String clusterName = getClusterName();
409409
if (clusterName != null) {
410410
vars.put("CLUSTER_NAME", clusterName);
411411
}
412+
return vars;
412413
}
413414

414415
final void updateForStartupMode(V1Pod pod) {

0 commit comments

Comments
 (0)