New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: fix for preseeding failures #8528
Changes from all commits
0a9a25f
b0aa757
2f5485a
b98b07e
0627c20
8dd752e
5be61dc
7131f40
2074f17
a515434
63402a3
c443a80
50727f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ description: | | |
can be undone with --reset flag. | ||
|
||
# TODO: reenable for ubuntu-20.04-*, that now uses the snapd snap | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this TODO can be deleted, no? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's remove this in the next pass. |
||
systems: [ubuntu-19.10-*] | ||
systems: [ubuntu-19.10-*, ubuntu-20.04-*] | ||
|
||
environment: | ||
IMAGE_MOUNTPOINT: /mnt/cloudimg | ||
|
@@ -17,13 +17,17 @@ prepare: | | |
wget "$(get_image_url_for_nested_vm)" -O cloudimg.img | ||
mkdir -p "$IMAGE_MOUNTPOINT" | ||
|
||
#shellcheck source=tests/lib/preseed.sh | ||
. "$TESTSLIB/preseed.sh" | ||
mount_ubuntu_image "$(pwd)/cloudimg.img" "$IMAGE_MOUNTPOINT" | ||
|
||
restore: | | ||
rm -f before-preseeding.txt | ||
rm -f after-reset.txt | ||
|
||
# any of the restore commands can fail depending on where execute part stopped, | ||
# account for that with ||true. | ||
umount_ubuntu_image "$IMAGE_MOUNTPOINT" || true | ||
#shellcheck source=tests/lib/preseed.sh | ||
. "$TESTSLIB/preseed.sh" | ||
umount_ubuntu_image "$IMAGE_MOUNTPOINT" | ||
|
||
execute: | | ||
find_files() { | ||
|
@@ -36,11 +40,6 @@ execute: | | |
fi | ||
} | ||
|
||
#shellcheck source=tests/lib/preseed.sh | ||
. "$TESTSLIB/preseed.sh" | ||
mount_ubuntu_image cloudimg.img "$IMAGE_MOUNTPOINT" | ||
setup_preseeding "$IMAGE_MOUNTPOINT" | ||
|
||
find_files > before-preseeding.txt | ||
|
||
echo "Running pre-seeeding" | ||
|
@@ -68,6 +67,3 @@ execute: | | |
echo "Running preseeeding again should succeed" | ||
/usr/lib/snapd/snap-preseed "$IMAGE_MOUNTPOINT" | ||
|
||
#shellcheck source=tests/lib/preseed.sh | ||
. "$TESTSLIB/preseed.sh" | ||
umount_ubuntu_image "$IMAGE_MOUNTPOINT" |
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice fix!