Skip to content

Commit

Permalink
kola/tests: use H.Tempfile() to access logs in coreos.unique.boot.fai…
Browse files Browse the repository at this point in the history
…lure

See: #3670
Reference: #3670 (comment)
  • Loading branch information
c4rt0 authored and jlebon committed Jan 23, 2024
1 parent 2419dd2 commit 1982e0f
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions mantle/kola/tests/ignition/qemufailure.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,7 @@ func ignitionFailure(c cluster.TestCluster) error {
builder := platform.NewQemuBuilder()
defer builder.Close()
// Create a temporary log file
consoleFile, err := builder.TempFile("console.log")
if err != nil {
return err
}
consoleFile := c.H.TempFile("console-")
// Instruct builder to use it
builder.ConsoleFile = consoleFile.Name()
builder.SetConfig(failConfig)
Expand All @@ -182,11 +179,8 @@ func ignitionFailure(c cluster.TestCluster) error {
func dualBootfsFailure(c cluster.TestCluster) error {
builder := platform.NewQemuBuilder()
defer builder.Close()
// Create a temporary log file
consoleFile, err := builder.TempFile("console.log")
if err != nil {
return err
}
// Create a temporary log file allocated in the output dir of the test
consoleFile := c.H.TempFile("console-")
// Instruct builder to use it
builder.ConsoleFile = consoleFile.Name()
// get current path and create tmp dir
Expand Down Expand Up @@ -239,10 +233,7 @@ func dualBootfsIgnitionFailure(c cluster.TestCluster) error {
builder := platform.NewQemuBuilder()
defer builder.Close()
// Create a temporary log file
consoleFile, err := builder.TempFile("console.log")
if err != nil {
return err
}
consoleFile := c.H.TempFile("console-")
// Instruct builder to use it
builder.ConsoleFile = consoleFile.Name()
failConfig, err := conf.EmptyIgnition().Render(conf.FailWarnings)
Expand Down

0 comments on commit 1982e0f

Please sign in to comment.