github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+incompatible/integration/v6/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("V2", 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/v2/info.*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 })