mirror of https://github.com/hashicorp/consul
tests: skip cases that depend on test server when -short flag set (#10576)
parent
103a762fa9
commit
8fce7083c1
|
@ -50,6 +50,11 @@ func makeClientWithConfig(
|
||||||
t *testing.T,
|
t *testing.T,
|
||||||
cb1 configCallback,
|
cb1 configCallback,
|
||||||
cb2 testutil.ServerConfigCallback) (*Client, *testutil.TestServer) {
|
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
|
// Make client config
|
||||||
conf := DefaultConfig()
|
conf := DefaultConfig()
|
||||||
|
|
|
@ -24,6 +24,12 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func makeClient(t *testing.T) (*api.Client, *testutil.TestServer) {
|
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
|
// Make client config
|
||||||
conf := api.DefaultConfig()
|
conf := api.DefaultConfig()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue