aboutsummaryrefslogtreecommitdiff
path: root/test/README.md
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2021-07-20 10:42:57 -0600
committerEd Santiago <santiago@redhat.com>2021-07-20 10:49:50 -0600
commit5952270950bbeeff3092d42c35099792a5401b17 (patch)
tree3b33dd5e3d3a560098759712c88eb496dbfea116 /test/README.md
parent389c9b8dca942fb4977823dd504d3d351cb92acd (diff)
downloadpodman-5952270950bbeeff3092d42c35099792a5401b17.tar.gz
podman-5952270950bbeeff3092d42c35099792a5401b17.tar.bz2
podman-5952270950bbeeff3092d42c35099792a5401b17.zip
e2e tests: prevent 'Expect(ExitCode())' pattern
Followup to #10932: add a validation check to prevent introduction of new 'Expect(foo.ExitCode()).To(...)' patterns. If such use is absolutely necessary -- there is one such instance in the code already -- require that the assertion include a description. Also: clean up instances that were introduced since the merging of #10932. Also: fix one remaining instance in run_exit_test.go: it had a FIXME comment mentioning a race condition, but unfortunately there was no issue or bug ID, hence no way to know if the race is fixed or not. We will assume it is. Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/README.md')
-rw-r--r--test/README.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/README.md b/test/README.md
index d7710cc95..769bdbfd7 100644
--- a/test/README.md
+++ b/test/README.md
@@ -84,7 +84,7 @@ file itself. Consider the following actual test:
It("podman inspect bogus pod", func() {
session := podmanTest.Podman([]string{"pod", "inspect", "foobar"})
session.WaitWithDefaultTimeout()
- Expect(session.ExitCode()).To(Not(Equal(0)))
+ Expect(session).To(ExitWithError())
})
```