From 1102a80bca056e4485162ce504af41c2664da48f Mon Sep 17 00:00:00 2001 From: Mark Laing Date: Fri, 21 Jun 2024 15:18:45 +0100 Subject: [PATCH] Revert "test/suites/remote: update expected behavior when accessing restricted projects" This reverts commit 6d8e56880fedb44805d26e262933da1fffc552a2. Signed-off-by: Mark Laing --- test/suites/remote.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/suites/remote.sh b/test/suites/remote.sh index 10782d29fad9..e5329c7e1cc4 100644 --- a/test/suites/remote.sh +++ b/test/suites/remote.sh @@ -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')"