From a78a68a99951c0d905166efec5d994151e9ea68a Mon Sep 17 00:00:00 2001 From: Joe Kutner Date: Mon, 22 May 2023 10:01:16 -0500 Subject: [PATCH] replace deprecated type AuthConfig with dockerregistry Signed-off-by: Joe Kutner --- testhelpers/registry.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/testhelpers/registry.go b/testhelpers/registry.go index 02a7eb60b..6839e6815 100644 --- a/testhelpers/registry.go +++ b/testhelpers/registry.go @@ -14,6 +14,7 @@ import ( dockertypes "github.com/docker/docker/api/types" dockercontainer "github.com/docker/docker/api/types/container" + dockerregistry "github.com/docker/docker/api/types/registry" "github.com/docker/go-connections/nat" "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/plumbing/object" @@ -119,8 +120,8 @@ func waitForRegistryToBeAvailable(t *testing.T, registryConfig *TestRegistryConf } } -func (rc *TestRegistryConfig) AuthConfig() dockertypes.AuthConfig { - return dockertypes.AuthConfig{ +func (rc *TestRegistryConfig) AuthConfig() dockerregistry.AuthConfig { + return dockerregistry.AuthConfig{ Username: rc.username, Password: rc.password, ServerAddress: RegistryHost(rc.RunRegistryHost, rc.RunRegistryPort), @@ -129,7 +130,7 @@ func (rc *TestRegistryConfig) AuthConfig() dockertypes.AuthConfig { func (rc *TestRegistryConfig) Login(t *testing.T, username string, password string) { Eventually(t, func() bool { - _, err := dockerCli(t).RegistryLogin(context.Background(), dockertypes.AuthConfig{ + _, err := dockerCli(t).RegistryLogin(context.Background(), dockerregistry.AuthConfig{ Username: username, Password: password, ServerAddress: RegistryHost(rc.RunRegistryHost, rc.RunRegistryPort),