mirror of https://github.com/status-im/consul.git
watch: run tests in parallel
This commit is contained in:
parent
a54b0994ed
commit
f55e234f2e
|
@ -15,6 +15,7 @@ import (
|
|||
var errBadContent = errors.New("bad content")
|
||||
|
||||
func TestKeyWatch(t *testing.T) {
|
||||
t.Parallel()
|
||||
a := agent.NewTestAgent(t.Name(), ``)
|
||||
defer a.Shutdown()
|
||||
|
||||
|
@ -68,6 +69,7 @@ func TestKeyWatch(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestKeyWatch_With_PrefixDelete(t *testing.T) {
|
||||
t.Parallel()
|
||||
a := agent.NewTestAgent(t.Name(), ``)
|
||||
defer a.Shutdown()
|
||||
|
||||
|
@ -121,6 +123,7 @@ func TestKeyWatch_With_PrefixDelete(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestKeyPrefixWatch(t *testing.T) {
|
||||
t.Parallel()
|
||||
a := agent.NewTestAgent(t.Name(), ``)
|
||||
defer a.Shutdown()
|
||||
|
||||
|
@ -173,6 +176,7 @@ func TestKeyPrefixWatch(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestServicesWatch(t *testing.T) {
|
||||
t.Parallel()
|
||||
a := agent.NewTestAgent(t.Name(), ``)
|
||||
defer a.Shutdown()
|
||||
|
||||
|
@ -226,6 +230,7 @@ func TestServicesWatch(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestNodesWatch(t *testing.T) {
|
||||
t.Parallel()
|
||||
a := agent.NewTestAgent(t.Name(), ``)
|
||||
defer a.Shutdown()
|
||||
|
||||
|
@ -276,6 +281,7 @@ func TestNodesWatch(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestServiceWatch(t *testing.T) {
|
||||
t.Parallel()
|
||||
a := agent.NewTestAgent(t.Name(), ``)
|
||||
defer a.Shutdown()
|
||||
|
||||
|
@ -331,6 +337,7 @@ func TestServiceWatch(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestChecksWatch_State(t *testing.T) {
|
||||
t.Parallel()
|
||||
a := agent.NewTestAgent(t.Name(), ``)
|
||||
defer a.Shutdown()
|
||||
|
||||
|
@ -391,6 +398,7 @@ func TestChecksWatch_State(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestChecksWatch_Service(t *testing.T) {
|
||||
t.Parallel()
|
||||
a := agent.NewTestAgent(t.Name(), ``)
|
||||
defer a.Shutdown()
|
||||
|
||||
|
@ -456,6 +464,7 @@ func TestChecksWatch_Service(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestEventWatch(t *testing.T) {
|
||||
t.Parallel()
|
||||
a := agent.NewTestAgent(t.Name(), ``)
|
||||
defer a.Shutdown()
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ func mustParse(t *testing.T, q string) *Plan {
|
|||
}
|
||||
|
||||
func TestRun_Stop(t *testing.T) {
|
||||
t.Parallel()
|
||||
plan := mustParse(t, `{"type":"noop"}`)
|
||||
|
||||
var expect uint64 = 1
|
||||
|
|
|
@ -7,6 +7,7 @@ import (
|
|||
)
|
||||
|
||||
func TestParseBasic(t *testing.T) {
|
||||
t.Parallel()
|
||||
params := makeParams(t, `{"type":"key", "datacenter":"dc2", "token":"12345", "key":"foo"}`)
|
||||
p, err := Parse(params)
|
||||
if err != nil {
|
||||
|
@ -24,6 +25,7 @@ func TestParseBasic(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestParse_exempt(t *testing.T) {
|
||||
t.Parallel()
|
||||
params := makeParams(t, `{"type":"key", "key":"foo", "handler": "foobar"}`)
|
||||
p, err := ParseExempt(params, []string{"handler"})
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue