Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
Signed-off-by: Itxaka <[email protected]>
  • Loading branch information
Itxaka committed Jun 1, 2023
1 parent 013df01 commit 4b4bea8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/autoinstall_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ var _ = Describe("kairos autoinstall test", Label("autoinstall-test"), func() {
AfterEach(func() {
if CurrentSpecReport().Failed() {
gatherLogs(vm)
serial, _ := os.ReadFile(filepath.Join(vm.StateDir, "serial.log"))
_ = os.MkdirAll("logs", os.ModePerm|os.ModeDir)
_ = os.WriteFile(filepath.Join("logs", "serial.log"), serial, os.ModePerm)
fmt.Println(string(serial))
}

err := vm.Destroy(nil)
Expand Down
10 changes: 10 additions & 0 deletions tests/netboot_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package mos_test

import (
"fmt"
. "github.com/spectrocloud/peg/matcher"
"os"
"path/filepath"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand All @@ -14,6 +17,13 @@ var _ = Describe("kairos netboot test", Label("netboot-test"), func() {
})

AfterEach(func() {
if CurrentSpecReport().Failed() {
gatherLogs(vm)
serial, _ := os.ReadFile(filepath.Join(vm.StateDir, "serial.log"))
_ = os.MkdirAll("logs", os.ModePerm|os.ModeDir)
_ = os.WriteFile(filepath.Join("logs", "serial.log"), serial, os.ModePerm)
fmt.Println(string(serial))
}
Expect(vm.Destroy(nil)).ToNot(HaveOccurred())
})

Expand Down

0 comments on commit 4b4bea8

Please sign in to comment.