don't test oauth-server using http1.1 in proxied environment
golang.org/x/net/http2 does not implement proxied HTTP2 calls
@@ -30,6 +30,11 @@ var _ = g.Describe("[sig-auth][Feature:OAuthServer] OAuth server", func() {
req, err := http.NewRequest(http.MethodHead, metadata.Issuer, nil)
o.Expect(err).NotTo(o.HaveOccurred())
+ // there is no HTTP2 proxying implemented in golang, skip
+ if url, _ := http.ProxyFromEnvironment(req); url != nil {
+ g.Skip("this test does not run in proxied environment")
+ }
+
_, err = rt.RoundTrip(req)
o.Expect(err).NotTo(o.BeNil(), "http2 only request to OAuth server should fail")
o.Expect(err.Error()).To(o.Equal(`http2: unexpected ALPN protocol ""; want "h2"`))
