summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authortroyready <troy@troyready.com>2021-03-02 18:12:29 -0800
committertroyready <troy@troyready.com>2021-03-12 10:39:15 -0800
commit9251b6c8cfaa5db738212c467c79f8c3aceb5b7d (patch)
treedf80a61cdff011b14c987736833dbae96720ab44 /test
parentfc02d16e728dfdd5a5f2e3bc622bbceb7f8c0d24 (diff)
downloadpodman-9251b6c8cfaa5db738212c467c79f8c3aceb5b7d.tar.gz
podman-9251b6c8cfaa5db738212c467c79f8c3aceb5b7d.tar.bz2
podman-9251b6c8cfaa5db738212c467c79f8c3aceb5b7d.zip
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 <troy@troyready.com>
Diffstat (limited to 'test')
-rw-r--r--test/apiv2/rest_api/test_rest_v2_0_0.py21
1 files changed, 11 insertions, 10 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 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")