From 3658d4d428bde1d0229fbf778e9b04ac7de3a3a8 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 f20a347264..286e0a6ac0 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 a9cc48a88a..8988493273 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 e23ee09167..64127534d2 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 ebe984f2e9..9c0ded4ffc 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) }