mirror of
https://github.com/containers/podman.git
synced 2025-06-23 10:38:20 +08:00
test/e2e: do not call setenforce
We should not change selinux, in a parallel context this can change the behavior of other tests and we should never disable selinux anyway. Lets see if this passes CI or not. Fixes #18564 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -26,24 +26,10 @@ var _ = Describe("Podman login and logout", func() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
|
|
||||||
authPath = filepath.Join(podmanTest.TempDir, "auth")
|
authPath = filepath.Join(podmanTest.TempDir, "auth")
|
||||||
err := os.Mkdir(authPath, os.ModePerm)
|
err := os.Mkdir(authPath, os.ModePerm)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
|
|
||||||
if IsCommandAvailable("getenforce") {
|
|
||||||
ge := SystemExec("getenforce", []string{})
|
|
||||||
ge.WaitWithDefaultTimeout()
|
|
||||||
if ge.OutputToString() == "Enforcing" {
|
|
||||||
se := SystemExec("setenforce", []string{"0"})
|
|
||||||
se.WaitWithDefaultTimeout()
|
|
||||||
if se.ExitCode() != 0 {
|
|
||||||
Skip("Cannot disable selinux, this may cause problem for reading cert files inside container.")
|
|
||||||
}
|
|
||||||
defer SystemExec("setenforce", []string{"1"})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
htpasswd := SystemExec("htpasswd", []string{"-Bbn", "podmantest", "test"})
|
htpasswd := SystemExec("htpasswd", []string{"-Bbn", "podmantest", "test"})
|
||||||
htpasswd.WaitWithDefaultTimeout()
|
htpasswd.WaitWithDefaultTimeout()
|
||||||
Expect(htpasswd).Should(Exit(0))
|
Expect(htpasswd).Should(Exit(0))
|
||||||
|
@ -209,7 +209,7 @@ var _ = Describe("Podman push", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("podman push to local registry with authorization", func() {
|
It("podman push to local registry with authorization", func() {
|
||||||
SkipIfRootless("volume-mounting a certs.d file N/A over remote")
|
SkipIfRootless("/etc/containers/certs.d not writable")
|
||||||
if podmanTest.Host.Arch == "ppc64le" {
|
if podmanTest.Host.Arch == "ppc64le" {
|
||||||
Skip("No registry image for ppc64le")
|
Skip("No registry image for ppc64le")
|
||||||
}
|
}
|
||||||
@ -223,18 +223,6 @@ var _ = Describe("Podman push", func() {
|
|||||||
cwd, _ := os.Getwd()
|
cwd, _ := os.Getwd()
|
||||||
certPath := filepath.Join(cwd, "../", "certs")
|
certPath := filepath.Join(cwd, "../", "certs")
|
||||||
|
|
||||||
if IsCommandAvailable("getenforce") {
|
|
||||||
ge := SystemExec("getenforce", []string{})
|
|
||||||
Expect(ge).Should(Exit(0))
|
|
||||||
if ge.OutputToString() == "Enforcing" {
|
|
||||||
se := SystemExec("setenforce", []string{"0"})
|
|
||||||
Expect(se).Should(Exit(0))
|
|
||||||
defer func() {
|
|
||||||
se2 := SystemExec("setenforce", []string{"1"})
|
|
||||||
Expect(se2).Should(Exit(0))
|
|
||||||
}()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
lock := GetPortLock("5000")
|
lock := GetPortLock("5000")
|
||||||
defer lock.Unlock()
|
defer lock.Unlock()
|
||||||
htpasswd := SystemExec("htpasswd", []string{"-Bbn", "podmantest", "test"})
|
htpasswd := SystemExec("htpasswd", []string{"-Bbn", "podmantest", "test"})
|
||||||
|
Reference in New Issue
Block a user