Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove build \!remote flags from test #8170

Merged
merged 1 commit into from
Nov 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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