Skip to content

Commit

Permalink
Add debug output
Browse files Browse the repository at this point in the history
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
  • Loading branch information
jimmykarily committed Apr 24, 2023
1 parent 5fb2080 commit bfdeafe
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/tests_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"net/http"
"os"
"os/exec"
"path"
"strconv"
"strings"
"testing"
Expand Down Expand Up @@ -144,7 +145,19 @@ func startVM(iso string) (context.Context, VM) {

vm := NewVM(m, stateDir)

fmt.Printf("stateDir = %+v\n", stateDir)
ctx, err := vm.Start(context.Background())
if err != nil {
so, e := os.ReadFile(path.Join(stateDir, "stdout"))
if e != nil {
fmt.Printf("Error reading stdout after process failing %s\n", e.Error())
}
se, e := os.ReadFile(path.Join(stateDir, "stderr"))
if e != nil {
fmt.Printf("Error reading stderr after process failing %s\n", e.Error())
}
fmt.Printf("An error occured.\nStderr = %+v\nStdout = %+v\n", string(se), string(so))
}
Expect(err).ToNot(HaveOccurred())

return ctx, vm
Expand Down

0 comments on commit bfdeafe

Please sign in to comment.