1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-07-13 01:40:48 +02:00

Support Go 1.14 (#419)

* Upgrade base image tags and golangci-lint

* Upgrade golang and golangci-lint in travis-ci

* fix:  tests, pointed out by golangci-lint and format files

* Upgrade dependencies

* update changelog

* fix: tests related to https://github.com/pusher/oauth2_proxy/pull/418

* Separate tests using go version build tags

* Update CHANGELOG

* Revert "Separate tests using go version build tags"

This reverts commit 9b7e65eb90cae954dc7b6316345d3207205d488a.

* fix test to support go1.14 and go1.13

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
This commit is contained in:
Mitsuo Heijo
2020-03-14 19:14:15 +09:00
committed by GitHub
parent 400aea3653
commit 81b9a63e51
11 changed files with 90 additions and 77 deletions

View File

@ -13,9 +13,11 @@ import (
"github.com/stretchr/testify/assert"
)
const cookieSecret = "foobar"
const clientID = "bazquux"
const clientSecret = "xyzzyplugh"
const (
cookieSecret = "foobar"
clientID = "bazquux"
clientSecret = "xyzzyplugh"
)
func testOptions() *Options {
o := NewOptions()
@ -154,11 +156,7 @@ func TestProxyURLsError(t *testing.T) {
o.Upstreams = append(o.Upstreams, "127.0.0.1:8081")
err := o.Validate()
assert.NotEqual(t, nil, err)
expected := errorMsg([]string{
"error parsing upstream: parse 127.0.0.1:8081: " +
"first path segment in URL cannot contain colon"})
assert.Equal(t, expected, err.Error())
assert.Contains(t, err.Error(), "error parsing upstream")
}
func TestCompiledRegex(t *testing.T) {