Skip to content

Commit 4d0b7fc

Browse files
committed
wip
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
1 parent 6d66225 commit 4d0b7fc

File tree

1 file changed

+7
-2
lines changed
  • sample-operators/metrics-processing/src/test/java/io/javaoperatorsdk/operator/sample/metrics

1 file changed

+7
-2
lines changed

sample-operators/metrics-processing/src/test/java/io/javaoperatorsdk/operator/sample/metrics/MetricsHandlingE2E.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ private void helmInstall() {
111111
throw new IllegalStateException("helm-values.yaml not found on classpath");
112112
}
113113
var valuesPath = new File(valuesUrl.toURI()).getAbsolutePath();
114-
var namespace = operator.getNamespace();
114+
var namespace = getNamespace();
115115

116116
log.info("Installing helm release '{}' into namespace '{}'", HELM_RELEASE_NAME, namespace);
117117
runCommand(
@@ -132,9 +132,14 @@ private void helmInstall() {
132132
}
133133
}
134134

135+
private String getNamespace() {
136+
var ns = operator.getNamespace();
137+
return ns == null ? "default" : ns;
138+
}
139+
135140
private void helmUninstall() {
136141
try {
137-
var namespace = operator.getNamespace();
142+
var namespace = getNamespace();
138143
log.info("Uninstalling helm release '{}' from namespace '{}'", HELM_RELEASE_NAME, namespace);
139144
runCommand(
140145
"helm",

0 commit comments

Comments
 (0)