add golangci-lint linter (#5499)

This commit is contained in:
Ondřej Benkovský 2022-07-10 20:06:33 +02:00 committed by GitHub
parent abc5ac8017
commit c2dbb7141a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
104 changed files with 83 additions and 184 deletions

View file

@ -99,7 +99,6 @@ func (APIConnTest) GetNamespaceByName(name string) (*object.Namespace, error) {
}
func TestNsAddrs(t *testing.T) {
k := New([]string{"inter.webs.test."})
k.APIConn = &APIConnTest{}
k.localIPs = []net.IP{net.ParseIP("10.244.0.20")}
@ -108,7 +107,6 @@ func TestNsAddrs(t *testing.T) {
if len(cdrs) != 3 {
t.Fatalf("Expected 3 results, got %v", len(cdrs))
}
cdr := cdrs[0]
expected := "10.0.0.111"
@ -140,7 +138,6 @@ func TestNsAddrs(t *testing.T) {
}
func TestNsAddrsExternal(t *testing.T) {
k := New([]string{"example.com."})
k.APIConn = &APIConnTest{}
k.localIPs = []net.IP{net.ParseIP("10.244.0.20")}
@ -150,7 +147,6 @@ func TestNsAddrsExternal(t *testing.T) {
if len(cdrs) != 0 {
t.Fatalf("Expected 0 results, got %v", len(cdrs))
}
// Add an external IP to one of the services ...
@ -159,7 +155,6 @@ func TestNsAddrsExternal(t *testing.T) {
if len(cdrs) != 1 {
t.Fatalf("Expected 1 results, got %v", len(cdrs))
}
cdr := cdrs[0]
expected := "1.2.3.4"
@ -170,5 +165,4 @@ func TestNsAddrsExternal(t *testing.T) {
if cdr.Header().Name != expected {
t.Errorf("Expected record name to be %q, got %q", expected, cdr.Header().Name)
}
}