Skip to content

Commit

Permalink
test/suites: Test that pending TLS identities are pruned.
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Laing <[email protected]>
  • Loading branch information
markylaing committed Oct 23, 2024
1 parent 6f92f05 commit ece5b8d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/suites/auth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ test_authorization() {
LXD_CONF="${LXD_CONF3}" gen_cert_and_key "client"
! LXD_CONF="${LXD_CONF3}" lxc remote add tls "${tls_identity_token2}" || false

# Check token prune task works
[ "$(lxc auth identity list --format csv | grep -cF 'pending')" = 1 ]
lxc query --request POST /internal/testing/prune-tokens
[ "$(lxc auth identity list --format csv | grep -cF 'pending')" = 0 ]

# Check users have been added to the group.
tls_identity_fingerprint="$(cert_fingerprint "${LXD_CONF2}/client.crt")"
lxc auth identity list --format csv | grep -Fq 'oidc,OIDC client," ",[email protected],test-group'
Expand Down

0 comments on commit ece5b8d

Please sign in to comment.