|
@@ -42,7 +42,9 @@ func TestValidateEndpointAmbiguousAPIVersion(t *testing.T) {
|
|
})
|
|
})
|
|
|
|
|
|
requireBasicAuthHandlerV2 := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
requireBasicAuthHandlerV2 := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
- w.Header().Add("Docker-Distribution-API-Version", "registry/2.0")
|
|
|
|
|
|
+ // This mock server supports v2.0, v2.1, v42.0, and v100.0
|
|
|
|
+ w.Header().Add("Docker-Distribution-API-Version", "registry/100.0 registry/42.0")
|
|
|
|
+ w.Header().Add("Docker-Distribution-API-Version", "registry/2.0 registry/2.1")
|
|
requireBasicAuthHandler.ServeHTTP(w, r)
|
|
requireBasicAuthHandler.ServeHTTP(w, r)
|
|
})
|
|
})
|
|
|
|
|