Skip to content

Commit

Permalink
test: Move pause from test to action
Browse files Browse the repository at this point in the history
Move the pause on fail wait from test to action, so that nothing
happens after the failed action.

Signed-off-by: Jarno Rajahalme <[email protected]>
  • Loading branch information
jrajahalme authored and tklauser committed Sep 1, 2021
1 parent 89639cb commit 970f248
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 4 additions & 0 deletions connectivity/check/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ func (a *Action) Run(f func(*Action)) {
a.printFlows(a.Source())
a.printFlows(a.Destination())
}
if a.failed && a.test.ctx.params.PauseOnFail {
a.Log("Pausing after action failure, press the Enter key to continue:")
fmt.Scanln()
}
}

// fail marks the Action as failed.
Expand Down
5 changes: 0 additions & 5 deletions connectivity/check/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,6 @@ func (t *Test) willRun() bool {
// finalize runs all the Test's registered finalizers.
// Failures encountered executing finalizers will fail the Test.
func (t *Test) finalize() {
if t.failed && t.Context().params.PauseOnFail {
t.Log("Pausing after test failure, press the Enter key to continue:")
fmt.Scanln()
}

t.Debug("Finalizing Test", t.Name())

for _, f := range t.finalizers {
Expand Down

0 comments on commit 970f248

Please sign in to comment.