summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2021-11-24 02:18:30 +0100
committerJon Marius Venstad <venstad@gmail.com>2021-11-24 02:18:30 +0100
commita3d6a05d121eb9ce9aef3124ecfbdf3e1fbcb812 (patch)
tree5906f26dfa39537befd30ccbd229ffc4fe52fd02 /client
parentd1eda03e9b296a2945594cf16b3b250dcad9117b (diff)
Test no tests found
Diffstat (limited to 'client')
-rw-r--r--client/go/cmd/test_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/client/go/cmd/test_test.go b/client/go/cmd/test_test.go
index 73ea13331c7..9d92e285750 100644
--- a/client/go/cmd/test_test.go
+++ b/client/go/cmd/test_test.go
@@ -47,6 +47,13 @@ func TestTestWithoutAssertions(t *testing.T) {
assert.Equal(t, "a test must have at least one assertion, but none were found in 'testdata/tests/system-test/foo/query.json'\n", errBytes)
}
+func TestSuiteWithoutTests(t *testing.T) {
+ client := &mockHttpClient{}
+ outBytes, errBytes := execute(command{args: []string{"test", "testdata/tests/staging-test"}}, t, client)
+ assert.Equal(t, "Failed to find any tests at 'testdata/tests/staging-test'\n", outBytes)
+ assert.Equal(t, "", errBytes)
+}
+
func TestSingleTest(t *testing.T) {
client := &mockHttpClient{}
searchResponse, _ := ioutil.ReadFile("testdata/tests/response.json")