From 015248a67fd76e0f4ad2656cc50858f806b649fb Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Thu, 16 Jun 2016 16:34:22 -0700 Subject: [PATCH] Fix tests for NewServer() in client mode. Pointy-hat: sean- I'm positive I've done this before. --- client/client_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/client/client_test.go b/client/client_test.go index 36e3ae169..0ab31eb20 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -60,8 +60,14 @@ func testServer(t *testing.T, cb func(*nomad.Config)) (*nomad.Server, string) { cb(config) } + shutdownCh := make(chan struct{}) + consulSyncer, err := consul.NewSyncer(conf.ConsulConfig, shutdownCh, log.New(os.Stderr, "", log.LstdFlags)) + if err != nil { + t.Fatalf("err: %v", err) + } + // Create server - server, err := nomad.NewServer(config) + server, err := nomad.NewServer(config, consulSyncer) if err != nil { t.Fatalf("err: %v", err) }