mirror of
https://github.com/techno-tim/k3s-ansible.git
synced 2026-08-09 07:23:19 +02:00
test(molecule): update Vagrant boxes to current releases
- Use published Bento boxes for Ubuntu 26.04, Debian 13, and Rocky Linux 10.1.\n- Pin exact VirtualBox amd64 box versions in CI.\n- Remove the obsolete Ubuntu SSH workaround and update fixtures.
This commit is contained in:
committed by
Techno Tim
parent
2babd39c89
commit
68d03acc68
@@ -10,12 +10,12 @@ mock_bin="$fixture/bin"
|
||||
mock_state="$fixture/state"
|
||||
mock_home="$fixture/home"
|
||||
mock_vagrant_home="$fixture/vagrant-home"
|
||||
mock_box_dir="$mock_vagrant_home/boxes/generic-VAGRANTSLASH-ubuntu2204/4.3.12/amd64/virtualbox"
|
||||
mock_box_dir="$mock_vagrant_home/boxes/bento-VAGRANTSLASH-ubuntu-26.04/202606.01.0/amd64/virtualbox"
|
||||
mock_vbox_root="$mock_home/VirtualBox VMs"
|
||||
mock_master_root="$mock_home/.cache/k3s-ci/vagrant-masters"
|
||||
lock_file="$fixture/vagrant-boxes.lock"
|
||||
mkdir -p -- "$mock_bin" "$mock_state" "$mock_box_dir" "$mock_vbox_root"
|
||||
printf '%s\n' 'generic/ubuntu2204 4.3.12 amd64' > "$lock_file"
|
||||
printf '%s\n' 'bento/ubuntu-26.04 202606.01.0 amd64' > "$lock_file"
|
||||
ln -s "$repo_root/.github/scripts/test-fixtures/mock-vboxmanage" "$mock_bin/VBoxManage"
|
||||
ln -s "$repo_root/.github/scripts/test-fixtures/mock-vagrant" "$mock_bin/vagrant"
|
||||
ln -s "$repo_root/.github/scripts/test-fixtures/mock-flock" "$mock_bin/flock"
|
||||
@@ -45,8 +45,6 @@ second_output="$fixture/second-output"
|
||||
third_output="$fixture/third-output"
|
||||
|
||||
"$script" > "$first_output"
|
||||
grep -Fq 'config.ssh.username = "vagrant"' "$MOCK_VAGRANTFILE_CAPTURE"
|
||||
grep -Fq 'config.ssh.password = "vagrant"' "$MOCK_VAGRANTFILE_CAPTURE"
|
||||
if grep -Fq 'config.ssh.insert_key' "$MOCK_VAGRANTFILE_CAPTURE"; then
|
||||
printf 'prewarm Vagrantfile unexpectedly overrides Vagrant SSH key insertion\n' >&2
|
||||
exit 1
|
||||
@@ -54,7 +52,7 @@ fi
|
||||
grep -Fq 'virtualbox.memory = 1024' "$MOCK_VAGRANTFILE_CAPTURE"
|
||||
grep -Fq 'virtualbox.cpus = 2' "$MOCK_VAGRANTFILE_CAPTURE"
|
||||
grep -Fq 'config.vm.boot_timeout = 600' "$MOCK_VAGRANTFILE_CAPTURE"
|
||||
mapping_file="$mock_master_root/generic_ubuntu2204-4.3.12-amd64.uuid"
|
||||
mapping_file="$mock_master_root/bento_ubuntu-26.04-202606.01.0-amd64.uuid"
|
||||
test -s "$mapping_file"
|
||||
cmp -s "$mapping_file" "$mock_box_dir/master_id"
|
||||
grep -Fq 'Created and recorded owned master' "$first_output"
|
||||
|
||||
Reference in New Issue
Block a user