summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/apiv2/python/rest_api/test_v2_0_0_image.py21
-rw-r--r--test/python/requirements.txt2
-rw-r--r--test/system/500-networking.bats3
3 files changed, 25 insertions, 1 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",
diff --git a/test/python/requirements.txt b/test/python/requirements.txt
index ee85bf1d1..f177f76fc 100644
--- a/test/python/requirements.txt
+++ b/test/python/requirements.txt
@@ -1,5 +1,5 @@
docker~=4.4.3
-
+requests-mock~=1.9.3
requests~=2.20.0
setuptools~=50.3.2
python-dateutil~=2.8.1
diff --git a/test/system/500-networking.bats b/test/system/500-networking.bats
index 6ffee7eaf..3ebe45e63 100644
--- a/test/system/500-networking.bats
+++ b/test/system/500-networking.bats
@@ -210,6 +210,9 @@ load helpers
$IMAGE nc -l -n -v -p $myport
cid="$output"
+ # check that dns is working inside the container
+ run_podman exec $cid nslookup google.com
+
# emit random string, and check it
teststring=$(random_string 30)
echo "$teststring" | nc 127.0.0.1 $myport