diff --git a/cli/command/image/trust_test.go b/cli/command/image/trust_test.go index 59e58e193e..1846ceba37 100644 --- a/cli/command/image/trust_test.go +++ b/cli/command/image/trust_test.go @@ -5,11 +5,10 @@ import ( "github.com/docker/cli/cli/trust" registrytypes "github.com/docker/docker/api/types/registry" - "gotest.tools/v3/env" ) func TestENVTrustServer(t *testing.T) { - env.PatchAll(t, map[string]string{"DOCKER_CONTENT_TRUST_SERVER": "https://notary-test.example.com:5000"}) + t.Setenv("DOCKER_CONTENT_TRUST_SERVER", "https://notary-test.example.com:5000") indexInfo := ®istrytypes.IndexInfo{Name: "testserver"} output, err := trust.Server(indexInfo) expectedStr := "https://notary-test.example.com:5000" @@ -19,7 +18,7 @@ func TestENVTrustServer(t *testing.T) { } func TestHTTPENVTrustServer(t *testing.T) { - env.PatchAll(t, map[string]string{"DOCKER_CONTENT_TRUST_SERVER": "http://notary-test.example.com:5000"}) + t.Setenv("DOCKER_CONTENT_TRUST_SERVER", "http://notary-test.example.com:5000") indexInfo := ®istrytypes.IndexInfo{Name: "testserver"} _, err := trust.Server(indexInfo) if err == nil {