We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c4d011 commit d358c64Copy full SHA for d358c64
1 file changed
internal/controller/console/catalog_test.go
@@ -2,6 +2,7 @@ package console
2
3
import (
4
"context"
5
+ "os"
6
"testing"
7
8
appsv1 "k8s.io/api/apps/v1"
@@ -12,6 +13,13 @@ import (
12
13
"sigs.k8s.io/controller-runtime/pkg/client/fake"
14
)
15
16
+func TestMain(m *testing.M) {
17
+ // Ensure getDeploymentNamespace() always returns defaultNamespace in tests,
18
+ // regardless of whether /var/run/secrets/.../namespace exists (e.g. in CI).
19
+ os.Setenv("OPERATOR_NAMESPACE", defaultNamespace)
20
+ os.Exit(m.Run())
21
+}
22
+
23
func newOperatorConfigMap(image string) *corev1.ConfigMap {
24
data := map[string]string{}
25
if image != "" {
0 commit comments