aboutsummaryrefslogtreecommitdiff
path: root/test/apiv2
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-09-22 18:35:48 -0400
committerGitHub <noreply@github.com>2021-09-22 18:35:48 -0400
commitc58a677f8edc36c32728a87a6ac2c48d244d7ea2 (patch)
tree9036af20111c5dfff60cf92dc930f5e528df8a2d /test/apiv2
parent20587dfb7d26781aaa31b11c984f7dec8e79a282 (diff)
parent8ee18bde152da71f1b7ba9d7575324321be630d6 (diff)
downloadpodman-c58a677f8edc36c32728a87a6ac2c48d244d7ea2.tar.gz
podman-c58a677f8edc36c32728a87a6ac2c48d244d7ea2.tar.bz2
podman-c58a677f8edc36c32728a87a6ac2c48d244d7ea2.zip
Merge pull request #11705 from mheon/340
Release 3.4.0-rc2 (inc. backports)
Diffstat (limited to 'test/apiv2')
-rw-r--r--test/apiv2/60-auth.at9
-rw-r--r--test/apiv2/python/rest_api/test_v2_0_0_image.py5
2 files changed, 12 insertions, 2 deletions
diff --git a/test/apiv2/60-auth.at b/test/apiv2/60-auth.at
index cfde519c1..1e087d12b 100644
--- a/test/apiv2/60-auth.at
+++ b/test/apiv2/60-auth.at
@@ -5,10 +5,15 @@
start_registry
+# Test unreachable
+t POST /v1.40/auth username=$REGISTRY_USERNAME password=WrOnGPassWord serveraddress=does.not.exist.io:1234/ \
+ 500 \
+ .message~'.*no such host.*'
+
# Test with wrong password. Confirm bad status and appropriate error message
t POST /v1.40/auth username=$REGISTRY_USERNAME password=WrOnGPassWord serveraddress=localhost:$REGISTRY_PORT/ \
- 400 \
- .Status~'.* invalid username/password'
+ 500 \
+ .message~'.* 401 Unauthorized'
# Test with the right password. Confirm status message
t POST /v1.40/auth username=$REGISTRY_USERNAME password=$REGISTRY_PASSWORD serveraddress=localhost:$REGISTRY_PORT/ \
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 bcacaa935..58d03b149 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
@@ -32,6 +32,9 @@ class ImageTestCase(APITestCase):
for k in required_keys:
self.assertIn(k, item)
+ # Id should be prefixed with sha256: (#11645)
+ self.assertIn("sha256:",item['Id'])
+
def test_inspect(self):
r = requests.get(self.podman_url + "/v1.40/images/alpine/json")
self.assertEqual(r.status_code, 200, r.text)
@@ -59,6 +62,8 @@ class ImageTestCase(APITestCase):
for item in required_keys:
self.assertIn(item, image)
_ = parse(image["Created"])
+ # Id should be prefixed with sha256: (#11645)
+ self.assertIn("sha256:",image['Id'])
def test_delete(self):
r = requests.delete(self.podman_url + "/v1.40/images/alpine?force=true")