summaryrefslogtreecommitdiff
path: root/test/apiv2
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2021-08-16 15:46:33 +0000
committerGitHub <noreply@github.com>2021-08-16 15:46:33 +0000
commit8c228bdbd031e5930e6319e8fe25b3ff340919f3 (patch)
treef78d327c04dc6fd1186a47ecc7c292a270ab54c2 /test/apiv2
parent26b1dddda7aca89e57608ea232e84a1802591562 (diff)
parent12ac4198caa0e0493f22b6f611023266449253d8 (diff)
downloadpodman-8c228bdbd031e5930e6319e8fe25b3ff340919f3.tar.gz
podman-8c228bdbd031e5930e6319e8fe25b3ff340919f3.tar.bz2
podman-8c228bdbd031e5930e6319e8fe25b3ff340919f3.zip
Merge pull request #11154 from cdoern/imagesPull
Libpod images pull changes
Diffstat (limited to 'test/apiv2')
-rw-r--r--test/apiv2/python/rest_api/test_v2_0_0_image.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/apiv2/python/rest_api/test_v2_0_0_image.py b/test/apiv2/python/rest_api/test_v2_0_0_image.py
index 3e8ecb1ef..bcacaa935 100644
--- a/test/apiv2/python/rest_api/test_v2_0_0_image.py
+++ b/test/apiv2/python/rest_api/test_v2_0_0_image.py
@@ -87,6 +87,27 @@ class ImageTestCase(APITestCase):
self.assertTrue(keys["images"], "Expected to find images stanza")
self.assertTrue(keys["stream"], "Expected to find stream progress stanza's")
+ r = requests.post(self.uri("/images/pull?reference=alpine&quiet=true"), timeout=15)
+ self.assertEqual(r.status_code, 200, r.status_code)
+ text = r.text
+ keys = {
+ "error": False,
+ "id": False,
+ "images": False,
+ "stream": False,
+ }
+ # Read and record stanza's from pull
+ for line in str.splitlines(text):
+ obj = json.loads(line)
+ key_list = list(obj.keys())
+ for k in key_list:
+ keys[k] = True
+
+ self.assertFalse(keys["error"], "Expected no errors")
+ self.assertTrue(keys["id"], "Expected to find id stanza")
+ self.assertTrue(keys["images"], "Expected to find images stanza")
+ self.assertFalse(keys["stream"], "Expected to find stream progress stanza's")
+
def test_create(self):
r = requests.post(
self.podman_url + "/v1.40/images/create?fromImage=alpine&platform=linux/amd64/v8",