Fixed unit test TestCatalogListServicesCommand (#4592)
This commit is contained in:
parent
d0c4539fba
commit
09ff5f7224
|
@ -4,6 +4,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/hashicorp/consul/testrpc"
|
||||||
|
|
||||||
"github.com/hashicorp/consul/agent"
|
"github.com/hashicorp/consul/agent"
|
||||||
"github.com/hashicorp/consul/api"
|
"github.com/hashicorp/consul/api"
|
||||||
"github.com/mitchellh/cli"
|
"github.com/mitchellh/cli"
|
||||||
|
@ -34,6 +36,7 @@ func TestCatalogListServicesCommand(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
a := agent.NewTestAgent(t.Name(), ``)
|
a := agent.NewTestAgent(t.Name(), ``)
|
||||||
defer a.Shutdown()
|
defer a.Shutdown()
|
||||||
|
testrpc.WaitForTestAgent(t, a.RPC, "dc1")
|
||||||
|
|
||||||
// Add another service with tags for testing
|
// Add another service with tags for testing
|
||||||
if err := a.Client().Agent().ServiceRegister(&api.AgentServiceRegistration{
|
if err := a.Client().Agent().ServiceRegister(&api.AgentServiceRegistration{
|
||||||
|
|
Loading…
Reference in New Issue