Skip to content

Commit

Permalink
Fix TestRegistryAsCacheMutationAPIs
Browse files Browse the repository at this point in the history
Use a synthetic upstream registry when creating the testing mirror configuration
to avoid the test fail when trying to reach http://example.com

Signed-off-by: Fernando Mayo Fernandez <fernando@undefinedlabs.com>
  • Loading branch information
fermayo committed Dec 15, 2019
1 parent f187812 commit 6ca7b9e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion registry/handlers/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2012,6 +2012,7 @@ type testEnv struct {
}

func newTestEnvMirror(t *testing.T, deleteEnabled bool) *testEnv {
upstreamEnv := newTestEnv(t, deleteEnabled)
config := configuration.Configuration{
Storage: configuration.Storage{
"testdriver": configuration.Parameters{},
Expand All @@ -2021,7 +2022,7 @@ func newTestEnvMirror(t *testing.T, deleteEnabled bool) *testEnv {
}},
},
Proxy: configuration.Proxy{
RemoteURL: "http://example.com",
RemoteURL: upstreamEnv.server.URL,
},
}
config.Compatibility.Schema1.Enabled = true
Expand Down

0 comments on commit 6ca7b9e

Please sign in to comment.