Skip to content
This repository was archived by the owner on Apr 28, 2020. It is now read-only.

Commit 3def67e

Browse files
committed
Provide clear error when test environment is not met
Previously, the message could be hidden after a large list of containers.
1 parent 5efcd5c commit 3def67e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sail_helpers_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ func run(t *testing.T, name, repo, hatPath string, fns ...func(t *testing.T, p *
118118
func requireNoRunningSailContainers(t *testing.T) {
119119
cnts, err := listContainers()
120120
require.NoError(t, err)
121-
require.Empty(t, cnts, "Unable to run tests, Sail containers currently running")
121+
if len(cnts) > 0 {
122+
t.Fatal("Unable to run tests, Sail containers currently running")
123+
}
122124
}
123125

124126
func requireGetImageLabels(t *testing.T, image string) map[string]string {

0 commit comments

Comments
 (0)