diff --git a/e2e/internal/e2e/image.go b/e2e/internal/e2e/image.go index d9d2e4780d..cd4c55ac34 100644 --- a/e2e/internal/e2e/image.go +++ b/e2e/internal/e2e/image.go @@ -348,9 +348,9 @@ func EnsureOCISIF(t *testing.T, env TestEnv) { env.RunSingularity( t, - WithProfile(UserProfile), + WithProfile(OCIUserProfile), WithCommand("pull"), - WithArgs("--oci", "--no-https", env.OCISIFPath, env.TestRegistryImage), + WithArgs("--no-https", env.OCISIFPath, env.TestRegistryImage), ExpectExit(0), ) } diff --git a/e2e/pull/pull.go b/e2e/pull/pull.go index 3870700449..2a1b8a194e 100644 --- a/e2e/pull/pull.go +++ b/e2e/pull/pull.go @@ -105,10 +105,6 @@ func (c *ctx) imagePull(t *testing.T, tt testStruct) { argv += "--library " + tt.library + " " } - if tt.oci { - argv += "--oci " - } - if tt.keepLayers { argv += "--keep-layers " } @@ -131,9 +127,14 @@ func (c *ctx) imagePull(t *testing.T, tt testStruct) { argv += tt.srcURI + profile := e2e.UserProfile + if tt.oci { + profile = e2e.OCIUserProfile + } + c.env.RunSingularity( t, - e2e.WithProfile(e2e.UserProfile), + e2e.WithProfile(profile), e2e.WithEnv(tt.envVars), e2e.WithDir(tt.workDir), e2e.WithCommand("pull"), diff --git a/e2e/registry/registry.go b/e2e/registry/registry.go index 2495576e4e..d3207ae132 100644 --- a/e2e/registry/registry.go +++ b/e2e/registry/registry.go @@ -326,6 +326,7 @@ func (c ctx) registryAuthTester(t *testing.T, withCustomAuthFile bool) { name string cmd string args []string + oci bool whileLoggedIn bool expectExit int }{ @@ -353,7 +354,8 @@ func (c ctx) registryAuthTester(t *testing.T, withCustomAuthFile bool) { { name: "docker pull ocisif", cmd: "pull", - args: []string{"-F", "--oci", "--disable-cache", "--no-https", c.env.TestRegistryPrivImage}, + args: []string{"-F", "--disable-cache", "--no-https", c.env.TestRegistryPrivImage}, + oci: true, whileLoggedIn: true, expectExit: 0, }, @@ -407,10 +409,16 @@ func (c ctx) registryAuthTester(t *testing.T, withCustomAuthFile bool) { } else { e2e.PrivateRepoLogout(t, c.env, e2e.UserProfile, localAuthFileName) } + + profile := e2e.UserProfile + if tt.oci { + profile = e2e.OCIUserProfile + } + c.env.RunSingularity( t, e2e.AsSubtest(tt.name), - e2e.WithProfile(e2e.UserProfile), + e2e.WithProfile(profile), e2e.WithCommand(tt.cmd), e2e.WithArgs(append(authFileArgs, tt.args...)...), e2e.ExpectExit(tt.expectExit),