tests: skip cases that depend on test server when -short flag set (#10576)

This commit is contained in:
Evan Culver 2021-07-09 16:42:30 -07:00 committed by GitHub
parent ae48b8314b
commit db250e2114
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -50,6 +50,11 @@ func makeClientWithConfig(
t *testing.T,
cb1 configCallback,
cb2 testutil.ServerConfigCallback) (*Client, *testutil.TestServer) {
// Skip test when -short flag provided; any tests that create a test
// server will take at least 100ms which is undesirable for -short
if testing.Short() {
t.Skip("too slow for testing.Short")
}
// Make client config
conf := DefaultConfig()

View File

@ -24,6 +24,12 @@ import (
)
func makeClient(t *testing.T) (*api.Client, *testutil.TestServer) {
// Skip test when -short flag provided; any tests that create a test server
// will take at least 100ms which is undesirable for -short
if testing.Short() {
t.Skip("too slow for testing.Short")
}
// Make client config
conf := api.DefaultConfig()