go report card fixes (#3182)
Went over the list at https://goreportcard.com/report/github.com/coredns/coredns and removed/fix some code to make it slightly happier. Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
parent
62451fd3eb
commit
07748d0c34
5 changed files with 2 additions and 13 deletions
|
@ -34,7 +34,6 @@ func (s sleepPlugin) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.
|
|||
return 0, nil
|
||||
}
|
||||
}
|
||||
return 0, nil
|
||||
}
|
||||
|
||||
func TestCancel(t *testing.T) {
|
||||
|
|
|
@ -10,5 +10,4 @@ func Done(ctx context.Context) bool {
|
|||
default:
|
||||
return false
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
|
@ -123,12 +123,3 @@ func TestGroup(t *testing.T) {
|
|||
t.Fatalf("Failure to group seventh set: %v", sx)
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkNewSRV(b *testing.B) {
|
||||
s := &Service{Host: "www,example.org", Port: 8080}
|
||||
for n := 0; n < b.N; n++ {
|
||||
srv := s.NewSRV("www.example.org.", 16)
|
||||
// this assignment makes sure s.NewSRV doesn't get optimized out
|
||||
srv = srv
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ func generateEndpoints(cidr string, client kubernetes.Interface) {
|
|||
},
|
||||
}
|
||||
ep.ObjectMeta.Name = "svc" + strconv.Itoa(count)
|
||||
_, err = client.CoreV1().Endpoints("testns").Create(ep)
|
||||
client.CoreV1().Endpoints("testns").Create(ep)
|
||||
count++
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ func TestSecondaryZoneTransfer(t *testing.T) {
|
|||
var r *dns.Msg
|
||||
// This is now async; we need to wait for it to be transferred.
|
||||
for i := 0; i < 10; i++ {
|
||||
r, err = dns.Exchange(m, udp)
|
||||
r, _ = dns.Exchange(m, udp)
|
||||
if len(r.Answer) != 0 {
|
||||
break
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue