Skip to content

Commit

Permalink
Merge pull request #574 from simondeziel/ubuntu-daily
Browse files Browse the repository at this point in the history
Switch to `ubuntu-daily:` for integration tests inside LXD containers
  • Loading branch information
tomponline authored Feb 27, 2024
2 parents 3e40cd3 + 06ab061 commit 4d4b450
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions integration/run-integration-tests
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ save_trust_list() {
OLD_TRUST_LIST="$(mktemp)"
save_trust_list > "${OLD_TRUST_LIST}"

# Report which LXD version is being tested
snap list lxd || true
lxc version

# finally run the integration tests
tox -e integration

Expand Down
6 changes: 4 additions & 2 deletions integration/run-integration-tests-in-lxd
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,23 @@ DIR="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
declare -A RELEASE_IMAGES=(
[focal]="20.04"
[jammy]="22.04"
[noble]="24.04"
)

function run_tests {
local target="$1"
local image="${RELEASE_IMAGES[$target]}"
local container_name="pylxd-${target}-$$"
local container_image="ubuntu:${image}"
local container_image="ubuntu-daily:${image}"
echo "Running ${image} integration tests"

lxc launch --ephemeral "$container_image" "$container_name" -c security.nesting=true

lxc exec "$container_name" -- mkdir -p /opt/pylxd
{ cd "$DIR/.." && git archive --format=tar HEAD; } | lxc exec "$container_name" -- tar -xf - -C /opt/pylxd

lxc exec "$container_name" -- cloud-init status --long --wait
# Workaround https://github.com/canonical/cloud-init/pull/4970
lxc exec "$container_name" -- cloud-init status --long --wait || true
lxc exec "$container_name" --cwd /opt/pylxd -- integration/run-integration-tests
lxc delete --force "$container_name"
}
Expand Down

0 comments on commit 4d4b450

Please sign in to comment.