From 9251b6c8cfaa5db738212c467c79f8c3aceb5b7d Mon Sep 17 00:00:00 2001 From: troyready Date: Tue, 2 Mar 2021 18:12:29 -0800 Subject: add /auth for docker compatibility This endpoint just validates credentials: https://github.com/moby/moby/blob/v20.10.4/api/swagger.yaml#L7936-L7977 Fixes: #9564 Signed-off-by: troyready --- test/apiv2/rest_api/test_rest_v2_0_0.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'test/apiv2') 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 c0b61ea85..062cf9386 100644 --- a/test/apiv2/rest_api/test_rest_v2_0_0.py +++ b/test/apiv2/rest_api/test_rest_v2_0_0.py @@ -555,16 +555,17 @@ class TestApi(unittest.TestCase): self.assertIn(name, payload["VolumesDeleted"]) self.assertGreater(payload["SpaceReclaimed"], 0) - def test_auth_compat(self): - r = requests.post( - PODMAN_URL + "/v1.40/auth", - json={ - "username": "bozo", - "password": "wedontneednopasswords", - "serveraddress": "https://localhost/v1.40/", - }, - ) - self.assertEqual(r.status_code, 404, r.content) + # TBD: how to test auth endpoint (which in turn requires a docker registry to connect to) + # def test_auth_compat(self): + # r = requests.post( + # PODMAN_URL + "/v1.40/auth", + # json={ + # "username": "bozo", + # "password": "wedontneednopasswords", + # "serveraddress": "https://localhost/v1.40/", + # }, + # ) + # self.assertEqual(r.status_code, 404, r.content) def test_version(self): r = requests.get(PODMAN_URL + "/v1.40/version") -- cgit v1.2.3-54-g00ecf