test: address pull request comments

This commit is contained in:
Frank Schroeder 2017-05-22 17:22:44 +02:00
parent b9ae289e34
commit 48bff52614
No known key found for this signature in database
GPG Key ID: 4D65C6EAEC87DECD
4 changed files with 2 additions and 9 deletions

View File

@ -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 {

View File

@ -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 {

View File

@ -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)
}

View File

@ -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)
}