aboutsummaryrefslogtreecommitdiff
path: root/test/apiv2/60-auth.at
blob: cfde519c1666384c0bf746b8409ea28440433d78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# -*- sh -*-
#
# registry-related tests
#

start_registry

# 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'

# 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=""

# 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=""