Skip to content

Commit

Permalink
e2e: use root and user OCI profiles in action tests
Browse files Browse the repository at this point in the history
Signed-off-by: Edita Kizinevic <edita.kizinevic@cern.ch>
  • Loading branch information
dtrudg authored and edytuk committed Dec 6, 2022
1 parent e85f771 commit 05e807c
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions e2e/actions/oci.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (c actionTests) actionOciRun(t *testing.T) {
c.env.RunApptainer(
t,
e2e.AsSubtest(tt.name),
e2e.WithProfile(e2e.OCIUserProfile),
e2e.WithProfile(profile),
e2e.WithCommand("run"),
// While we don't support args we are entering a /bin/sh interactively.
e2e.ConsoleRun(e2e.ConsoleSendLine("exit")),
Expand Down Expand Up @@ -184,15 +184,19 @@ func (c actionTests) actionOciShell(t *testing.T) {
},
}

for _, tt := range tests {
c.env.RunApptainer(
t,
e2e.AsSubtest(tt.name),
e2e.WithProfile(e2e.OCIUserProfile),
e2e.WithCommand("shell"),
e2e.WithArgs(tt.argv...),
e2e.ConsoleRun(tt.consoleOps...),
e2e.ExpectExit(tt.exit),
)
for _, profile := range []e2e.Profile{e2e.OCIRootProfile, e2e.OCIUserProfile} {
t.Run(profile.String(), func(t *testing.T) {
for _, tt := range tests {
c.env.RunApptainer(
t,
e2e.AsSubtest(tt.name),
e2e.WithProfile(profile),
e2e.WithCommand("shell"),
e2e.WithArgs(tt.argv...),
e2e.ConsoleRun(tt.consoleOps...),
e2e.ExpectExit(tt.exit),
)
}
})
}
}

0 comments on commit 05e807c

Please sign in to comment.