diff options
author | openshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com> | 2022-06-29 19:32:26 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-29 19:32:26 +0000 |
commit | d6cdb996bce10eb050e41b2050aaf52d9bfd3bd0 (patch) | |
tree | 1d1f7c41596c1af686f51a8bca4711f43197ad89 /test | |
parent | 35aa994d124675a039c89f65fb4b1c684b79b89e (diff) | |
parent | d9ff0fd15da268fae9744a60522ecdf94744b74a (diff) | |
download | podman-d6cdb996bce10eb050e41b2050aaf52d9bfd3bd0.tar.gz podman-d6cdb996bce10eb050e41b2050aaf52d9bfd3bd0.tar.bz2 podman-d6cdb996bce10eb050e41b2050aaf52d9bfd3bd0.zip |
Merge pull request #14706 from ashley-cui/rootmach
Only allow Rootless runs of Podman Machine
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/system_reset_test.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/e2e/system_reset_test.go b/test/e2e/system_reset_test.go index 28f2e25ca..075ea435c 100644 --- a/test/e2e/system_reset_test.go +++ b/test/e2e/system_reset_test.go @@ -4,6 +4,7 @@ import ( "fmt" "os" + "github.com/containers/podman/v4/pkg/rootless" . "github.com/containers/podman/v4/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -92,9 +93,12 @@ var _ = Describe("podman system reset", func() { // TODO: machine tests currently don't run outside of the machine test pkg // no machines are created here to cleanup - session = podmanTest.Podman([]string{"machine", "list", "-q"}) - session.WaitWithDefaultTimeout() - Expect(session).Should(Exit(0)) - Expect(session.OutputToStringArray()).To(BeEmpty()) + // machine commands are rootless only + if rootless.IsRootless() { + session = podmanTest.Podman([]string{"machine", "list", "-q"}) + session.WaitWithDefaultTimeout() + Expect(session).Should(Exit(0)) + Expect(session.OutputToStringArray()).To(BeEmpty()) + } }) }) |