Skip to content

Commit

Permalink
Merge pull request #8170 from rhatdan/remote
Browse files Browse the repository at this point in the history
Remove build \!remote flags from test
  • Loading branch information
openshift-merge-robot authored Nov 18, 2020
2 parents 6f44d2d + 080ccf5 commit 8672c4d
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 17 deletions.
3 changes: 1 addition & 2 deletions test/e2e/checkpoint_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build !remote

package integration

import (
Expand Down Expand Up @@ -27,6 +25,7 @@ var _ = Describe("Podman checkpoint", func() {
)

BeforeEach(func() {
SkipIfRemote("checkpoint not supported in remote mode")
SkipIfRootless("checkpoint not supported in rootless mode")
tempdir, err = CreateTempDirInTempDir()
if err != nil {
Expand Down
17 changes: 13 additions & 4 deletions test/e2e/containers_conf_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build !remote

package integration

import (
Expand Down Expand Up @@ -31,6 +29,10 @@ var _ = Describe("Podman run", func() {
podmanTest.Setup()
podmanTest.SeedImages()
os.Setenv("CONTAINERS_CONF", "config/containers.conf")
if IsRemote() {
podmanTest.RestartRemoteService()
}

})

AfterEach(func() {
Expand Down Expand Up @@ -80,20 +82,21 @@ var _ = Describe("Podman run", func() {
})

It("podman Capabilities in containers.conf", func() {
os.Setenv("CONTAINERS_CONF", "config/containers.conf")
cap := podmanTest.Podman([]string{"run", ALPINE, "grep", "CapEff", "/proc/self/status"})
cap.WaitWithDefaultTimeout()
Expect(cap.ExitCode()).To(Equal(0))

os.Setenv("CONTAINERS_CONF", "config/containers-ns.conf")
if IsRemote() {
podmanTest.RestartRemoteService()
}
session := podmanTest.Podman([]string{"run", "busybox", "grep", "CapEff", "/proc/self/status"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
Expect(session.OutputToString()).ToNot(Equal(cap.OutputToString()))
})

It("podman Regular capabilities", func() {
os.Setenv("CONTAINERS_CONF", "config/containers.conf")
setup := podmanTest.RunTopContainer("test1")
setup.WaitWithDefaultTimeout()
result := podmanTest.Podman([]string{"top", "test1", "capeff"})
Expand All @@ -105,6 +108,9 @@ var _ = Describe("Podman run", func() {

It("podman drop capabilities", func() {
os.Setenv("CONTAINERS_CONF", "config/containers-caps.conf")
if IsRemote() {
podmanTest.RestartRemoteService()
}
setup := podmanTest.RunTopContainer("test1")
setup.WaitWithDefaultTimeout()
result := podmanTest.Podman([]string{"container", "top", "test1", "capeff"})
Expand All @@ -116,6 +122,9 @@ var _ = Describe("Podman run", func() {

verifyNSHandling := func(nspath, option string) {
os.Setenv("CONTAINERS_CONF", "config/containers-ns.conf")
if IsRemote() {
podmanTest.RestartRemoteService()
}
//containers.conf default ipcns to default to host
session := podmanTest.Podman([]string{"run", ALPINE, "ls", "-l", nspath})
session.WaitWithDefaultTimeout()
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/cp_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build !remote

package integration

import (
Expand All @@ -22,6 +20,7 @@ var _ = Describe("Podman cp", func() {
)

BeforeEach(func() {
SkipIfRemote("FIXME: Podman-remote cp needs to work")
tempdir, err = CreateTempDirInTempDir()
if err != nil {
os.Exit(1)
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/image_sign_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build !remote

package integration

import (
Expand All @@ -21,6 +19,7 @@ var _ = Describe("Podman image sign", func() {
)

BeforeEach(func() {
SkipIfRemote("podman-remote image sign is not supported")
tempdir, err = CreateTempDirInTempDir()
if err != nil {
os.Exit(1)
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/import_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build !remote

package integration

import (
Expand All @@ -19,6 +17,7 @@ var _ = Describe("Podman import", func() {
)

BeforeEach(func() {
SkipIfRemote("FIXME: These look like it is supposed to work in remote")
tempdir, err = CreateTempDirInTempDir()
if err != nil {
os.Exit(1)
Expand Down
7 changes: 2 additions & 5 deletions test/e2e/mount_rootless_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build !remote

package integration

import (
Expand All @@ -18,9 +16,8 @@ var _ = Describe("Podman mount", func() {
)

BeforeEach(func() {
if os.Geteuid() == 0 {
Skip("This function is not enabled for rootfull podman")
}
SkipIfNotRootless("This function is not enabled for rootfull podman")
SkipIfRemote("Podman mount not supported for remote connections")
tempdir, err = CreateTempDirInTempDir()
if err != nil {
os.Exit(1)
Expand Down

0 comments on commit 8672c4d

Please sign in to comment.