|
@@ -19,8 +19,9 @@ import (
|
|
|
)
|
|
|
|
|
|
var (
|
|
|
- testHTTPServer *httptest.Server
|
|
|
- testLayers = map[string]map[string]string{
|
|
|
+ testHTTPServer *httptest.Server
|
|
|
+ insecureRegistries []string
|
|
|
+ testLayers = map[string]map[string]string{
|
|
|
"77dbf71da1d00e3fbddc480176eac8994025630c6590d11cfc8fe1209c2a1d20": {
|
|
|
"json": `{"id":"77dbf71da1d00e3fbddc480176eac8994025630c6590d11cfc8fe1209c2a1d20",
|
|
|
"comment":"test base image","created":"2013-03-23T12:53:11.10432-07:00",
|
|
@@ -100,6 +101,11 @@ func init() {
|
|
|
r.HandleFunc("/v2/version", handlerGetPing).Methods("GET")
|
|
|
|
|
|
testHTTPServer = httptest.NewServer(handlerAccessLog(r))
|
|
|
+ URL, err := url.Parse(testHTTPServer.URL)
|
|
|
+ if err != nil {
|
|
|
+ panic(err)
|
|
|
+ }
|
|
|
+ insecureRegistries = []string{URL.Host}
|
|
|
}
|
|
|
|
|
|
func handlerAccessLog(handler http.Handler) http.Handler {
|