test: address pull request comments
This commit is contained in:
parent
b9ae289e34
commit
48bff52614
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue