...
1 package helper
2
3 import (
4 "os"
5
6 _ "github.com/onsi/ginkgo/v2"
7 . "github.com/onsi/gomega"
8
9 "github.com/redhat-developer/odo/pkg/odo/cli/feature"
10 )
11
12
13 func EnableExperimentalMode() {
14 err := os.Setenv(feature.OdoExperimentalModeEnvVar, "true")
15 Expect(err).ShouldNot(HaveOccurred())
16 }
17
18
19
20
21 func ResetExperimentalMode() {
22 if _, ok := os.LookupEnv(feature.OdoExperimentalModeEnvVar); ok {
23 err := os.Unsetenv(feature.OdoExperimentalModeEnvVar)
24 Expect(err).ShouldNot(HaveOccurred())
25 }
26 }
27
View as plain text