add golangci-lint linter (#5499)
This commit is contained in:
parent
abc5ac8017
commit
c2dbb7141a
104 changed files with 83 additions and 184 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue