summaryrefslogtreecommitdiff
path: root/test/e2e/run_userns_test.go
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2021-11-22 13:28:43 -0700
committerEd Santiago <santiago@redhat.com>2021-11-22 15:23:08 -0700
commit49d63ad5c120919ff6669baae2ebbd2b81f5c11a (patch)
tree90d0bdcb144a8fb74d75c93fa518b573309cf74f /test/e2e/run_userns_test.go
parent97ab9176f77c4fc9c4413afad4d2dcf5fad824b6 (diff)
downloadpodman-49d63ad5c120919ff6669baae2ebbd2b81f5c11a.tar.gz
podman-49d63ad5c120919ff6669baae2ebbd2b81f5c11a.tar.bz2
podman-49d63ad5c120919ff6669baae2ebbd2b81f5c11a.zip
Oops! Manual edits to broken tests
Commit 2 of 2: there were (still are?) a bunch of string checks that didn't have a corresponding Expect(). IIUC that means they were NOPs. Try to identify and fix those. The first few were caught by Go linting, "ok is defined but not used". When I realized the problem, I looked for more using: $ ack -A2 LineInOutputStartsWith ...and tediously eyeballing the results, looking for matches in which the next line was not Expect(). If test was wrong (e.g. "server" should've been "nameserver"), fix that. Also: remove the remove-betrue script. We don't need it in the repo, I just wanted to preserve it for posterity. Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/e2e/run_userns_test.go')
-rw-r--r--test/e2e/run_userns_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/e2e/run_userns_test.go b/test/e2e/run_userns_test.go
index 0d4b327b9..9b981ef72 100644
--- a/test/e2e/run_userns_test.go
+++ b/test/e2e/run_userns_test.go
@@ -180,17 +180,17 @@ var _ = Describe("Podman UserNS support", func() {
session := podmanTest.Podman([]string{"run", "--userns=auto:size=500", "alpine", "cat", "/proc/self/uid_map"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- ok, _ := session.GrepString("500")
+ Expect(session.OutputToString()).To(ContainSubstring("500"))
session = podmanTest.Podman([]string{"run", "--userns=auto:size=3000", "alpine", "cat", "/proc/self/uid_map"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- ok, _ = session.GrepString("3000")
+ Expect(session.OutputToString()).To(ContainSubstring("3000"))
session = podmanTest.Podman([]string{"run", "--userns=auto", "--user=2000:3000", "alpine", "cat", "/proc/self/uid_map"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- ok, _ = session.GrepString("3001")
+ Expect(session.OutputToString()).To(ContainSubstring("3001"))
session = podmanTest.Podman([]string{"run", "--userns=auto", "--user=4000:1000", "alpine", "cat", "/proc/self/uid_map"})
session.WaitWithDefaultTimeout()