chore(lint): more lint fixing
This commit is contained in:
parent
d8c4c3163b
commit
5f642eef76
10
acls_test.go
10
acls_test.go
|
@ -685,13 +685,13 @@ func Test_listMachinesInNamespace(t *testing.T) {
|
||||||
want: []Machine{},
|
want: []Machine{},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, test := range tests {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(test.name, func(t *testing.T) {
|
||||||
if got := listMachinesInNamespace(tt.args.machines, tt.args.namespace); !reflect.DeepEqual(
|
if got := listMachinesInNamespace(test.args.machines, test.args.namespace); !reflect.DeepEqual(
|
||||||
got,
|
got,
|
||||||
tt.want,
|
test.want,
|
||||||
) {
|
) {
|
||||||
t.Errorf("listMachinesInNamespace() = %v, want %v", got, tt.want)
|
t.Errorf("listMachinesInNamespace() = %v, want %v", got, test.want)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
10
dns.go
10
dns.go
|
@ -179,8 +179,14 @@ func getMapResponseDNSConfig(
|
||||||
for _, p := range peers {
|
for _, p := range peers {
|
||||||
namespaceSet.Add(p.Namespace)
|
namespaceSet.Add(p.Namespace)
|
||||||
}
|
}
|
||||||
for _, namespace := range namespaceSet.List() {
|
for _, ns := range namespaceSet.List() {
|
||||||
var dnsRoute string = fmt.Sprintf("%v.%v", namespace.(Namespace).Name, baseDomain)
|
namespace, ok := ns.(Namespace)
|
||||||
|
if !ok {
|
||||||
|
dnsConfig = dnsConfigOrig
|
||||||
|
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
dnsRoute := fmt.Sprintf("%v.%v", namespace.Name, baseDomain)
|
||||||
dnsConfig.Routes[dnsRoute] = nil
|
dnsConfig.Routes[dnsRoute] = nil
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue