diff --git a/test/suites/basic.sh b/test/suites/basic.sh index ad5cf5b8716..6fdc8779ade 100644 --- a/test/suites/basic.sh +++ b/test/suites/basic.sh @@ -34,6 +34,11 @@ test_basic_usage() { incus image alias list | grep -qv foo # the old name is gone incus image alias delete bar + # Test an alias with description + incus image alias create baz "${sum}" --description "Test description" + incus image alias list | grep -q 'Test description' + incus image delete baz + # Test image list output formats (table & json) incus image list --format table | grep -q testimage incus image list --format json \ @@ -373,7 +378,7 @@ test_basic_usage() { kill_incus "${INCUS_ACTIVATION_DIR}" # Create and start a container - incus launch testimage foo + incus launch testimage foo --description "Test container" incus list | grep foo | grep RUNNING incus stop foo --force diff --git a/test/suites/clustering.sh b/test/suites/clustering.sh index 1c4836902c8..7e47c640dbc 100644 --- a/test/suites/clustering.sh +++ b/test/suites/clustering.sh @@ -3449,8 +3449,9 @@ test_clustering_groups() { ! incus cluster group remove cluster:node1 default || false # Create new cluster group which should be empty - incus cluster group create cluster:foobar + incus cluster group create cluster:foobar --description "Test description" [ "$(incus query cluster:/1.0/cluster/groups/foobar | jq '.members | length')" -eq 0 ] + [ "$(incus query cluster:/1.0/cluster/groups/foobar | jq '.description == "Test description"')" = "true" ] # Copy both description and members from default group incus cluster group show cluster:default | incus cluster group edit cluster:foobar diff --git a/test/suites/config.sh b/test/suites/config.sh index f2bbea72f93..372c3a7b5ed 100644 --- a/test/suites/config.sh +++ b/test/suites/config.sh @@ -148,6 +148,11 @@ test_config_profiles() { incus profile remove foo one [ "$(incus list -f json foo | jq -r '.[0].profiles | join(" ")')" = "" ] + # check that we can create a profile with a description + incus profile create foo --description bar + incus profile ls | grep -q bar + incus profile delete foo + incus profile create stdintest echo "BADCONF" | incus profile set stdintest user.user_data - incus profile show stdintest | grep BADCONF diff --git a/test/suites/network.sh b/test/suites/network.sh index 16019bda1cd..40641829436 100644 --- a/test/suites/network.sh +++ b/test/suites/network.sh @@ -49,8 +49,11 @@ test_network() { incus network delete inct$$ # edit network description - incus network create inct$$ + incus network create inct$$ --description "Test description" + incus network list | grep -q 'Test description' + incus network show inct$$ | grep -q 'description: Test description' incus network show inct$$ | sed 's/^description:.*/description: foo/' | incus network edit inct$$ + incus network list | grep -q 'foo' incus network show inct$$ | grep -q 'description: foo' incus network delete inct$$ diff --git a/test/suites/network_acl.sh b/test/suites/network_acl.sh index d0b8e2f9e7b..717797cba6b 100644 --- a/test/suites/network_acl.sh +++ b/test/suites/network_acl.sh @@ -17,6 +17,10 @@ test_network_acl() { ! incus network acl ls | grep testacl || false ! incus network acl ls --project testproj | grep testacl || false incus project delete testproj + incus network acl create testacl --description "Test description" + incus network acl list | grep -q -F 'Test description' + incus netwrok acl show testacl | grep -q -F 'description: Test description' + incus network acl delete testacl # ACL creation from stdin. cat <