summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2021-04-09 11:00:06 -0700
committerJhon Honce <jhonce@redhat.com>2021-04-09 11:00:06 -0700
commitd41c33eb91e6890de80826eba98dcc80e9e1994a (patch)
tree1ab2f6078c5cc7581f9ef9a3593bd74e650edccf /test
parent54dce001cce131bbbdcf16512a4722e080561fc7 (diff)
downloadpodman-d41c33eb91e6890de80826eba98dcc80e9e1994a.tar.gz
podman-d41c33eb91e6890de80826eba98dcc80e9e1994a.tar.bz2
podman-d41c33eb91e6890de80826eba98dcc80e9e1994a.zip
Update manifest API endpoints
* Add validation for manifest name * Always return an array for manifests even if empty * Add missing return in df handler when returning error. Caused an additional null to be written to client crashing python decoder. When c/image is refactored to include manifests, manifest endpoints should be revisited. Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/apiv2/rest_api/test_rest_v2_0_0.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/apiv2/rest_api/test_rest_v2_0_0.py b/test/apiv2/rest_api/test_rest_v2_0_0.py
index e3874c182..97336cb71 100644
--- a/test/apiv2/rest_api/test_rest_v2_0_0.py
+++ b/test/apiv2/rest_api/test_rest_v2_0_0.py
@@ -727,10 +727,13 @@ class TestApi(unittest.TestCase):
start = json.loads(r.text)
self.assertGreater(len(start["Errs"]), 0, r.text)
+ def test_manifest_409(self):
+ r = requests.post(_url("/manifests/create"), params={"name": "ThisIsAnInvalidImage"})
+ self.assertEqual(r.status_code, 400, r.text)
+
def test_df(self):
r = requests.get(_url("/system/df"))
self.assertEqual(r.status_code, 200, r.text)
-
if __name__ == "__main__":
unittest.main()