summaryrefslogtreecommitdiff
path: root/test/apiv2
diff options
context:
space:
mode:
Diffstat (limited to 'test/apiv2')
-rw-r--r--test/apiv2/35-networks.at4
-rw-r--r--test/apiv2/44-mounts.at9
-rw-r--r--test/apiv2/60-auth.at24
-rw-r--r--test/apiv2/rest_api/test_rest_v2_0_0.py11
4 files changed, 20 insertions, 28 deletions
diff --git a/test/apiv2/35-networks.at b/test/apiv2/35-networks.at
index 98786e914..ce7ca628a 100644
--- a/test/apiv2/35-networks.at
+++ b/test/apiv2/35-networks.at
@@ -30,6 +30,10 @@ t GET libpod/networks/json?filters='{"name":["network1"]}' 200 \
.[0].Name=network1
t GET networks 200
+#inspect network
+t GET libpod/networks/network1/json 200 \
+ .name="network1"
+
#network list docker endpoint
t GET networks?filters='{"name":["network1","network2"]}' 200 \
length=2
diff --git a/test/apiv2/44-mounts.at b/test/apiv2/44-mounts.at
index 901245da6..d54669e7d 100644
--- a/test/apiv2/44-mounts.at
+++ b/test/apiv2/44-mounts.at
@@ -6,7 +6,7 @@ podman pull $IMAGE &>/dev/null
tmpfs_name="/mytmpfs"
t POST containers/create?name=hostconfig_test \
Image=$IMAGE \
- Cmd='["df"]' \
+ Cmd='["df","-P","'$tmpfs_name'"]' \
HostConfig='{"Binds":["/tmp/doesnotexist:/test1"]' \
TmpFs="{\"$tmpfs_name\":\"rw\"}}" \
201 \
@@ -22,5 +22,10 @@ t POST containers/${cid}/start 204
t POST containers/${cid}/wait 200
t GET containers/${cid}/logs?stdout=true 200
-like "$(<$WORKDIR/curl.result.out)" ".* ${tmpfs_name}" \
+# /logs returns application/octet-stream, which our test helper saves in
+# an outfile rather than returning in $output. That's why we can't test
+# this directly in the /logs test above; instead, we rely on knowing the
+# path to the stored results. The 'tr' is needed because there may be
+# null bytes in the outfile.
+like "$(tr -d \\0 <$WORKDIR/curl.result.out)" ".* ${tmpfs_name}" \
"'df' output includes tmpfs name"
diff --git a/test/apiv2/60-auth.at b/test/apiv2/60-auth.at
index 378955cd7..cfde519c1 100644
--- a/test/apiv2/60-auth.at
+++ b/test/apiv2/60-auth.at
@@ -5,25 +5,19 @@
start_registry
-# FIXME FIXME FIXME: remove the 'if false' for use with PR 9589
-if false; then
-
-# FIXME FIXME: please forgive the horrible POST params format; I have an
-# upcoming PR which should fix that.
-
# 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/\"" \
+t POST /v1.40/auth username=$REGISTRY_USERNAME password=WrOnGPassWord serveraddress=localhost:$REGISTRY_PORT/ \
400 \
.Status~'.* invalid username/password'
-# Test with the right password. Confirm status message and reasonable token
-t POST /v1.40/auth "\"username\":\"${REGISTRY_USERNAME}\",\"password\":\"${REGISTRY_PASSWORD}\",\"serveraddress\":\"localhost:$REGISTRY_PORT/\"" \
+# Test with the right password. Confirm status message
+t POST /v1.40/auth username=$REGISTRY_USERNAME password=$REGISTRY_PASSWORD serveraddress=localhost:$REGISTRY_PORT/ \
200 \
.Status="Login Succeeded" \
- .IdentityToken~[a-zA-Z0-9]
-
-# FIXME: now what? Try something-something using that token?
-token=$(jq -r .IdentityToken <<<"$output")
-# ...
+ .IdentityToken=""
-fi # FIXME FIXME FIXME: remove when working
+# Same test with url scheme provided
+t POST /v1.40/auth username=$REGISTRY_USERNAME password=$REGISTRY_PASSWORD serveraddress=https://localhost:$REGISTRY_PORT/ \
+ 200 \
+ .Status="Login Succeeded" \
+ .IdentityToken=""
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..d7910f555 100644
--- a/test/apiv2/rest_api/test_rest_v2_0_0.py
+++ b/test/apiv2/rest_api/test_rest_v2_0_0.py
@@ -555,17 +555,6 @@ 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)
-
def test_version(self):
r = requests.get(PODMAN_URL + "/v1.40/version")
self.assertEqual(r.status_code, 200, r.content)