Skip to content

Commit

Permalink
Skip deploy_charm_placement_directive on lxd without kvm.
Browse files Browse the repository at this point in the history
  • Loading branch information
hpidcock committed May 31, 2024
1 parent 50a1e23 commit c427ced
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tests/suites/deploy/deploy_charms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ run_deploy_charm_placement_directive() {
expected_base="[email protected]"
# Setup machines for placement based on provider used for test.
# Container in container doesn't work consistently enough,
# for test. Use kvm via lxc instead if it is available.
if [[ ${BOOTSTRAP_PROVIDER} == "lxd" ]] && stat /dev/kvm; then
# for test. Use kvm via lxc.
if [[ ${BOOTSTRAP_PROVIDER} == "lxd" ]]; then
juju add-machine --base "${expected_base}" --constraints="virt-type=virtual-machine"
else
juju add-machine --base "${expected_base}"
Expand Down Expand Up @@ -352,13 +352,17 @@ test_deploy_charms() {
cd .. || exit

run "run_deploy_charm"
run "run_deploy_charm_placement_directive"
run "run_deploy_specific_series"
run "run_resolve_charm"
run "run_deploy_charm_unsupported_series"

case "${BOOTSTRAP_PROVIDER:-}" in
"lxd")
if stat /dev/kvm; then
run "run_deploy_charm_placement_directive"
else
echo "==> TEST SKIPPED: deploy_charm_placement_directive - lxd without kvm is not supported"
fi
run "run_deploy_lxd_to_machine"
run "run_deploy_lxd_profile_charm"
run "run_deploy_local_predeployed_charm"
Expand All @@ -367,6 +371,7 @@ test_deploy_charms() {
echo "==> TEST SKIPPED: deploy_lxd_profile_charm_container - tests for non LXD only"
;;
*)
run "run_deploy_charm_placement_directive"
echo "==> TEST SKIPPED: deploy_lxd_to_machine - tests for LXD only"
echo "==> TEST SKIPPED: deploy_lxd_profile_charm - tests for LXD only"
echo "==> TEST SKIPPED: deploy_local_lxd_profile_charm - tests for LXD only"
Expand Down

0 comments on commit c427ced

Please sign in to comment.