From 48bff52614db9a3e1419b2f6155743b3a0b996d4 Mon Sep 17 00:00:00 2001 From: Frank Schroeder Date: Mon, 22 May 2017 17:22:44 +0200 Subject: [PATCH] test: address pull request comments --- command/agent/agent.go | 2 +- command/agent/agent_endpoint_test.go | 2 +- command/agent/dns_test.go | 3 --- command/agent/listen.go | 4 ---- 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/command/agent/agent.go b/command/agent/agent.go index f20a34726..286e0a6ac 100644 --- a/command/agent/agent.go +++ b/command/agent/agent.go @@ -1012,7 +1012,7 @@ func (a *Agent) Shutdown() error { } err := a.delegate.Shutdown() - a.logger.Print("[INFO] agent: delegate down") + a.logger.Print("[DEBUG] agent: delegate down") pidErr := a.deletePid() if pidErr != nil { diff --git a/command/agent/agent_endpoint_test.go b/command/agent/agent_endpoint_test.go index a9cc48a88..898849327 100644 --- a/command/agent/agent_endpoint_test.go +++ b/command/agent/agent_endpoint_test.go @@ -277,7 +277,7 @@ func TestAgent_Reload(t *testing.T) { }() retry.Run(t, func(r *retry.R) { - if cmd == nil || cmd.agent == nil { + if cmd.agent == nil { r.Fatal("waiting for agent") } if got, want := len(cmd.agent.httpServers), 1; got != want { diff --git a/command/agent/dns_test.go b/command/agent/dns_test.go index e23ee0916..64127534d 100644 --- a/command/agent/dns_test.go +++ b/command/agent/dns_test.go @@ -2332,9 +2332,6 @@ func TestDNS_ServiceLookup_OnlyPassing(t *testing.T) { } // Only 1 is passing, so we should only get 1 answer - for _, a := range in.Answer { - fmt.Println(question, a) - } if len(in.Answer) != 1 { t.Fatalf("Bad: %#v", in) } diff --git a/command/agent/listen.go b/command/agent/listen.go index ebe984f2e..9c0ded4ff 100644 --- a/command/agent/listen.go +++ b/command/agent/listen.go @@ -26,10 +26,6 @@ func ListenTLS(addr string, cfg *tls.Config) (net.Listener, error) { } func ListenUnix(addr string, perm FilePermissions) (net.Listener, error) { - // todo(fs): move this somewhere else - // if _, err := os.Stat(addr); !os.IsNotExist(err) { - // s.agent.logger.Printf("[WARN] agent: Replacing socket %q", addr) - // } if err := os.Remove(addr); err != nil && !os.IsNotExist(err) { return nil, fmt.Errorf("error removing socket file: %s", err) }