APIv2 (python) tests: fix flake

Python tests were flaking because they behave differently
when $DEBUG is set. It looks like something in CI sets
that envariable.

Solution: do not use $DEBUG as a debug trigger, use a
properly-named custom variable that is unlikely to be
set accidentally.

Also: get rid of AssertTrue(), which gives no visibility
into what happened. Write in proper form that can emit
useful diagnostics on failure.

Fixes: #10948

Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
Ed Santiago committed 2021-07-16 05:05:59 -06:00
1 parent f0cd16cb32
commit be51173ed3
2 files changed
+5 -6

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ class Podman(object):
# No support for tmpfs (/tmp) or extfs (/var/tmp)
# self.cmd.append("--storage-driver=overlay")
if os.getenv("DEBUG"):
if os.getenv("PODMAN_PYTHON_TEST_DEBUG"):
self.cmd.append("--log-level=debug")
self.cmd.append("--syslog=true")