Examine all SkipIfRemote functions

Remove ones that are not needed.
Document those that should be there.
Document those that should be fixed.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2020-09-22 10:08:28 -04:00
parent a8917996c4
commit a277b7eb0b
49 changed files with 132 additions and 137 deletions

View File

@ -38,7 +38,6 @@ var _ = Describe("Podman build", func() {
// Let's first do the most simple build possible to make sure stuff is
// happy and then clean up after ourselves to make sure that works too.
It("podman build and remove basic alpine", func() {
SkipIfRemote()
session := podmanTest.PodmanNoCache([]string{"build", "build/basicalpine"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@ -58,7 +57,6 @@ var _ = Describe("Podman build", func() {
})
It("podman build with logfile", func() {
SkipIfRemote()
logfile := filepath.Join(podmanTest.TempDir, "logfile")
session := podmanTest.PodmanNoCache([]string{"build", "--tag", "test", "--logfile", logfile, "build/basicalpine"})
session.WaitWithDefaultTimeout()
@ -91,7 +89,7 @@ var _ = Describe("Podman build", func() {
// Check that builds with different values for the squash options
// create the appropriate number of layers, then clean up after.
It("podman build basic alpine with squash", func() {
SkipIfRemote()
SkipIfRemote() // FIXME: This is broken should be fixed
session := podmanTest.PodmanNoCache([]string{"build", "-f", "build/squash/Dockerfile.squash-a", "-t", "test-squash-a:latest", "build/squash"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@ -223,7 +221,7 @@ var _ = Describe("Podman build", func() {
})
It("podman build --http_proxy flag", func() {
SkipIfRemote()
SkipIfRemote() // FIXME: This is broken should be fixed
os.Setenv("http_proxy", "1.2.3.4")
podmanTest.RestoreAllArtifacts()
dockerfile := `FROM docker.io/library/alpine:latest

View File

@ -210,7 +210,7 @@ var _ = Describe("Podman commit", func() {
It("podman commit with volume mounts and --include-volumes", func() {
// We need to figure out how volumes are going to work correctly with the remote
// client. This does not currently work.
SkipIfRemote()
SkipIfRemote() // --testing Remote Volumes
s := podmanTest.Podman([]string{"run", "--name", "test1", "-v", "/tmp:/foo", "alpine", "date"})
s.WaitWithDefaultTimeout()
Expect(s.ExitCode()).To(Equal(0))

View File

@ -141,7 +141,7 @@ var _ = Describe("Podman cp", func() {
})
It("podman cp stdin/stdout", func() {
SkipIfRemote()
SkipIfRemote() // podman-remote cp not implemented yet
session := podmanTest.Podman([]string{"create", ALPINE, "ls", "foo"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))

View File

@ -67,13 +67,14 @@ var _ = Describe("Podman exec", func() {
})
It("podman exec simple command using latest", func() {
// the remote client doesn't use latest
SkipIfRemote()
setup := podmanTest.RunTopContainer("test1")
setup.WaitWithDefaultTimeout()
Expect(setup.ExitCode()).To(Equal(0))
session := podmanTest.Podman([]string{"exec", "-l", "ls"})
cid := "-l"
if IsRemote() {
cid = "test1"
}
session := podmanTest.Podman([]string{"exec", cid, "ls"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
})
@ -284,7 +285,8 @@ var _ = Describe("Podman exec", func() {
})
It("podman exec preserves container groups with --user and --group-add", func() {
SkipIfRemote()
SkipIfRemote() // FIXME: This is broken SECCOMP Failues?
dockerfile := `FROM fedora-minimal
RUN groupadd -g 4000 first
RUN groupadd -g 4001 second

View File

@ -79,7 +79,7 @@ var _ = Describe("Podman Info", func() {
if !rootless.IsRootless() {
Skip("test of rootless_storage_path is only meaningful as rootless")
}
SkipIfRemote()
SkipIfRemote() // Only tests storage on local client
oldHOME, hasHOME := os.LookupEnv("HOME")
defer func() {
if hasHOME {

View File

@ -75,7 +75,7 @@ var _ = Describe("Podman init", func() {
})
It("podman init latest container", func() {
SkipIfRemote()
SkipIfRemote() // Testing --latest flag
session := podmanTest.Podman([]string{"create", "-d", ALPINE, "ls"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))

View File

@ -126,7 +126,7 @@ var _ = Describe("Podman inspect", func() {
})
It("podman inspect -l with additional input should fail", func() {
SkipIfRemote()
SkipIfRemote() // testing --latest flag
result := podmanTest.Podman([]string{"inspect", "-l", "1234foobar"})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(125))
@ -173,7 +173,7 @@ var _ = Describe("Podman inspect", func() {
})
It("podman inspect --latest with no container fails", func() {
SkipIfRemote()
SkipIfRemote() // testing --latest flag
session := podmanTest.Podman([]string{"inspect", "--latest"})
session.WaitWithDefaultTimeout()

View File

@ -100,12 +100,15 @@ var _ = Describe("Podman kill", func() {
})
It("podman kill latest container", func() {
SkipIfRemote()
session := podmanTest.RunTopContainer("")
session := podmanTest.RunTopContainer("test1")
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
result := podmanTest.Podman([]string{"kill", "-l"})
cid := "-l"
if IsRemote() {
cid = "test1"
}
result := podmanTest.Podman([]string{"kill", cid})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
Expect(podmanTest.NumberOfContainersRunning()).To(Equal(0))

View File

@ -123,7 +123,7 @@ var _ = Describe("Podman load", func() {
})
It("podman load directory", func() {
SkipIfRemote()
SkipIfRemote() // FIXME: Remote Load is broken.
outdir := filepath.Join(podmanTest.TempDir, "alpine")
save := podmanTest.PodmanNoCache([]string{"save", "--format", "oci-dir", "-o", outdir, ALPINE})
@ -227,7 +227,7 @@ var _ = Describe("Podman load", func() {
})
It("podman load localhost registry from dir", func() {
SkipIfRemote()
SkipIfRemote() // FIXME: podman-remote load is currently broken.
outfile := filepath.Join(podmanTest.TempDir, "load")
setup := podmanTest.PodmanNoCache([]string{"tag", BB, "hello:world"})

View File

@ -127,7 +127,7 @@ var _ = Describe("Podman logs", func() {
})
It("two containers showing short container IDs", func() {
SkipIfRemote() // remote does not support multiple containers
SkipIfRemote() // FIXME: remote does not support multiple containers
log1 := podmanTest.Podman([]string{"run", "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})
log1.WaitWithDefaultTimeout()
Expect(log1.ExitCode()).To(Equal(0))

View File

@ -102,7 +102,7 @@ var _ = Describe("Podman manifest", func() {
})
It("podman manifest annotate", func() {
SkipIfRemote()
SkipIfRemote() // Not supporting annotate on remote connections
session := podmanTest.Podman([]string{"manifest", "create", "foo"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@ -184,8 +184,7 @@ var _ = Describe("Podman manifest", func() {
})
It("podman manifest push purge", func() {
// remote does not support --purge
SkipIfRemote()
SkipIfRemote() // remote does not support --purge
session := podmanTest.Podman([]string{"manifest", "create", "foo"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))

View File

@ -33,7 +33,7 @@ var _ = Describe("Podman namespaces", func() {
})
It("podman namespace test", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This should work on Remote
podman1 := podmanTest.Podman([]string{"--namespace", "test1", "run", "-d", ALPINE, "echo", "hello"})
podman1.WaitWithDefaultTimeout()
Expect(podman1.ExitCode()).To(Equal(0))

View File

@ -137,7 +137,7 @@ var _ = Describe("Podman network create", func() {
})
It("podman network create with name and subnet", func() {
SkipIfRemote()
SkipIfRemote() // FIXME, this should work on --remote
var (
results []network.NcList
)
@ -178,7 +178,6 @@ var _ = Describe("Podman network create", func() {
})
It("podman network create with name and IPv6 subnet", func() {
SkipIfRemote()
SkipIfRootless()
var (
results []network.NcList

View File

@ -591,7 +591,6 @@ var _ = Describe("Podman generate kube", func() {
})
It("podman play kube test correct command", func() {
SkipIfRemote()
pod := getPod()
err := generatePodKubeYaml(pod, kubeYaml)
Expect(err).To(BeNil())
@ -609,7 +608,6 @@ var _ = Describe("Podman generate kube", func() {
})
It("podman play kube test correct command with only set command in yaml file", func() {
SkipIfRemote()
pod := getPod(withCtr(getCtr(withCmd([]string{"echo", "hello"}), withArg(nil))))
err := generatePodKubeYaml(pod, kubeYaml)
Expect(err).To(BeNil())
@ -644,7 +642,6 @@ var _ = Describe("Podman generate kube", func() {
})
It("podman play kube test correct output", func() {
SkipIfRemote()
p := getPod(withCtr(getCtr(withCmd([]string{"echo", "hello"}), withArg([]string{"world"}))))
err := generatePodKubeYaml(p, kubeYaml)
@ -796,7 +793,7 @@ var _ = Describe("Podman generate kube", func() {
})
It("podman play kube seccomp container level", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This is broken
// expect play kube is expected to set a seccomp label if it's applied as an annotation
jsonFile, err := podmanTest.CreateSeccompJson(seccompPwdEPERM)
if err != nil {
@ -823,7 +820,7 @@ var _ = Describe("Podman generate kube", func() {
})
It("podman play kube seccomp pod level", func() {
SkipIfRemote()
SkipIfRemote() // FIXME: This should work with --remote
// expect play kube is expected to set a seccomp label if it's applied as an annotation
jsonFile, err := podmanTest.CreateSeccompJson(seccompPwdEPERM)
if err != nil {
@ -975,7 +972,6 @@ spec:
// Deployment related tests
It("podman play kube deployment 1 replica test correct command", func() {
SkipIfRemote()
deployment := getDeployment()
err := generateDeploymentKubeYaml(deployment, kubeYaml)
Expect(err).To(BeNil())
@ -994,7 +990,6 @@ spec:
})
It("podman play kube deployment more than 1 replica test correct command", func() {
SkipIfRemote()
var i, numReplicas int32
numReplicas = 5
deployment := getDeployment(withReplicas(numReplicas))
@ -1160,7 +1155,6 @@ spec:
})
It("podman play kube applies labels to pods", func() {
SkipIfRemote()
var numReplicas int32 = 5
expectedLabelKey := "key1"
expectedLabelValue := "value1"

View File

@ -124,7 +124,6 @@ var _ = Describe("Podman pod create", func() {
})
It("podman create pod with --no-hosts", func() {
SkipIfRemote()
name := "test"
podCreate := podmanTest.Podman([]string{"pod", "create", "--no-hosts", "--name", name})
podCreate.WaitWithDefaultTimeout()
@ -141,7 +140,6 @@ var _ = Describe("Podman pod create", func() {
})
It("podman create pod with --no-hosts and no infra should fail", func() {
SkipIfRemote()
name := "test"
podCreate := podmanTest.Podman([]string{"pod", "create", "--no-hosts", "--name", name, "--infra=false"})
podCreate.WaitWithDefaultTimeout()
@ -149,7 +147,6 @@ var _ = Describe("Podman pod create", func() {
})
It("podman create pod with --add-host", func() {
SkipIfRemote()
name := "test"
podCreate := podmanTest.Podman([]string{"pod", "create", "--add-host", "test.example.com:12.34.56.78", "--name", name})
podCreate.WaitWithDefaultTimeout()
@ -162,7 +159,6 @@ var _ = Describe("Podman pod create", func() {
})
It("podman create pod with --add-host and no infra should fail", func() {
SkipIfRemote()
name := "test"
podCreate := podmanTest.Podman([]string{"pod", "create", "--add-host", "test.example.com:12.34.56.78", "--name", name, "--infra=false"})
podCreate.WaitWithDefaultTimeout()
@ -170,7 +166,6 @@ var _ = Describe("Podman pod create", func() {
})
It("podman create pod with DNS server set", func() {
SkipIfRemote()
name := "test"
server := "12.34.56.78"
podCreate := podmanTest.Podman([]string{"pod", "create", "--dns", server, "--name", name})
@ -184,7 +179,6 @@ var _ = Describe("Podman pod create", func() {
})
It("podman create pod with DNS server set and no infra should fail", func() {
SkipIfRemote()
name := "test"
server := "12.34.56.78"
podCreate := podmanTest.Podman([]string{"pod", "create", "--dns", server, "--name", name, "--infra=false"})
@ -193,7 +187,6 @@ var _ = Describe("Podman pod create", func() {
})
It("podman create pod with DNS option set", func() {
SkipIfRemote()
name := "test"
option := "attempts:5"
podCreate := podmanTest.Podman([]string{"pod", "create", "--dns-opt", option, "--name", name})
@ -207,7 +200,6 @@ var _ = Describe("Podman pod create", func() {
})
It("podman create pod with DNS option set and no infra should fail", func() {
SkipIfRemote()
name := "test"
option := "attempts:5"
podCreate := podmanTest.Podman([]string{"pod", "create", "--dns-opt", option, "--name", name, "--infra=false"})
@ -216,7 +208,6 @@ var _ = Describe("Podman pod create", func() {
})
It("podman create pod with DNS search domain set", func() {
SkipIfRemote()
name := "test"
search := "example.com"
podCreate := podmanTest.Podman([]string{"pod", "create", "--dns-search", search, "--name", name})
@ -230,7 +221,6 @@ var _ = Describe("Podman pod create", func() {
})
It("podman create pod with DNS search domain set and no infra should fail", func() {
SkipIfRemote()
name := "test"
search := "example.com"
podCreate := podmanTest.Podman([]string{"pod", "create", "--dns-search", search, "--name", name, "--infra=false"})
@ -256,7 +246,6 @@ var _ = Describe("Podman pod create", func() {
})
It("podman create pod with IP address and no infra should fail", func() {
SkipIfRemote()
name := "test"
ip := GetRandomIPAddress()
podCreate := podmanTest.Podman([]string{"pod", "create", "--ip", ip, "--name", name, "--infra=false"})
@ -265,7 +254,6 @@ var _ = Describe("Podman pod create", func() {
})
It("podman create pod with MAC address", func() {
SkipIfRemote()
name := "test"
mac := "92:d0:c6:0a:29:35"
podCreate := podmanTest.Podman([]string{"pod", "create", "--mac-address", mac, "--name", name})
@ -283,7 +271,6 @@ var _ = Describe("Podman pod create", func() {
})
It("podman create pod with MAC address and no infra should fail", func() {
SkipIfRemote()
name := "test"
mac := "92:d0:c6:0a:29:35"
podCreate := podmanTest.Podman([]string{"pod", "create", "--mac-address", mac, "--name", name, "--infra=false"})

View File

@ -225,7 +225,7 @@ var _ = Describe("Podman pod create", func() {
})
It("podman pod container can override pod pid NS", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This should work on podman-remote
session := podmanTest.Podman([]string{"pod", "create", "--share", "pid"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@ -257,7 +257,7 @@ var _ = Describe("Podman pod create", func() {
})
It("podman pod container can override pod not sharing pid", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This should work on podman-remote
session := podmanTest.Podman([]string{"pod", "create", "--share", "net"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@ -283,7 +283,7 @@ var _ = Describe("Podman pod create", func() {
})
It("podman pod container can override pod ipc NS", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This should work on podman-remote
session := podmanTest.Podman([]string{"pod", "create", "--share", "ipc"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@ -380,6 +380,7 @@ var _ = Describe("Podman pod create", func() {
})
It("podman run --add-host in pod", func() {
SkipIfRemote() // FIXME This should work on podman-remote
session := podmanTest.Podman([]string{"pod", "create"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))

View File

@ -100,7 +100,6 @@ var _ = Describe("Podman pod kill", func() {
})
It("podman pod kill latest pod", func() {
SkipIfRemote()
_, ec, podid := podmanTest.CreatePod("")
Expect(ec).To(Equal(0))
@ -118,8 +117,10 @@ var _ = Describe("Podman pod kill", func() {
session = podmanTest.RunTopContainerInPod("", podid2)
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
result := podmanTest.Podman([]string{"pod", "kill", "-l"})
if !IsRemote() {
podid2 = "-l"
}
result := podmanTest.Podman([]string{"pod", "kill", podid2})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
Expect(podmanTest.NumberOfContainersRunning()).To(Equal(1))

View File

@ -61,7 +61,7 @@ var _ = Describe("Podman pod create", func() {
})
It("podman pod container dontshare PIDNS", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This should work on podman-remote
session := podmanTest.Podman([]string{"pod", "create"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))

View File

@ -83,7 +83,7 @@ var _ = Describe("Podman ps", func() {
})
It("podman pod ps latest", func() {
SkipIfRemote()
SkipIfRemote() // Testing --latest flag
_, ec, podid1 := podmanTest.CreatePod("")
Expect(ec).To(Equal(0))

View File

@ -134,7 +134,6 @@ var _ = Describe("Podman pod restart", func() {
})
It("podman pod restart latest pod", func() {
SkipIfRemote()
_, ec, _ := podmanTest.CreatePod("foobar99")
Expect(ec).To(Equal(0))
@ -152,7 +151,11 @@ var _ = Describe("Podman pod restart", func() {
startTime := podmanTest.Podman([]string{"inspect", "--format='{{.State.StartedAt}}'", "test1", "test2"})
startTime.WaitWithDefaultTimeout()
session = podmanTest.Podman([]string{"pod", "restart", "-l"})
podid := "-l"
if IsRemote() {
podid = "foobar100"
}
session = podmanTest.Podman([]string{"pod", "restart", podid})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))

View File

@ -61,14 +61,17 @@ var _ = Describe("Podman pod rm", func() {
})
It("podman pod rm latest pod", func() {
SkipIfRemote()
_, ec, podid := podmanTest.CreatePod("")
Expect(ec).To(Equal(0))
_, ec2, podid2 := podmanTest.CreatePod("")
_, ec2, podid2 := podmanTest.CreatePod("pod2")
Expect(ec2).To(Equal(0))
result := podmanTest.Podman([]string{"pod", "rm", "--latest"})
latest := "--latest"
if IsRemote() {
latest = "pod2"
}
result := podmanTest.Podman([]string{"pod", "rm", latest})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))

View File

@ -107,7 +107,6 @@ var _ = Describe("Podman pod start", func() {
})
It("podman pod start latest pod", func() {
SkipIfRemote()
_, ec, _ := podmanTest.CreatePod("foobar99")
Expect(ec).To(Equal(0))
@ -122,7 +121,11 @@ var _ = Describe("Podman pod start", func() {
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
session = podmanTest.Podman([]string{"pod", "start", "--latest"})
podid := "--latest"
if IsRemote() {
podid = "foobar100"
}
session = podmanTest.Podman([]string{"pod", "start", podid})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
Expect(podmanTest.NumberOfContainersRunning()).To(Equal(1))

View File

@ -143,7 +143,6 @@ var _ = Describe("Podman pod stop", func() {
})
It("podman pod stop latest pod", func() {
SkipIfRemote()
_, ec, _ := podmanTest.CreatePod("foobar99")
Expect(ec).To(Equal(0))
@ -158,7 +157,11 @@ var _ = Describe("Podman pod stop", func() {
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
session = podmanTest.Podman([]string{"pod", "stop", "--latest"})
podid := "--latest"
if IsRemote() {
podid = "foobar100"
}
session = podmanTest.Podman([]string{"pod", "stop", podid})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
Expect(podmanTest.NumberOfContainersRunning()).To(Equal(1))

View File

@ -56,7 +56,6 @@ var _ = Describe("Podman top", func() {
})
It("podman pod top on pod", func() {
SkipIfRemote()
_, ec, podid := podmanTest.CreatePod("")
Expect(ec).To(Equal(0))
@ -64,7 +63,10 @@ var _ = Describe("Podman top", func() {
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
result := podmanTest.Podman([]string{"pod", "top", "-l"})
if !IsRemote() {
podid = "-l"
}
result := podmanTest.Podman([]string{"pod", "top", podid})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
Expect(len(result.OutputToStringArray())).To(BeNumerically(">", 1))

View File

@ -47,15 +47,17 @@ var _ = Describe("Podman port", func() {
})
It("podman port -l nginx", func() {
SkipIfRemote()
session, cid := podmanTest.RunNginxWithHealthCheck("")
session, cid := podmanTest.RunNginxWithHealthCheck("test1")
Expect(session.ExitCode()).To(Equal(0))
if err := podmanTest.RunHealthCheck(cid); err != nil {
Fail(err.Error())
}
result := podmanTest.Podman([]string{"port", "-l"})
if !IsRemote() {
cid = "-l"
}
result := podmanTest.Podman([]string{"port", cid})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
port := strings.Split(result.OutputToStringArray()[0], ":")[1]
@ -63,7 +65,6 @@ var _ = Describe("Podman port", func() {
})
It("podman container port -l nginx", func() {
SkipIfRemote()
session, cid := podmanTest.RunNginxWithHealthCheck("")
Expect(session.ExitCode()).To(Equal(0))
@ -71,7 +72,10 @@ var _ = Describe("Podman port", func() {
Fail(err.Error())
}
result := podmanTest.Podman([]string{"container", "port", "-l"})
if !IsRemote() {
cid = "-l"
}
result := podmanTest.Podman([]string{"container", "port", cid})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
port := strings.Split(result.OutputToStringArray()[0], ":")[1]
@ -79,7 +83,6 @@ var _ = Describe("Podman port", func() {
})
It("podman port -l port nginx", func() {
SkipIfRemote()
session, cid := podmanTest.RunNginxWithHealthCheck("")
Expect(session.ExitCode()).To(Equal(0))
@ -87,7 +90,10 @@ var _ = Describe("Podman port", func() {
Fail(err.Error())
}
result := podmanTest.Podman([]string{"port", "-l", "80"})
if !IsRemote() {
cid = "-l"
}
result := podmanTest.Podman([]string{"port", cid, "80"})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
port := strings.Split(result.OutputToStringArray()[0], ":")[1]

View File

@ -88,7 +88,7 @@ var _ = Describe("Podman prune", func() {
})
It("podman image prune skip cache images", func() {
SkipIfRemote()
SkipIfRemote() // FIXME should work on podman --remote
podmanTest.BuildImage(pruneImage, "alpine_bash:latest", "true")
none := podmanTest.Podman([]string{"images", "-a"})
@ -110,7 +110,7 @@ var _ = Describe("Podman prune", func() {
})
It("podman image prune dangling images", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This should work on podman-remote
podmanTest.BuildImage(pruneImage, "alpine_bash:latest", "true")
podmanTest.BuildImage(pruneImage, "alpine_bash:latest", "true")
@ -147,7 +147,7 @@ var _ = Describe("Podman prune", func() {
})
It("podman system image prune unused images", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This should work on podman-remote
podmanTest.RestoreAllArtifacts()
podmanTest.BuildImage(pruneImage, "alpine_bash:latest", "true")
prune := podmanTest.PodmanNoCache([]string{"system", "prune", "-a", "--force"})

View File

@ -101,7 +101,7 @@ var _ = Describe("Podman ps", func() {
})
It("podman ps latest flag", func() {
SkipIfRemote()
SkipIfRemote() // --latest is not supported on podman-remote
_, ec, _ := podmanTest.RunLsContainer("")
Expect(ec).To(Equal(0))
_, ec, _ = podmanTest.RunLsContainer("")

View File

@ -235,7 +235,7 @@ var _ = Describe("Podman pull", func() {
})
It("podman pull from docker-archive", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This should work on podman-remote
podmanTest.RestoreArtifact(ALPINE)
tarfn := filepath.Join(podmanTest.TempDir, "alp.tar")
session := podmanTest.PodmanNoCache([]string{"save", "-o", tarfn, "alpine"})
@ -297,7 +297,7 @@ var _ = Describe("Podman pull", func() {
})
It("podman pull from oci-archive", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This should work on podman-remote
podmanTest.RestoreArtifact(ALPINE)
tarfn := filepath.Join(podmanTest.TempDir, "oci-alp.tar")
session := podmanTest.PodmanNoCache([]string{"save", "--format", "oci-archive", "-o", tarfn, "alpine"})
@ -316,7 +316,7 @@ var _ = Describe("Podman pull", func() {
})
It("podman pull from local directory", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This should work on podman-remote
podmanTest.RestoreArtifact(ALPINE)
dirpath := filepath.Join(podmanTest.TempDir, "alpine")
os.MkdirAll(dirpath, os.ModePerm)
@ -341,7 +341,7 @@ var _ = Describe("Podman pull", func() {
})
It("podman pull from local OCI directory", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This should work on podman-remote
podmanTest.RestoreArtifact(ALPINE)
dirpath := filepath.Join(podmanTest.TempDir, "alpine")
os.MkdirAll(dirpath, os.ModePerm)

View File

@ -122,7 +122,6 @@ var _ = Describe("Podman restart", func() {
})
It("Podman restart the latest container", func() {
SkipIfRemote()
_, exitCode, _ := podmanTest.RunLsContainer("test1")
Expect(exitCode).To(Equal(0))
@ -132,7 +131,11 @@ var _ = Describe("Podman restart", func() {
startTime := podmanTest.Podman([]string{"inspect", "--format='{{.State.StartedAt}}'", "test1", "test2"})
startTime.WaitWithDefaultTimeout()
session := podmanTest.Podman([]string{"restart", "-l"})
cid := "-l"
if IsRemote() {
cid = "test2"
}
session := podmanTest.Podman([]string{"restart", cid})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
restartTime := podmanTest.Podman([]string{"inspect", "--format='{{.State.StartedAt}}'", "test1", "test2"})

View File

@ -123,15 +123,18 @@ var _ = Describe("Podman rm", func() {
})
It("podman rm the latest container", func() {
SkipIfRemote()
session := podmanTest.Podman([]string{"create", ALPINE, "ls"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
_, ec, cid := podmanTest.RunLsContainer("")
_, ec, cid := podmanTest.RunLsContainer("test1")
Expect(ec).To(Equal(0))
result := podmanTest.Podman([]string{"rm", "-l"})
latest := "-l"
if IsRemote() {
latest = "test1"
}
result := podmanTest.Podman([]string{"rm", latest})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
output := result.OutputToString()
@ -193,7 +196,7 @@ var _ = Describe("Podman rm", func() {
})
It("podman rm invalid --latest and --cidfile and --all", func() {
SkipIfRemote()
SkipIfRemote() // Verifying --latest flag
result := podmanTest.Podman([]string{"rm", "--cidfile", "foobar", "--latest"})
result.WaitWithDefaultTimeout()

View File

@ -185,7 +185,7 @@ var _ = Describe("Podman rmi", func() {
})
It("podman rmi with cached images", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This should work on podman-remote
session := podmanTest.PodmanNoCache([]string{"rmi", "-fa"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
@ -255,7 +255,7 @@ var _ = Describe("Podman rmi", func() {
})
It("podman rmi -a with parent|child images", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This should work on podman-remote
dockerfile := `FROM docker.io/library/alpine:latest AS base
RUN touch /1
ENV LOCAL=/1

View File

@ -33,7 +33,7 @@ var _ = Describe("Podman run exit", func() {
})
It("podman run -d mount cleanup test", func() {
SkipIfRemote()
SkipIfRemote() // podman-remote does not support mount
SkipIfRootless()
result := podmanTest.Podman([]string{"run", "-dt", ALPINE, "top"})

View File

@ -44,7 +44,6 @@ CMD []
})
It("podman run entrypoint", func() {
SkipIfRemote()
dockerfile := `FROM docker.io/library/alpine:latest
ENTRYPOINT ["grep", "Alpine", "/etc/os-release"]
`
@ -56,7 +55,6 @@ ENTRYPOINT ["grep", "Alpine", "/etc/os-release"]
})
It("podman run entrypoint with cmd", func() {
SkipIfRemote()
dockerfile := `FROM docker.io/library/alpine:latest
CMD [ "-v"]
ENTRYPOINT ["grep", "Alpine", "/etc/os-release"]
@ -69,7 +67,6 @@ ENTRYPOINT ["grep", "Alpine", "/etc/os-release"]
})
It("podman run entrypoint with user cmd overrides image cmd", func() {
SkipIfRemote()
dockerfile := `FROM docker.io/library/alpine:latest
CMD [ "-v"]
ENTRYPOINT ["grep", "Alpine", "/etc/os-release"]
@ -82,7 +79,6 @@ ENTRYPOINT ["grep", "Alpine", "/etc/os-release"]
})
It("podman run entrypoint with user cmd no image cmd", func() {
SkipIfRemote()
dockerfile := `FROM docker.io/library/alpine:latest
ENTRYPOINT ["grep", "Alpine", "/etc/os-release"]
`
@ -94,7 +90,7 @@ ENTRYPOINT ["grep", "Alpine", "/etc/os-release"]
})
It("podman run user entrypoint overrides image entrypoint and image cmd", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This should work on podman-remote
dockerfile := `FROM docker.io/library/alpine:latest
CMD ["-i"]
ENTRYPOINT ["grep", "Alpine", "/etc/os-release"]
@ -112,7 +108,6 @@ ENTRYPOINT ["grep", "Alpine", "/etc/os-release"]
})
It("podman run user entrypoint with command overrides image entrypoint and image cmd", func() {
SkipIfRemote()
dockerfile := `FROM docker.io/library/alpine:latest
CMD ["-i"]
ENTRYPOINT ["grep", "Alpine", "/etc/os-release"]

View File

@ -90,7 +90,7 @@ var _ = Describe("Podman run", func() {
})
It("podman run --env-host environment test", func() {
SkipIfRemote()
SkipIfRemote() // FIXME, We should check that --env-host reports correct error on podman-remote
env := append(os.Environ(), "FOO=BAR")
session := podmanTest.PodmanAsUser([]string{"run", "--rm", "--env-host", ALPINE, "/bin/printenv", "FOO"}, 0, 0, "", env)
@ -108,7 +108,7 @@ var _ = Describe("Podman run", func() {
})
It("podman run --http-proxy test", func() {
SkipIfRemote()
SkipIfRemote() // FIXME: Should report proper error when http-proxy is not supported
os.Setenv("http_proxy", "1.2.3.4")
session := podmanTest.Podman([]string{"run", "--rm", ALPINE, "printenv", "http_proxy"})
session.WaitWithDefaultTimeout()

View File

@ -528,7 +528,6 @@ var _ = Describe("Podman run networking", func() {
})
It("podman run in custom CNI network with --static-ip", func() {
SkipIfRemote()
SkipIfRootless()
netName := "podmantestnetwork"
ipAddr := "10.25.30.128"
@ -544,7 +543,6 @@ var _ = Describe("Podman run networking", func() {
})
It("podman run with new:pod and static-ip", func() {
SkipIfRemote()
SkipIfRootless()
netName := "podmantestnetwork2"
ipAddr := "10.25.40.128"

View File

@ -60,7 +60,6 @@ var _ = Describe("Podman run passwd", func() {
})
It("podman can run container without /etc/passwd", func() {
SkipIfRemote()
dockerfile := `FROM alpine
RUN rm -f /etc/passwd /etc/shadow /etc/group
USER 1000`
@ -114,7 +113,6 @@ USER 1000`
})
It("podman run numeric group from image and no group file", func() {
SkipIfRemote()
dockerfile := `FROM alpine
RUN rm -f /etc/passwd /etc/shadow /etc/group
USER 1000`

View File

@ -33,7 +33,7 @@ var _ = Describe("Podman run restart containers", func() {
})
It("Podman start after successful run", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This should work on podman-remote
session := podmanTest.Podman([]string{"run", "--name", "test", ALPINE, "ls"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))

View File

@ -127,7 +127,7 @@ var _ = Describe("Podman generate kube", func() {
})
It("podman container runlabel (podman --version)", func() {
SkipIfRemote()
SkipIfRemote() // runlabel not supported on podman-remote
PodmanDockerfile := `
FROM alpine:latest
LABEL io.containers.capabilities=chown,mknod`

View File

@ -295,7 +295,7 @@ var _ = Describe("Podman run", func() {
})
It("podman run user capabilities test with image", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This should work on podman-remote
dockerfile := `FROM busybox
USER bin`
podmanTest.BuildImage(dockerfile, "test", "false")
@ -343,7 +343,7 @@ USER bin`
})
It("podman run limits host test", func() {
SkipIfRemote()
SkipIfRemote() // This can only be used for local tests
var l syscall.Rlimit
@ -486,7 +486,7 @@ USER bin`
})
It("podman run notify_socket", func() {
SkipIfRemote()
SkipIfRemote() // This can only be used for local tests
host := GetHostDistributionInfo()
if host.Distribution != "rhel" && host.Distribution != "centos" && host.Distribution != "fedora" {
@ -546,7 +546,7 @@ USER bin`
})
It("podman run with secrets", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This should work on podman-remote
containersDir := filepath.Join(podmanTest.TempDir, "containers")
err := os.MkdirAll(containersDir, 0755)
Expect(err).To(BeNil())
@ -711,7 +711,7 @@ USER bin`
})
It("podman run with built-in volume image", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This should work on podman-remote
session := podmanTest.Podman([]string{"run", "--rm", redis, "ls"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@ -1028,7 +1028,7 @@ USER mail`
})
It("podman run with restart-policy always restarts containers", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This should work on podman-remote
testDir := filepath.Join(podmanTest.RunRoot, "restart-test")
err := os.MkdirAll(testDir, 0755)
Expect(err).To(BeNil())
@ -1071,7 +1071,6 @@ USER mail`
})
It("podman run with cgroups=disabled runs without cgroups", func() {
SkipIfRemote()
SkipIfRootless()
// Only works on crun
if !strings.Contains(podmanTest.OCIRuntime, "crun") {
@ -1104,7 +1103,6 @@ USER mail`
})
It("podman run with cgroups=enabled makes cgroups", func() {
SkipIfRemote()
SkipIfRootless()
// Only works on crun
if !strings.Contains(podmanTest.OCIRuntime, "crun") {
@ -1267,7 +1265,6 @@ USER mail`
It("podman run makes workdir from image", func() {
// BuildImage does not seem to work remote
SkipIfRemote()
dockerfile := `FROM busybox
WORKDIR /madethis`
podmanTest.BuildImage(dockerfile, "test", "false")

View File

@ -197,7 +197,7 @@ var _ = Describe("Podman run with volumes", func() {
})
It("podman run with volumes and suid/dev/exec options", func() {
SkipIfRemote()
SkipIfRemote() // podman-remote does not support --volumes
mountPath := filepath.Join(podmanTest.TempDir, "secrets")
os.Mkdir(mountPath, 0755)
@ -227,7 +227,7 @@ var _ = Describe("Podman run with volumes", func() {
})
It("podman run with tmpfs named volume mounts and unmounts", func() {
SkipIfRemote()
SkipIfRemote() // podman-remote does not support --volumes this test could be simplified to be tested on Remote.
SkipIfRootless()
volName := "testvol"
mkVolume := podmanTest.Podman([]string{"volume", "create", "--opt", "type=tmpfs", "--opt", "device=tmpfs", "--opt", "o=nodev", "testvol"})
@ -315,7 +315,6 @@ var _ = Describe("Podman run with volumes", func() {
})
It("podman run with anonymous volume", func() {
SkipIfRemote()
list1 := podmanTest.Podman([]string{"volume", "list", "--quiet"})
list1.WaitWithDefaultTimeout()
Expect(list1.ExitCode()).To(Equal(0))
@ -334,7 +333,6 @@ var _ = Describe("Podman run with volumes", func() {
})
It("podman rm -v removes anonymous volume", func() {
SkipIfRemote()
list1 := podmanTest.Podman([]string{"volume", "list", "--quiet"})
list1.WaitWithDefaultTimeout()
Expect(list1.ExitCode()).To(Equal(0))
@ -436,7 +434,6 @@ var _ = Describe("Podman run with volumes", func() {
})
It("Podman mount over image volume with trailing /", func() {
SkipIfRemote()
image := "podman-volume-test:trailing"
dockerfile := `
FROM alpine:latest
@ -456,7 +453,7 @@ VOLUME /test/`
})
It("podman run with overlay volume flag", func() {
SkipIfRemote()
SkipIfRemote() // Overlay volumes only work locally
if os.Getenv("container") != "" {
Skip("Overlay mounts not supported when running in a container")
}

View File

@ -50,7 +50,7 @@ var _ = Describe("Podman run", func() {
})
It("podman run a container on an image with a workdir", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This should work on podman-remote
dockerfile := `FROM alpine
RUN mkdir -p /home/foobar
WORKDIR /etc/foobar`

View File

@ -29,8 +29,7 @@ var _ = Describe("podman container runlabel", func() {
)
BeforeEach(func() {
// runlabel is not supported for remote connections
SkipIfRemote()
SkipIfRemote() // runlabel is not supported for remote connections
tempdir, err = CreateTempDirInTempDir()
if err != nil {
os.Exit(1)

View File

@ -237,7 +237,7 @@ registries = ['{{.Host}}:{{.Port}}']`
})
It("podman search attempts HTTP if registry is in registries.insecure and force secure is false", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This should work on podman-remote
if podmanTest.Host.Arch == "ppc64le" {
Skip("No registry image for ppc64le")
}
@ -278,7 +278,7 @@ registries = ['{{.Host}}:{{.Port}}']`
})
It("podman search doesn't attempt HTTP if force secure is true", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This should work on podman-remote
if podmanTest.Host.Arch == "ppc64le" {
Skip("No registry image for ppc64le")
}
@ -317,7 +317,7 @@ registries = ['{{.Host}}:{{.Port}}']`
})
It("podman search doesn't attempt HTTP if registry is not listed as insecure", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This should work on podman-remote
if podmanTest.Host.Arch == "ppc64le" {
Skip("No registry image for ppc64le")
}
@ -356,7 +356,7 @@ registries = ['{{.Host}}:{{.Port}}']`
})
It("podman search doesn't attempt HTTP if one registry is not listed as insecure", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This should work on podman-remote
if podmanTest.Host.Arch == "ppc64le" {
Skip("No registry image for ppc64le")
}
@ -407,7 +407,6 @@ registries = ['{{.Host}}:{{.Port}}']`
// search should fail with nonexist authfile
It("podman search fail with nonexist --authfile", func() {
SkipIfRemote()
search := podmanTest.Podman([]string{"search", "--authfile", "/tmp/nonexist", ALPINE})
search.WaitWithDefaultTimeout()
Expect(search.ExitCode()).To(Not(Equal(0)))

View File

@ -87,7 +87,6 @@ var _ = Describe("Podman start", func() {
})
It("podman start single container with attach and test the signal", func() {
SkipIfRemote()
session := podmanTest.Podman([]string{"create", "--entrypoint", "sh", ALPINE, "-c", "exit 1"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))

View File

@ -182,7 +182,7 @@ var _ = Describe("Podman stop", func() {
})
It("podman stop latest containers", func() {
SkipIfRemote()
SkipIfRemote() // Testing --latest
session := podmanTest.RunTopContainer("test1")
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@ -196,14 +196,17 @@ var _ = Describe("Podman stop", func() {
})
It("podman stop all containers with one stopped", func() {
Skip(v2remotefail)
session := podmanTest.RunTopContainer("test1")
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
session2 := podmanTest.RunTopContainer("test2")
session2.WaitWithDefaultTimeout()
Expect(session2.ExitCode()).To(Equal(0))
session3 := podmanTest.Podman([]string{"stop", "-l", "-t", "1"})
cid := "-l"
if IsRemote() {
cid = "test2"
}
session3 := podmanTest.Podman([]string{"stop", cid, "-t", "1"})
session3.WaitWithDefaultTimeout()
Expect(session3.ExitCode()).To(Equal(0))
session4 := podmanTest.Podman([]string{"stop", "-a", "-t", "1"})
@ -286,7 +289,7 @@ var _ = Describe("Podman stop", func() {
})
It("podman stop invalid --latest and --cidfile and --all", func() {
SkipIfRemote()
SkipIfRemote() // testing --latest
result := podmanTest.Podman([]string{"stop", "--cidfile", "foobar", "--latest"})
result.WaitWithDefaultTimeout()

View File

@ -35,7 +35,7 @@ var _ = Describe("podman system df", func() {
})
It("podman system df", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This should work on podman-remote
session := podmanTest.Podman([]string{"create", ALPINE})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))

View File

@ -34,7 +34,7 @@ var _ = Describe("podman system reset", func() {
})
It("podman system reset", func() {
SkipIfRemote()
SkipIfRemote() // system reset not supported on podman --remote
// system reset will not remove additional store images, so need to grab length
session := podmanTest.Podman([]string{"rmi", "--force", "--all"})

View File

@ -15,7 +15,7 @@ var _ = Describe("Podman unshare", func() {
podmanTest *PodmanTestIntegration
)
BeforeEach(func() {
SkipIfRemote()
SkipIfRemote() // podman-remote unshare is not supported
if _, err := os.Stat("/proc/self/uid_map"); err != nil {
Skip("User namespaces not supported.")
}

View File

@ -33,7 +33,7 @@ var _ = Describe("Podman untag", func() {
})
It("podman untag all", func() {
SkipIfRemote()
SkipIfRemote() // FIXME This should work on podman-remote
setup := podmanTest.PodmanNoCache([]string{"pull", ALPINE})
setup.WaitWithDefaultTimeout()
Expect(setup.ExitCode()).To(Equal(0))