Skip to content

Commit

Permalink
test: Add profile creation test with YAML
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Mougard <[email protected]>
  • Loading branch information
gabrielmougard committed Aug 5, 2024
1 parent 915315f commit 3f117a1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/suites/basic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,27 @@ test_basic_usage() {
lxc profile delete foo
lxc delete -f c1

# Test assigning a profile through a YAML file to an instance.
poolName=$(lxc profile device get default root pool)
lxc profile create foo < <(cat <<EOF
config:
limits.cpu: 2
limits.memory: 1024MB
description: Test profile
devices:
root:
path: /
pool: ${poolName}
type: disk
EOF
)
lxc init testimage c1
lxc profile assign c1 foo
lxc config show c1 --expanded | grep -q "limits.cpu: \"2\""
lxc config show c1 --expanded | grep -q "limits.memory: 1024MB"
lxc delete -f c1
lxc profile delete foo

# Multiple ephemeral instances delete
lxc launch testimage c1
lxc launch testimage c2
Expand Down

0 comments on commit 3f117a1

Please sign in to comment.