Skip to content

Commit

Permalink
tests: dump logs if e2e test node exited with an error (#5856)
Browse files Browse the repository at this point in the history
  • Loading branch information
algorandskiy authored Dec 6, 2023
1 parent 6592300 commit f48be99
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/framework/fixtures/libgoalFixture.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ func (f *LibGoalFixture) nodeExitWithError(nc *nodecontrol.NodeController, err e
if f.t == nil {
return
}

f.t.Logf("Node at %s has terminated with an error: %v. Dumping logs...", nc.GetDataDir(), err)
f.dumpLogs(filepath.Join(nc.GetDataDir(), "node.log"))

exitError, ok := err.(*exec.ExitError)
if !ok {
require.NoError(f.t, err, "Node at %s has terminated with an error", nc.GetDataDir())
Expand Down

0 comments on commit f48be99

Please sign in to comment.