diff options
Diffstat (limited to 'workhorse/internal/api/api_test.go')
-rw-r--r-- | workhorse/internal/api/api_test.go | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/workhorse/internal/api/api_test.go b/workhorse/internal/api/api_test.go index 5ab677c4233..43e3604cc9c 100644 --- a/workhorse/internal/api/api_test.go +++ b/workhorse/internal/api/api_test.go @@ -9,28 +9,27 @@ import ( "testing" "github.com/stretchr/testify/require" + "gitlab.com/gitlab-org/labkit/log" - "gitlab.com/gitlab-org/gitlab-workhorse/internal/helper" - "gitlab.com/gitlab-org/gitlab-workhorse/internal/secret" - "gitlab.com/gitlab-org/gitlab-workhorse/internal/testhelper" - "gitlab.com/gitlab-org/gitlab-workhorse/internal/upstream/roundtripper" + "gitlab.com/gitlab-org/gitlab/workhorse/internal/helper" + "gitlab.com/gitlab-org/gitlab/workhorse/internal/secret" + "gitlab.com/gitlab-org/gitlab/workhorse/internal/testhelper" + "gitlab.com/gitlab-org/gitlab/workhorse/internal/upstream/roundtripper" ) func TestGetGeoProxyURLWhenGeoSecondary(t *testing.T) { geoProxyURL, err := getGeoProxyURLGivenResponse(t, `{"geo_proxy_url":"http://primary"}`) require.NoError(t, err) - require.NotNil(t, geoProxyURL) require.Equal(t, "http://primary", geoProxyURL.String()) } func TestGetGeoProxyURLWhenGeoPrimaryOrNonGeo(t *testing.T) { geoProxyURL, err := getGeoProxyURLGivenResponse(t, "{}") - require.Error(t, err) - require.Equal(t, ErrNotGeoSecondary, err) - require.Nil(t, geoProxyURL) + require.NoError(t, err) + require.Equal(t, "", geoProxyURL.String()) } func getGeoProxyURLGivenResponse(t *testing.T, givenInternalApiResponse string) (*url.URL, error) { |