Skip to content

Commit

Permalink
Revert "test/suites/remote: update expected behavior when accessing r…
Browse files Browse the repository at this point in the history
…estricted projects"

This reverts commit 6d8e568.

Signed-off-by: Mark Laing <[email protected]>
  • Loading branch information
markylaing committed Jul 4, 2024
1 parent 8f79540 commit 1102a80
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/suites/remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,8 @@ test_remote_url_with_token() {
# Check if we can see instances in the foo project
[ "$(curl -k -s --key "${TEST_DIR}/token-client.key" --cert "${TEST_DIR}/token-client.crt" "https://${LXD_ADDR}/1.0/instances?project=foo" | jq '.status_code')" -eq 200 ]

# Check if we can see instances in the default project (this should succeed but the instance list should be empty)
[ "$(curl -k -s --key "${TEST_DIR}/token-client.key" --cert "${TEST_DIR}/token-client.crt" "https://${LXD_ADDR}/1.0/instances" | jq '.status_code')" -eq 200 ]
[ "$(curl -k -s --key "${TEST_DIR}/token-client.key" --cert "${TEST_DIR}/token-client.crt" "https://${LXD_ADDR}/1.0/instances" | jq '.metadata')" = '[]' ]
# Check if we can see instances in the default project (this should fail)
[ "$(curl -k -s --key "${TEST_DIR}/token-client.key" --cert "${TEST_DIR}/token-client.crt" "https://${LXD_ADDR}/1.0/instances" | jq '.error_code')" -eq 403 ]

lxc config trust rm "$(lxc config trust list -f json | jq -r '.[].fingerprint')"

Expand Down

0 comments on commit 1102a80

Please sign in to comment.