From b884b36f26712b64220c1df2ae5774b526b9e974 Mon Sep 17 00:00:00 2001 From: Jehiah Czebotar Date: Wed, 22 Mar 2017 23:18:34 -0400 Subject: [PATCH] bump easy pkg upgrades; drop Go 1.6 (no httptest.NewRequest) This fixes a test w request signing due to a content-length:0 header from Go 1.8 --- .travis.yml | 1 - Godeps | 6 +++--- oauthproxy_test.go | 8 ++------ 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 30f4526..c0db4d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: go go: - - 1.6.4 - 1.7.5 - 1.8 script: diff --git a/Godeps b/Godeps index 45633c0..f38ce25 100644 --- a/Godeps +++ b/Godeps @@ -1,7 +1,7 @@ github.com/18F/hmacauth 1.0.1 -github.com/BurntSushi/toml 3883ac1ce943878302255f538fce319d23226223 -github.com/bitly/go-simplejson 3378bdcb5cebedcbf8b5750edee28010f128fe24 -github.com/mreiferson/go-options 33795234b6f327f1be2d78a541893012362a4e06 +github.com/BurntSushi/toml d94612f9fc140360834f9742158c70b5c5b5535b +github.com/bitly/go-simplejson da1a8928f709389522c8023062a3739f3b4af419 +github.com/mreiferson/go-options 77551d20752b54535462404ad9d877ebdb26e53d github.com/bmizerany/assert e17e99893cb6509f428e1728281c2ad60a6b31e3 gopkg.in/fsnotify.v1 v1.2.0 golang.org/x/oauth2 04e1573abc896e70388bd387a69753c378d46466 diff --git a/oauthproxy_test.go b/oauthproxy_test.go index 59a0ada..00bf4e8 100644 --- a/oauthproxy_test.go +++ b/oauthproxy_test.go @@ -599,8 +599,7 @@ type SignatureAuthenticator struct { auth hmacauth.HmacAuth } -func (v *SignatureAuthenticator) Authenticate( - w http.ResponseWriter, r *http.Request) { +func (v *SignatureAuthenticator) Authenticate(w http.ResponseWriter, r *http.Request) { result, headerSig, computedSig := v.auth.AuthenticateRequest(r) if result == hmacauth.ResultNoSignature { w.Write([]byte("no signature received")) @@ -688,10 +687,7 @@ func (st *SignatureTest) MakeRequestWithExpectedKey(method, body, key string) { if body != "" { bodyBuf = ioutil.NopCloser(&fakeNetConn{reqBody: body}) } - req, err := http.NewRequest(method, "/foo/bar", bodyBuf) - if err != nil { - panic(err) - } + req := httptest.NewRequest(method, "/foo/bar", bodyBuf) req.Header = st.header state := &providers.SessionState{