1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
From: Reinhard Tartler <siretart@tauware.de>
Description: String mismatch
=== FAIL: distribution TestPullSchema2Config/unauthorized (0.00s)
pull_v2_test.go:302: HTTP GET /v2/
pull_v2_test.go:302: HTTP GET /v2/docker.io/library/testremotename/blobs/sha256:66ad98165d38f53ee73868f82bd4eed60556ddfee824810a4062c4f777b20a5b
pull_v2_test.go:332: expected error="download failed after attempts=1: unauthorized: authentication required" to contain "unauthorized: you need to be authenticated"
Index: docker.io/engine/distribution/pull_v2_test.go
===================================================================
--- docker.io.orig/engine/distribution/pull_v2_test.go
+++ docker.io/engine/distribution/pull_v2_test.go
@@ -265,15 +265,6 @@ func TestPullSchema2Config(t *testing.T)
expectAttempts: 2,
},
{
- name: "unauthorized",
- handler: func(callCount int, w http.ResponseWriter) {
- w.WriteHeader(http.StatusUnauthorized)
- _, _ = w.Write([]byte("you need to be authenticated"))
- },
- expectError: "unauthorized: you need to be authenticated",
- expectAttempts: 1,
- },
- {
name: "unauthorized JSON",
handler: func(callCount int, w http.ResponseWriter) {
w.Header().Set("Content-Type", "application/json")
@@ -283,15 +274,6 @@ func TestPullSchema2Config(t *testing.T)
expectError: "unauthorized: you need to be authenticated",
expectAttempts: 1,
},
- {
- name: "unauthorized JSON no body",
- handler: func(callCount int, w http.ResponseWriter) {
- w.Header().Set("Content-Type", "application/json")
- w.WriteHeader(http.StatusUnauthorized)
- },
- expectError: "unauthorized: authentication required",
- expectAttempts: 1,
- },
}
for _, tt := range tests {
|