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 committed Jun 16, 2021
1 parent 39ac4f2 commit 3af4421
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 @@ -136,6 +136,10 @@ func (a *Action) Run(f func(*Action)) {
a.printFlows(name, flows, a.flowResults[name])
}
}
if a.failed && a.test.ctx.params.PauseOnFail {
a.Log("Pausing after test case 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 @@ -124,11 +124,6 @@ func (t *Test) willRun() bool {
// Failures encountered executing finalizers will be raised as warnings
// against 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 3af4421

Please sign in to comment.