podman/test/utils
Ed Santiago 2d9159821a e2e: redefine ExitWithError() to require exit code
...and an optional error-message string, to be checked
against stderr.

This is a starting point and baby-steps progress toward #18188.
There are 249 ExitWithError() checks in test/e2e. It will take
weeks to fix them all. This commit enables new functionality:

    Expect(ExitWithError(125, "expected substring"))

...while also allowing the current empty-args form. Once
all 249 empty-args uses are modernized, the matcher code
will be cleaned up.

I expect it will take several months of light effort to get
all e2e tests transitioned to the new form. I am choosing to
do so in pieces, for (relative) ease of review. This PR:

  1) makes the initial changes described above; and
  2) updates a small subset of e2e _test.go files such that:
     a) ExitWithError() is given an exit code and error string; and
     b) Exit(Nonzero) is changed to ExitWithError(Nonzero, "string")
        (when possible)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-04-10 06:35:52 -06:00
..
common_function_test.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
matchers.go e2e: redefine ExitWithError() to require exit code 2024-04-10 06:35:52 -06:00
podmansession_test.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
podmantest_test.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
utils.go Refactor: replace StringInSlice with slices.Contains 2024-01-05 16:25:56 +02:00
utils_suite_test.go Bump Go module to v5 2024-02-08 09:35:39 -05:00