diff --git a/src/pkg/oci/common.go b/src/pkg/oci/common.go index 7a60e98642..33d0618f4d 100644 --- a/src/pkg/oci/common.go +++ b/src/pkg/oci/common.go @@ -6,7 +6,6 @@ package oci import ( "context" - "errors" "fmt" "net/http" "strings" @@ -113,7 +112,8 @@ func (o *OrasRemote) withAuthClient(ref registry.Reference) (*auth.Client, error return nil, err } if !cfg.ContainsAuth() { - return nil, errors.New("no docker config file found, run 'zarf tools registry login --help'") + message.Debug("no docker config file found, run 'zarf tools registry login --help'") + return nil, nil } configs := []*configfile.ConfigFile{cfg} diff --git a/src/test/common.go b/src/test/common.go index e538fadf52..9b0af1d26d 100644 --- a/src/test/common.go +++ b/src/test/common.go @@ -15,8 +15,6 @@ import ( "github.com/defenseunicorns/zarf/src/pkg/utils/exec" "github.com/defenseunicorns/zarf/src/pkg/utils/helpers" - dconfig "github.com/docker/cli/cli/config" - "github.com/docker/cli/cli/config/configfile" "github.com/stretchr/testify/require" ) @@ -101,22 +99,11 @@ func (e2e *ZarfE2ETest) GetLogFileContents(t *testing.T, stdErr string) string { } // SetupDockerRegistry uses the host machine's docker daemon to spin up a local registry for testing purposes. -func (e2e *ZarfE2ETest) SetupDockerRegistry(t *testing.T, port int) *configfile.ConfigFile { +func (e2e *ZarfE2ETest) SetupDockerRegistry(t *testing.T, port int) { // spin up a local registry registryImage := "registry:2.8.2" err := exec.CmdWithPrint("docker", "run", "-d", "--restart=always", "-p", fmt.Sprintf("%d:5000", port), "--name", "registry", registryImage) require.NoError(t, err) - - // docker config folder - cfg, err := dconfig.Load(dconfig.Dir()) - require.NoError(t, err) - if !cfg.ContainsAuth() { - // make a docker config file w/ some blank creds - _, _, err := e2e.Zarf("tools", "registry", "login", "--username", "zarf", "-p", "zarf", "localhost:6000") - require.NoError(t, err) - } - - return cfg } // GetZarfVersion returns the current build/zarf version diff --git a/src/test/e2e/52_oci_compose_differential_test.go b/src/test/e2e/52_oci_compose_differential_test.go index 6167221853..78f6c815a8 100644 --- a/src/test/e2e/52_oci_compose_differential_test.go +++ b/src/test/e2e/52_oci_compose_differential_test.go @@ -41,7 +41,7 @@ func (suite *OCIDifferentialSuite) SetupSuite() { differentialPackageName = fmt.Sprintf("zarf-package-podinfo-with-oci-flux-%s-v0.24.0-differential-v0.25.0.tar.zst", e2e.Arch) normalPackageName = fmt.Sprintf("zarf-package-podinfo-with-oci-flux-%s-v0.24.0.tar.zst", e2e.Arch) - _ = e2e.SetupDockerRegistry(suite.T(), 555) + e2e.SetupDockerRegistry(suite.T(), 555) suite.Reference.Registry = "localhost:555" }