e2e: use isRootless() instead of rootless.IsRootless()

Unify the functions used to detect rootless to "isRootless()".
This function can detect to join the user namespace by mistake.

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
This commit is contained in:
Toshiki Sonoda
2023-01-18 10:34:51 +09:00
parent cdcd2eddc7
commit 17b5bd758d
19 changed files with 48 additions and 60 deletions

View File

@ -7,7 +7,6 @@ import (
"path/filepath"
"strings"
"github.com/containers/podman/v4/pkg/rootless"
. "github.com/containers/podman/v4/test/utils"
"github.com/containers/storage/pkg/archive"
. "github.com/onsi/ginkgo"
@ -99,7 +98,7 @@ var _ = Describe("Podman push", func() {
if podmanTest.Host.Arch == "ppc64le" {
Skip("No registry image for ppc64le")
}
if rootless.IsRootless() {
if isRootless() {
err := podmanTest.RestoreArtifact(REGISTRY_IMAGE)
Expect(err).ToNot(HaveOccurred())
}