summaryrefslogtreecommitdiff
path: root/test/apiv2/60-auth.at
diff options
context:
space:
mode:
authorMatej Vasek <mvasek@redhat.com>2021-09-15 19:12:31 +0200
committerMatej Vasek <mvasek@redhat.com>2021-09-15 20:01:02 +0200
commit7c5d64b4783c2bf05587b3a4672b35c1e32066c7 (patch)
tree35d8e645c0bf2b4c10b2c2f0d79db894ea6a51a5 /test/apiv2/60-auth.at
parentc0cde378298bd8d5183155c8f62aae574be069eb (diff)
downloadpodman-7c5d64b4783c2bf05587b3a4672b35c1e32066c7.tar.gz
podman-7c5d64b4783c2bf05587b3a4672b35c1e32066c7.tar.bz2
podman-7c5d64b4783c2bf05587b3a4672b35c1e32066c7.zip
Fix /auth compat endpoint
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Diffstat (limited to 'test/apiv2/60-auth.at')
-rw-r--r--test/apiv2/60-auth.at9
1 files changed, 7 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/ \