diff options
| author | Sebastiaan van Stijn <github@gone.nl> | 2022-06-03 13:48:58 +0200 |
|---|---|---|
| committer | Sebastiaan van Stijn <github@gone.nl> | 2022-07-29 23:05:22 +0200 |
| commit | e3a7a1c6ae2fa596cf1533a7325aac041f2e4a23 (patch) | |
| tree | df8b91b26c953d9142005298035f643ae1201533 /client | |
| parent | 360d38adb16921e85670cfd83c67237f16475aa7 (diff) | |
| download | docker-e3a7a1c6ae2fa596cf1533a7325aac041f2e4a23.tar.gz | |
client: linting: fix "invalid auth header" error
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'client')
| -rw-r--r-- | client/image_pull_test.go | 4 | ||||
| -rw-r--r-- | client/image_push_test.go | 2 | ||||
| -rw-r--r-- | client/image_search_test.go | 2 | ||||
| -rw-r--r-- | client/plugin_push_test.go | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/client/image_pull_test.go b/client/image_pull_test.go index ebb9d9a4ad..a35e38b018 100644 --- a/client/image_pull_test.go +++ b/client/image_pull_test.go @@ -82,7 +82,7 @@ func TestImagePullWithPrivilegedFuncNoError(t *testing.T) { client := &Client{ client: newMockClient(func(req *http.Request) (*http.Response, error) { if !strings.HasPrefix(req.URL.Path, expectedURL) { - return nil, fmt.Errorf("Expected URL '%s', got '%s'", expectedURL, req.URL) + return nil, fmt.Errorf("expected URL '%s', got '%s'", expectedURL, req.URL) } auth := req.Header.Get(registry.AuthHeader) if auth == "NotValid" { @@ -92,7 +92,7 @@ func TestImagePullWithPrivilegedFuncNoError(t *testing.T) { }, nil } if auth != "IAmValid" { - return nil, fmt.Errorf("Invalid auth header : expected %s, got %s", "IAmValid", auth) + return nil, fmt.Errorf("invalid auth header: expected %s, got %s", "IAmValid", auth) } query := req.URL.Query() fromImage := query.Get("fromImage") diff --git a/client/image_push_test.go b/client/image_push_test.go index bd4b0b2fe3..ebf61572b7 100644 --- a/client/image_push_test.go +++ b/client/image_push_test.go @@ -97,7 +97,7 @@ func TestImagePushWithPrivilegedFuncNoError(t *testing.T) { }, nil } if auth != "IAmValid" { - return nil, fmt.Errorf("Invalid auth header : expected %s, got %s", "IAmValid", auth) + return nil, fmt.Errorf("invalid auth header: expected %s, got %s", "IAmValid", auth) } query := req.URL.Query() tag := query.Get("tag") diff --git a/client/image_search_test.go b/client/image_search_test.go index ef1923b806..56e5c7c2cb 100644 --- a/client/image_search_test.go +++ b/client/image_search_test.go @@ -81,7 +81,7 @@ func TestImageSearchWithPrivilegedFuncNoError(t *testing.T) { }, nil } if auth != "IAmValid" { - return nil, fmt.Errorf("Invalid auth header : expected 'IAmValid', got %s", auth) + return nil, fmt.Errorf("invalid auth header: expected 'IAmValid', got %s", auth) } query := req.URL.Query() term := query.Get("term") diff --git a/client/plugin_push_test.go b/client/plugin_push_test.go index 721bd72512..ba49211f3c 100644 --- a/client/plugin_push_test.go +++ b/client/plugin_push_test.go @@ -37,7 +37,7 @@ func TestPluginPush(t *testing.T) { } auth := req.Header.Get(registry.AuthHeader) if auth != "authtoken" { - return nil, fmt.Errorf("invalid auth header : expected 'authtoken', got %s", auth) + return nil, fmt.Errorf("invalid auth header: expected 'authtoken', got %s", auth) } return &http.Response{ StatusCode: http.StatusOK, |
