Skip to content

Commit

Permalink
Debug provider tests
Browse files Browse the repository at this point in the history
Signed-off-by: Itxaka <[email protected]>
  • Loading branch information
Itxaka committed Jul 31, 2023
1 parent 85dbcac commit 091d997
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
15 changes: 15 additions & 0 deletions tests/assets/config_with_reboot.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
4 changes: 3 additions & 1 deletion tests/provider_decentralized_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ var _ = Describe("kairos decentralized k8s test", Label("provider", "provider-de
err := vm.Scp(configPath, "/tmp/config.yaml", "0770")
Expect(err).ToNot(HaveOccurred())

out, _ := vm.Sudo("kairos-agent manual-install --device auto /tmp/config.yaml")
out, _ := vm.Sudo("kairos-agent --debug manual-install --device auto /tmp/config.yaml")
Expect(out).Should(ContainSubstring("Running after-install hook"), out)
fmt.Printf(out)
By("rebooting machine")
vm.Reboot()

By("waiting until it reboots to installed system")
Expand Down
2 changes: 1 addition & 1 deletion tests/provider_install_qrcode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ 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)
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")
Expand Down

0 comments on commit 091d997

Please sign in to comment.