Skip to content

Commit

Permalink
replace deprecated type AuthConfig with dockerregistry
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Kutner <jpkutner@gmail.com>
  • Loading branch information
jkutner committed May 22, 2023
1 parent ef4cf9e commit a78a68a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions testhelpers/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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),
Expand All @@ -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),
Expand Down

0 comments on commit a78a68a

Please sign in to comment.