github.com/DaAlbrecht/cf-cli@v0.0.0-20231128151943-1fe19bb400b9/util/configv3/k8s_test.go (about) 1 package configv3_test 2 3 import ( 4 . "github.com/onsi/ginkgo" 5 . "github.com/onsi/gomega" 6 7 "code.cloudfoundry.org/cli/util/configv3" 8 ) 9 10 var _ = Describe("K8s", func() { 11 var config configv3.Config 12 13 BeforeEach(func() { 14 config = configv3.Config{} 15 }) 16 17 Describe("IsCFOnK8s", func() { 18 It("returns false by default", func() { 19 Expect(config.IsCFOnK8s()).To(BeFalse()) 20 }) 21 22 When("the config is pointed to cf-on-k8s", func() { 23 BeforeEach(func() { 24 config.ConfigFile.CFOnK8s = configv3.CFOnK8s{ 25 Enabled: true, 26 } 27 }) 28 29 It("returns true", func() { 30 Expect(config.IsCFOnK8s()).To(BeTrue()) 31 }) 32 }) 33 }) 34 })