diff options
author | Ed Santiago <santiago@redhat.com> | 2021-11-23 11:12:34 -0700 |
---|---|---|
committer | Ed Santiago <santiago@redhat.com> | 2021-11-29 08:30:00 -0700 |
commit | b63d696405593d056cce850e1503a6bef17c2cf8 (patch) | |
tree | 77aa079636ea326eec76520734e0ae9e815ca6c2 /test/e2e/toolbox_test.go | |
parent | 3d19f1a7fac5705518693cad3f2c7f94dcc2f1d4 (diff) | |
download | podman-b63d696405593d056cce850e1503a6bef17c2cf8.tar.gz podman-b63d696405593d056cce850e1503a6bef17c2cf8.tar.bz2 podman-b63d696405593d056cce850e1503a6bef17c2cf8.zip |
e2e tests: enable golint
...and fix problems found therewith.
Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/e2e/toolbox_test.go')
-rw-r--r-- | test/e2e/toolbox_test.go | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/test/e2e/toolbox_test.go b/test/e2e/toolbox_test.go index e1fe44675..40db5180a 100644 --- a/test/e2e/toolbox_test.go +++ b/test/e2e/toolbox_test.go @@ -66,9 +66,7 @@ var _ = Describe("Toolbox-specific testing", func() { }) It("podman run --dns=none - allows self-management of /etc/resolv.conf", func() { - var session *PodmanSessionIntegration - - session = podmanTest.Podman([]string{"run", "--dns", "none", ALPINE, "sh", "-c", + session := podmanTest.Podman([]string{"run", "--dns", "none", ALPINE, "sh", "-c", "rm -f /etc/resolv.conf; touch -d '1970-01-01 00:02:03' /etc/resolv.conf; stat -c %s:%Y /etc/resolv.conf"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) @@ -76,9 +74,7 @@ var _ = Describe("Toolbox-specific testing", func() { }) It("podman run --no-hosts - allows self-management of /etc/hosts", func() { - var session *PodmanSessionIntegration - - session = podmanTest.Podman([]string{"run", "--no-hosts", ALPINE, "sh", "-c", + session := podmanTest.Podman([]string{"run", "--no-hosts", ALPINE, "sh", "-c", "rm -f /etc/hosts; touch -d '1970-01-01 00:02:03' /etc/hosts; stat -c %s:%Y /etc/hosts"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) @@ -164,9 +160,7 @@ var _ = Describe("Toolbox-specific testing", func() { }) It("podman create --userns=keep-id --user root:root - entrypoint - entrypoint is executed as root", func() { - var session *PodmanSessionIntegration - - session = podmanTest.Podman([]string{"run", "--userns=keep-id", "--user", "root:root", ALPINE, + session := podmanTest.Podman([]string{"run", "--userns=keep-id", "--user", "root:root", ALPINE, "id"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) |