Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

Commit e1c6729

Browse files
author
Luis Plazas
committed
Switch error logic order for better understanding
1 parent 53d1c0e commit e1c6729

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/integration_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,10 +392,10 @@ func TestConsoleOutput(t *testing.T) {
392392
}
393393
actual, stderr, err := runner.Run(args...)
394394
if err != nil {
395-
if !test.producesError {
396-
t.Fatalf("Error running command: %s. Stderr: %s", err, stderr)
397-
} else {
395+
if test.producesError {
398396
actual = err.Error()
397+
} else {
398+
t.Fatalf("Error running command: %s. Stderr: %s", err, stderr)
399399
}
400400
}
401401
actual = strings.TrimSpace(actual)

0 commit comments

Comments
 (0)