diff options
author | Vladimir Shushlin <vshushlin@gitlab.com> | 2020-03-05 13:59:47 +0300 |
---|---|---|
committer | Vladimir Shushlin <vshushlin@gitlab.com> | 2020-03-05 13:59:47 +0300 |
commit | a5684f7a9759489b32d2ea3d795c38aafa4b6f06 (patch) | |
tree | 62ceb39ee1a0b78258fc65b9e5d6425781002ecb | |
parent | fda9c63431b0a75befb13e5254154ca658f53a8c (diff) | |
parent | f3fe8f814537a1761aacec7958af112fc1700a17 (diff) |
Merge branch 'support-go-1-14' into 'master'
Add golang:1.14 tests in CI and fix GitLab source client test
See merge request gitlab-org/gitlab-pages!250
-rw-r--r-- | .gitlab-ci.yml | 4 | ||||
-rw-r--r-- | internal/source/gitlab/client/client_test.go | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fe193eb6..e896d586 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -75,6 +75,10 @@ test:1.13: extends: .tests image: golang:1.13 +test:1.14: + extends: .tests + image: golang:1.14 + race: extends: .go-mod-cache stage: test diff --git a/internal/source/gitlab/client/client_test.go b/internal/source/gitlab/client/client_test.go index bdfbe6b0..58729153 100644 --- a/internal/source/gitlab/client/client_test.go +++ b/internal/source/gitlab/client/client_test.go @@ -38,7 +38,6 @@ func TestNewInvalidConfiguration(t *testing.T) { args args wantErrMsg string }{ - { name: "invalid_api_url", args: args{ @@ -47,7 +46,7 @@ func TestNewInvalidConfiguration(t *testing.T) { connectionTimeout: defaultClientConnTimeout, jwtTokenExpiry: defaultJWTTokenExpiry, }, - wantErrMsg: "parse %: invalid URL escape \"%\"", + wantErrMsg: "invalid URL escape \"%\"", }, { name: "invalid_api_url_empty", @@ -92,10 +91,10 @@ func TestNewInvalidConfiguration(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got, err := NewClient(tt.args.baseURL, tt.args.secretKey, tt.args.connectionTimeout, tt.args.jwtTokenExpiry) require.Nil(t, got) - require.EqualError(t, err, tt.wantErrMsg) + require.NotNil(t, err) + require.Contains(t, err.Error(), tt.wantErrMsg) }) } } |