Skip to content

Commit

Permalink
test/suites: Test that a server administrator can view unmanaged netw…
Browse files Browse the repository at this point in the history
…orks.

Signed-off-by: Mark Laing <[email protected]>
  • Loading branch information
markylaing committed Nov 12, 2024
1 parent d84ff0c commit 20724a7
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 @@ -406,6 +406,11 @@ user_is_server_admin() {
lxc_remote storage set "${remote}:test-pool" rsync.compression=true
lxc_remote storage show "${remote}:test-pool" | grep -Fq 'rsync.compression:'
lxc_remote storage delete "${remote}:test-pool"

# Should be able to view all managed and unmanaged networks
host_networks="$(ip a | grep -P '^\d+:' | cut -d' ' -f2 | tr -d ':' | grep -vP '^veth.*' | sort)"
lxd_networks="$(lxc_remote query "${remote}:/1.0/networks?recursion=1" | jq -r '.[].name' | sort)"
[ "${host_networks}" = "${lxd_networks}" ]
}

user_is_server_operator() {
Expand Down

0 comments on commit 20724a7

Please sign in to comment.