github.com/sleungcy/cli@v7.1.0+incompatible/integration/v7/isolated/proxy_connection_test.go (about) 1 package isolated 2 3 import ( 4 "code.cloudfoundry.org/cli/integration/helpers" 5 . "github.com/onsi/ginkgo" 6 . "github.com/onsi/gomega" 7 . "github.com/onsi/gomega/gbytes" 8 . "github.com/onsi/gomega/gexec" 9 ) 10 11 var _ = Describe("proxy", func() { 12 var proxyURL string 13 14 BeforeEach(func() { 15 proxyURL = "127.0.0.1:9999" 16 }) 17 18 Context("V3", func() { 19 It("errors when proxy is not setup properly", func() { 20 session := helpers.CFWithEnv(map[string]string{"https_proxy": proxyURL}, "orgs") 21 Eventually(session.Err).Should(Say("%s.*proxy.*%s", apiURL, proxyURL)) 22 Eventually(session.Err).Should(Say("TIP: If you are behind a firewall and require an HTTP proxy, verify the https_proxy environment variable is correctly set. Else, check your network connection.")) 23 Eventually(session).Should(Exit(1)) 24 }) 25 }) 26 })