summaryrefslogtreecommitdiff
path: root/contrib/python/podman/test/test_containers.py
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2018-08-29 09:44:01 -0700
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-31 16:52:52 +0000
commit6d067fcba2bf84fb5e7c7691b796d42d67028176 (patch)
treeff34ff2da6709301737cc78c2d6fb1e72e766513 /contrib/python/podman/test/test_containers.py
parent8245f0942811c2954d257ad8fac6cca8d36e896c (diff)
downloadpodman-6d067fcba2bf84fb5e7c7691b796d42d67028176.tar.gz
podman-6d067fcba2bf84fb5e7c7691b796d42d67028176.tar.bz2
podman-6d067fcba2bf84fb5e7c7691b796d42d67028176.zip
Turn on test debugging
Signed-off-by: Jhon Honce <jhonce@redhat.com> Closes: #1369 Approved by: rhatdan
Diffstat (limited to 'contrib/python/podman/test/test_containers.py')
-rw-r--r--contrib/python/podman/test/test_containers.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/contrib/python/podman/test/test_containers.py b/contrib/python/podman/test/test_containers.py
index 167aae68b..70221e33d 100644
--- a/contrib/python/podman/test/test_containers.py
+++ b/contrib/python/podman/test/test_containers.py
@@ -1,6 +1,7 @@
import os
import signal
import unittest
+from pathlib import Path
from test.podman_testcase import PodmanTestCase
from test.retry_decorator import retry
@@ -219,13 +220,19 @@ class TestContainers(PodmanTestCase):
self.assertTrue(ctnr.status, 'running')
# creating cgoups can be flakey
- @retry(podman.libs.errors.ErrorOccurred, tries=16, delay=2, print_=print)
+ @retry(podman.libs.errors.ErrorOccurred, tries=4, delay=2, print_=print)
def test_stats(self):
- self.assertTrue(self.alpine_ctnr.running)
-
- actual = self.alpine_ctnr.stats()
- self.assertEqual(self.alpine_ctnr.id, actual.id)
- self.assertEqual(self.alpine_ctnr.names, actual.name)
+ try:
+ self.assertTrue(self.alpine_ctnr.running)
+
+ actual = self.alpine_ctnr.stats()
+ self.assertEqual(self.alpine_ctnr.id, actual.id)
+ self.assertEqual(self.alpine_ctnr.names, actual.name)
+ except Exception:
+ info = Path('/proc/self/mountinfo')
+ with info.open() as fd:
+ print('{} {}'.format(self.alpine_ctnr.id, info))
+ print(fd.read())
def test_logs(self):
self.assertTrue(self.alpine_ctnr.running)