diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-01-10 11:11:46 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-10 11:11:46 -0800 |
commit | 6524041fb0ebfc35dafe3bb7bebbd4dfa27ba5e8 (patch) | |
tree | cf6e4191124ea1c44b9cadb504c0b2f5e6269a50 /contrib/python/podman/test/test_pods_ctnrs.py | |
parent | e4525cf844535014923a2253e8531d92d9e556e5 (diff) | |
parent | 45fb935fe44a383ae14f16ab533281687d642c5e (diff) | |
download | podman-6524041fb0ebfc35dafe3bb7bebbd4dfa27ba5e8.tar.gz podman-6524041fb0ebfc35dafe3bb7bebbd4dfa27ba5e8.tar.bz2 podman-6524041fb0ebfc35dafe3bb7bebbd4dfa27ba5e8.zip |
Merge pull request #2119 from jwhonce/wip/python_podman
Move python code from contrib to it's own repo python-podman
Diffstat (limited to 'contrib/python/podman/test/test_pods_ctnrs.py')
-rw-r--r-- | contrib/python/podman/test/test_pods_ctnrs.py | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/contrib/python/podman/test/test_pods_ctnrs.py b/contrib/python/podman/test/test_pods_ctnrs.py deleted file mode 100644 index 009e30720..000000000 --- a/contrib/python/podman/test/test_pods_ctnrs.py +++ /dev/null @@ -1,66 +0,0 @@ -import os -from test.podman_testcase import PodmanTestCase - -import podman -from podman import FoldedString - -pod = None - - -class TestPodsCtnrs(PodmanTestCase): - @classmethod - def setUpClass(cls): - # Populate storage - super().setUpClass() - - @classmethod - def tearDownClass(cls): - super().tearDownClass() - - def setUp(self): - self.tmpdir = os.environ['TMPDIR'] - self.host = os.environ['PODMAN_HOST'] - - self.pclient = podman.Client(self.host) - - def test_010_populate(self): - global pod - - pod = self.pclient.pods.create('pod1') - self.assertEqual('pod1', pod.name) - - img = self.pclient.images.get('docker.io/library/alpine:latest') - ctnr = img.container(pod=pod.id) - - pod.refresh() - self.assertEqual('1', pod.numberofcontainers) - self.assertEqual(ctnr.id, pod.containersinfo[0]['id']) - - def test_015_one_shot(self): - global pod - - details = pod.inspect() - state = FoldedString(details.containers[0]['state']) - self.assertEqual(state, 'configured') - - pod = pod.start() - status = FoldedString(pod.containersinfo[0]['status']) - # Race on whether container is still running or finished - self.assertIn(status, ('stopped', 'exited', 'running')) - - pod = pod.restart() - status = FoldedString(pod.containersinfo[0]['status']) - self.assertIn(status, ('stopped', 'exited', 'running')) - - # Pod kill is broken, so use stop for now - killed = pod.stop() - self.assertEqual(pod, killed) - - def test_999_remove(self): - global pod - - ident = pod.remove(force=True) - self.assertEqual(ident, pod.id) - - with self.assertRaises(StopIteration): - next(self.pclient.pods.list()) |