diff --git a/tests/assets/config_with_rebot.yaml b/tests/assets/config_with_rebot.yaml new file mode 100644 index 000000000..c28f6d547 --- /dev/null +++ b/tests/assets/config_with_rebot.yaml @@ -0,0 +1,15 @@ +#cloud-config + +install: + reboot: true + grub_options: + extra_cmdline: "rd.immucore.debug" + +stages: + initramfs: + - name: "Set user and password" + users: + kairos: + passwd: "kairos" + - name: "Set hostname" + hostname: kairos-{{ trunc 4 .Random }} diff --git a/tests/provider_decentralized_test.go b/tests/provider_decentralized_test.go index 8e3c83e19..542930b36 100644 --- a/tests/provider_decentralized_test.go +++ b/tests/provider_decentralized_test.go @@ -103,10 +103,11 @@ var _ = Describe("kairos decentralized k8s test", Label("provider", "provider-de Expect(out).Should(ContainSubstring("Kairos remote recovery")) - grub, err := vm.Sudo("cat /tmp/mnt/STATE/grub_oem_env") - Expect(err).ToNot(HaveOccurred(), grub) - - Expect(grub).Should(ContainSubstring("default_menu_entry=Kairos")) + // No longer used. This is created to override the default entry but now the default entry is kairos already + // TODO: Create a test in acceptance to check for the creation of this file and if it has the correct override entry + //grub, err := vm.Sudo("cat /tmp/mnt/STATE/grub_oem_env") + //Expect(err).ToNot(HaveOccurred(), grub) + //Expect(grub).Should(ContainSubstring("default_menu_entry=Kairos")) out, err = vm.Sudo("umount /tmp/mnt/STATE") Expect(err).ToNot(HaveOccurred(), out) diff --git a/tests/provider_install_qrcode_test.go b/tests/provider_install_qrcode_test.go index 15f98e5f1..6d5a9563a 100644 --- a/tests/provider_install_qrcode_test.go +++ b/tests/provider_install_qrcode_test.go @@ -72,7 +72,8 @@ var _ = Describe("kairos qr code install", Label("provider", "provider-qrcode-in Expect(err).ToNot(HaveOccurred(), device) By("registering with a screenshot") - err = register("fatal", fileName, "./assets/config.yaml", strings.TrimSpace(device), true) + // pass a config that auto reboots after install as we cannot know when the machine has finished + err = register("fatal", fileName, "./assets/config_with_reboot.yaml", strings.TrimSpace(device), true) Expect(err).ToNot(HaveOccurred()) By("waiting until it reboots to installed system")