Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: jason yang <jasonyangshadow@gmail.com>
  • Loading branch information
JasonYangShadow committed Feb 21, 2024
1 parent 00456ec commit 98ff9a0
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions e2e/actions/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -780,21 +780,18 @@ func (c actionTests) PersistentOverlay(t *testing.T) {
e2e.ExpectExit(0),
)

// create centos 7 img
centos7Image := filepath.Join(testdir, "centos7.sif")
c.env.RunApptainer(
t,
e2e.WithProfile(e2e.UserProfile),
e2e.WithCommand("build"),
e2e.WithArgs("--force", centos7Image, "docker://centos:7"),
e2e.ExpectExit(0),
)
// create overlay embeded img
embededSif := filepath.Join(testdir, "embedded.sif")
err = fs.CopyFile(c.env.ImagePath, embededSif, 0o700)
if err != nil {
t.Fatalf("Failed to copy file from %s to %s", c.env.ImagePath, embededSif)
}

c.env.RunApptainer(
t,
e2e.WithProfile(e2e.UserProfile),
e2e.WithCommand("overlay"),
e2e.WithArgs("create", centos7Image),
e2e.WithArgs("create", embededSif),
e2e.ExpectExit(0),
)

Expand Down Expand Up @@ -903,8 +900,8 @@ func (c actionTests) PersistentOverlay(t *testing.T) {
exit: 0,
},
{
name: "centos 7 Embedded overlay partition in SIF",
argv: []string{centos7Image, "ps"},
name: "Embedded overlay partition in SIF",
argv: []string{embededSif, "ps"},
exit: 0,
},
}
Expand Down

0 comments on commit 98ff9a0

Please sign in to comment.