Skip to content

Commit 7244047

Browse files
committed
tests: Update for re-organized internal endpoints
Signed-off-by: Stéphane Graber <[email protected]>
1 parent 162dba4 commit 7244047

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

test/suites/clustering.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -2782,7 +2782,7 @@ test_clustering_image_refresh() {
27822782

27832783
# Trigger image refresh on all nodes
27842784
for incus_dir in "${INCUS_ONE_DIR}" "${INCUS_TWO_DIR}" "${INCUS_THREE_DIR}"; do
2785-
INCUS_DIR="${incus_dir}" incus query /internal/testing/image-refresh &
2785+
INCUS_DIR="${incus_dir}" incus query /internal/debug/image-refresh &
27862786
pids="$! ${pids}"
27872787
done
27882788

@@ -2820,7 +2820,7 @@ test_clustering_image_refresh() {
28202820
# Trigger image refresh on all nodes. This shouldn't do anything as the image
28212821
# is already up-to-date.
28222822
for incus_dir in "${INCUS_ONE_DIR}" "${INCUS_TWO_DIR}" "${INCUS_THREE_DIR}"; do
2823-
INCUS_DIR="${incus_dir}" incus query /internal/testing/image-refresh &
2823+
INCUS_DIR="${incus_dir}" incus query /internal/debug/image-refresh &
28242824
pids="$! ${pids}"
28252825
done
28262826

@@ -2846,7 +2846,7 @@ test_clustering_image_refresh() {
28462846

28472847
# Trigger image refresh on all nodes
28482848
for incus_dir in "${INCUS_ONE_DIR}" "${INCUS_TWO_DIR}" "${INCUS_THREE_DIR}"; do
2849-
INCUS_DIR="${incus_dir}" incus query /internal/testing/image-refresh &
2849+
INCUS_DIR="${incus_dir}" incus query /internal/debug/image-refresh &
28502850
pids="$! ${pids}"
28512851
done
28522852

test/suites/fdleak.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ test_fdleak() {
2222
done
2323

2424
incus list
25-
incus query /internal/gc
25+
incus query /internal/debug/gc
2626

2727
exit 0
2828
)

test/suites/network_forward.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ test_network_forward() {
3030
incus network forward show "${netName}" 198.51.100.1 | grep -q -F "description: Test network forward"
3131

3232
# Check forward is exported via BGP prefixes.
33-
incus query /internal/testing/bgp | grep "198.51.100.1/32"
33+
incus query /internal/debug/bgp | grep "198.51.100.1/32"
3434

3535
incus network forward delete "${netName}" 198.51.100.1
3636

3737
# Check deleting network forward removes forward BGP prefix.
38-
! incus query /internal/testing/bgp | grep "198.51.100.1/32" || false
38+
! incus query /internal/debug/bgp | grep "198.51.100.1/32" || false
3939

4040
# Check creating forward with default target creates valid firewall rules.
4141
incus network forward create "${netName}" 198.51.100.1 target_address=192.0.2.2
@@ -140,13 +140,13 @@ test_network_forward() {
140140
fi
141141

142142
# Check forward is exported via BGP prefixes before network delete.
143-
incus query /internal/testing/bgp | grep "198.51.100.1/32"
143+
incus query /internal/debug/bgp | grep "198.51.100.1/32"
144144

145145
# Check deleting the network clears the forward firewall rules.
146146
incus network delete "${netName}"
147147

148148
# Check deleting network removes forward BGP prefix.
149-
! incus query /internal/testing/bgp | grep "198.51.100.1/32" || false
149+
! incus query /internal/debug/bgp | grep "198.51.100.1/32" || false
150150

151151
if [ "$firewallDriver" = "xtables" ]; then
152152
! iptables -w -t nat -S | grep -c "generated for Incus network-forward ${netName}" || false

test/suites/warnings.sh

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ test_warnings() {
33
incus query --wait /1.0/warnings\?recursion=1 | jq -r '.[].uuid' | xargs -n1 incus warning delete
44

55
# Create a global warning (no node and no project)
6-
incus query --wait -X POST -d '{\"type_code\": 0, \"message\": \"global warning\"}' /internal/testing/warnings
6+
incus query --wait -X POST -d '{\"type_code\": 0, \"message\": \"global warning\"}' /internal/debug/warnings
77

88
# More valid queries
9-
incus query --wait -X POST -d '{\"type_code\": 0, \"message\": \"global warning\", \"project\": \"default\"}' /internal/testing/warnings
9+
incus query --wait -X POST -d '{\"type_code\": 0, \"message\": \"global warning\", \"project\": \"default\"}' /internal/debug/warnings
1010

1111
# Update the last warning. This will not create a new warning.
12-
incus query --wait -X POST -d '{\"type_code\": 0, \"message\": \"global warning 2\", \"project\": \"default\"}' /internal/testing/warnings
12+
incus query --wait -X POST -d '{\"type_code\": 0, \"message\": \"global warning 2\", \"project\": \"default\"}' /internal/debug/warnings
1313

1414
# There should be two warnings now.
1515
count=$(incus query --wait /1.0/warnings | jq 'length')
@@ -19,21 +19,21 @@ test_warnings() {
1919
[ "${count}" -eq 2 ] || false
2020

2121
# Invalid query (unknown project)
22-
! incus query --wait -X POST -d '{\"type_code\": 0, \"message\": \"global warning\", \"project\": \"foo\"}' /internal/testing/warnings || false
22+
! incus query --wait -X POST -d '{\"type_code\": 0, \"message\": \"global warning\", \"project\": \"foo\"}' /internal/debug/warnings || false
2323

2424
# Invalid query (unknown type code)
25-
! incus query --wait -X POST -d '{\"type_code\": 999, \"message\": \"global warning\"}' /internal/testing/warnings || false
25+
! incus query --wait -X POST -d '{\"type_code\": 999, \"message\": \"global warning\"}' /internal/debug/warnings || false
2626

2727
# Both entity type code as entity ID need to be valid otherwise no warning will be created. Note that empty/null values are valid as well.
28-
! incus query --wait -X POST -d '{\"type_code\": 0, \"message\": \"global warning\", \"entity_type_code\": 0, \"entity_id\": 0}' /internal/testing/warnings || false
28+
! incus query --wait -X POST -d '{\"type_code\": 0, \"message\": \"global warning\", \"entity_type_code\": 0, \"entity_id\": 0}' /internal/debug/warnings || false
2929

3030
ensure_import_testimage
3131

3232
# Get image ID from database instead of assuming it
3333
image_id=$(echo 'select image_id from images_aliases where name="testimage"' | incus admin sql global - | grep -Eo '[[:digit:]]+')
3434

3535
# Create a warning with entity type "image" and entity ID ${image_id} (the imported testimage)
36-
incus query --wait -X POST -d "{\\\"type_code\\\": 0, \\\"message\\\": \\\"global warning\\\", \\\"entity_type_code\\\": 1, \\\"entity_id\\\": ${image_id}}" /internal/testing/warnings
36+
incus query --wait -X POST -d "{\\\"type_code\\\": 0, \\\"message\\\": \\\"global warning\\\", \\\"entity_type_code\\\": 1, \\\"entity_id\\\": ${image_id}}" /internal/debug/warnings
3737

3838
# There should be three warnings now.
3939
count=$(incus warning list --format json | jq 'length')

0 commit comments

Comments
 (0)