Skip to content

Commit

Permalink
Examine all SkipIfRemote functions
Browse files Browse the repository at this point in the history
Remove ones that are not needed.
Document those that should be there.
Document those that should be fixed.

Signed-off-by: Daniel J Walsh <[email protected]>
  • Loading branch information
rhatdan authored and mheon committed Sep 25, 2020
1 parent 742c5a2 commit de11de7
Show file tree
Hide file tree
Showing 49 changed files with 132 additions and 137 deletions.
6 changes: 2 additions & 4 deletions test/e2e/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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()
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/commit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/cp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
12 changes: 7 additions & 5 deletions test/e2e/exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
})
Expand Down Expand Up @@ -283,7 +284,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
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/inspect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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()
Expand Down
9 changes: 6 additions & 3 deletions test/e2e/kill_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/load_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down Expand Up @@ -243,7 +243,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"})
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/logs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
5 changes: 2 additions & 3 deletions test/e2e/manifest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/namespace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/network_create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down Expand Up @@ -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
Expand Down
10 changes: 2 additions & 8 deletions test/e2e/play_kube_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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())
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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())
Expand All @@ -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))
Expand Down Expand Up @@ -1160,7 +1155,6 @@ spec:
})

It("podman play kube applies labels to pods", func() {
SkipIfRemote()
var numReplicas int32 = 5
expectedLabelKey := "key1"
expectedLabelValue := "value1"
Expand Down
13 changes: 0 additions & 13 deletions test/e2e/pod_create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -141,15 +140,13 @@ 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()
Expect(podCreate.ExitCode()).To(Equal(125))
})

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()
Expand All @@ -162,15 +159,13 @@ 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()
Expect(podCreate.ExitCode()).To(Equal(125))
})

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})
Expand All @@ -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"})
Expand All @@ -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})
Expand All @@ -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"})
Expand All @@ -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})
Expand All @@ -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"})
Expand All @@ -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"})
Expand All @@ -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})
Expand All @@ -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"})
Expand Down
Loading

0 comments on commit de11de7

Please sign in to comment.