diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2020-02-28 08:20:35 +0300 |
---|---|---|
committer | Jaime Martinez <jmartinez@gitlab.com> | 2020-02-28 08:20:35 +0300 |
commit | f3fe8f814537a1761aacec7958af112fc1700a17 (patch) | |
tree | ace0adf5b42857eda32b04cdc123c10840bdb597 | |
parent | 70879969bde8aaf97d5ed97d15b904747a44bfb0 (diff) |
Add golang:1.14 tests in CI and fix GitLab source client test
-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) }) } } |