From 8a77cfcac3570afb977fe71073eabb0a6a2c1f7c Mon Sep 17 00:00:00 2001 From: Tanvir Alam Date: Mon, 23 Oct 2017 12:23:46 -0400 Subject: [PATCH] Swap out bmizerany/assert package that is deprecated in favor of stretchr/testify/assert --- Godeps | 2 +- api/api_test.go | 3 ++- cookie/cookies_test.go | 2 +- env_options_test.go | 2 +- htpasswd_test.go | 2 +- oauthproxy_test.go | 2 +- options_test.go | 2 +- providers/azure_test.go | 3 ++- providers/gitlab_test.go | 2 +- providers/google_test.go | 2 +- providers/internal_util_test.go | 2 +- providers/linkedin_test.go | 3 ++- providers/provider_default_test.go | 2 +- providers/session_state_test.go | 2 +- templates_test.go | 3 ++- 15 files changed, 19 insertions(+), 15 deletions(-) diff --git a/Godeps b/Godeps index efbaf7a..68f4ce6 100644 --- a/Godeps +++ b/Godeps @@ -2,7 +2,7 @@ github.com/18F/hmacauth 1.0.1 github.com/BurntSushi/toml d94612f9fc140360834f9742158c70b5c5b5535b github.com/bitly/go-simplejson da1a8928f709389522c8023062a3739f3b4af419 github.com/mreiferson/go-options 77551d20752b54535462404ad9d877ebdb26e53d -github.com/bmizerany/assert e17e99893cb6509f428e1728281c2ad60a6b31e3 +github.com/stretchr/testify v1.1.4 gopkg.in/fsnotify.v1 v1.2.0 golang.org/x/oauth2 7fdf09982454086d5570c7db3e11f360194830ca golang.org/x/net/context 242b6b35177ec3909636b6cf6a47e8c2c6324b5d diff --git a/api/api_test.go b/api/api_test.go index 515d4da..4f9ae2a 100644 --- a/api/api_test.go +++ b/api/api_test.go @@ -2,12 +2,13 @@ package api import ( "github.com/bitly/go-simplejson" - "github.com/bmizerany/assert" "io/ioutil" "net/http" "net/http/httptest" "strings" "testing" + + "github.com/stretchr/testify/assert" ) func testBackend(response_code int, payload string) *httptest.Server { diff --git a/cookie/cookies_test.go b/cookie/cookies_test.go index 5c4a943..74e78fb 100644 --- a/cookie/cookies_test.go +++ b/cookie/cookies_test.go @@ -4,7 +4,7 @@ import ( "encoding/base64" "testing" - "github.com/bmizerany/assert" + "github.com/stretchr/testify/assert" ) func TestEncodeAndDecodeAccessToken(t *testing.T) { diff --git a/env_options_test.go b/env_options_test.go index 354dc42..e9277f7 100644 --- a/env_options_test.go +++ b/env_options_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - "github.com/bmizerany/assert" + "github.com/stretchr/testify/assert" ) type envTest struct { diff --git a/htpasswd_test.go b/htpasswd_test.go index 5cfc9e6..17ce37b 100644 --- a/htpasswd_test.go +++ b/htpasswd_test.go @@ -2,7 +2,7 @@ package main import ( "bytes" - "github.com/bmizerany/assert" + "github.com/stretchr/testify/assert" "testing" ) diff --git a/oauthproxy_test.go b/oauthproxy_test.go index 43e165a..5e0beeb 100644 --- a/oauthproxy_test.go +++ b/oauthproxy_test.go @@ -17,7 +17,7 @@ import ( "github.com/18F/hmacauth" "github.com/bitly/oauth2_proxy/providers" - "github.com/bmizerany/assert" + "github.com/stretchr/testify/assert" ) func init() { diff --git a/options_test.go b/options_test.go index 07193dd..e1fed8a 100644 --- a/options_test.go +++ b/options_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "github.com/bmizerany/assert" + "github.com/stretchr/testify/assert" ) func testOptions() *Options { diff --git a/providers/azure_test.go b/providers/azure_test.go index 1c25e12..f2cf353 100644 --- a/providers/azure_test.go +++ b/providers/azure_test.go @@ -1,11 +1,12 @@ package providers import ( - "github.com/bmizerany/assert" "net/http" "net/http/httptest" "net/url" "testing" + + "github.com/stretchr/testify/assert" ) func testAzureProvider(hostname string) *AzureProvider { diff --git a/providers/gitlab_test.go b/providers/gitlab_test.go index 54b1052..050b5c4 100644 --- a/providers/gitlab_test.go +++ b/providers/gitlab_test.go @@ -6,7 +6,7 @@ import ( "net/url" "testing" - "github.com/bmizerany/assert" + "github.com/stretchr/testify/assert" ) func testGitLabProvider(hostname string) *GitLabProvider { diff --git a/providers/google_test.go b/providers/google_test.go index 8f9b054..fedd8da 100644 --- a/providers/google_test.go +++ b/providers/google_test.go @@ -8,7 +8,7 @@ import ( "net/url" "testing" - "github.com/bmizerany/assert" + "github.com/stretchr/testify/assert" ) func newRedeemServer(body []byte) (*url.URL, *httptest.Server) { diff --git a/providers/internal_util_test.go b/providers/internal_util_test.go index ccb5ed4..5fe0e8e 100644 --- a/providers/internal_util_test.go +++ b/providers/internal_util_test.go @@ -7,7 +7,7 @@ import ( "net/url" "testing" - "github.com/bmizerany/assert" + "github.com/stretchr/testify/assert" ) type ValidateSessionStateTestProvider struct { diff --git a/providers/linkedin_test.go b/providers/linkedin_test.go index f43c96b..a0d255b 100644 --- a/providers/linkedin_test.go +++ b/providers/linkedin_test.go @@ -1,11 +1,12 @@ package providers import ( - "github.com/bmizerany/assert" "net/http" "net/http/httptest" "net/url" "testing" + + "github.com/stretchr/testify/assert" ) func testLinkedInProvider(hostname string) *LinkedInProvider { diff --git a/providers/provider_default_test.go b/providers/provider_default_test.go index e60aa54..abff0a9 100644 --- a/providers/provider_default_test.go +++ b/providers/provider_default_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/bmizerany/assert" + "github.com/stretchr/testify/assert" ) func TestRefresh(t *testing.T) { diff --git a/providers/session_state_test.go b/providers/session_state_test.go index 6044bae..0cf6d3e 100644 --- a/providers/session_state_test.go +++ b/providers/session_state_test.go @@ -6,7 +6,7 @@ import ( "time" "github.com/bitly/oauth2_proxy/cookie" - "github.com/bmizerany/assert" + "github.com/stretchr/testify/assert" ) const secret = "0123456789abcdefghijklmnopqrstuv" diff --git a/templates_test.go b/templates_test.go index ed4ed70..49e1a9d 100644 --- a/templates_test.go +++ b/templates_test.go @@ -1,8 +1,9 @@ package main import ( - "github.com/bmizerany/assert" "testing" + + "github.com/stretchr/testify/assert" ) func TestTemplatesCompile(t *testing.T) {