Skip to content

Commit

Permalink
chore(lint): more lint fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
restanrm committed Feb 14, 2022
1 parent 6100787 commit 9c23400
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
10 changes: 5 additions & 5 deletions acls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -685,13 +685,13 @@ func Test_listMachinesInNamespace(t *testing.T) {
want: []Machine{},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := listMachinesInNamespace(tt.args.machines, tt.args.namespace); !reflect.DeepEqual(
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
if got := listMachinesInNamespace(test.args.machines, test.args.namespace); !reflect.DeepEqual(
got,
tt.want,
test.want,
) {
t.Errorf("listMachinesInNamespace() = %v, want %v", got, tt.want)
t.Errorf("listMachinesInNamespace() = %v, want %v", got, test.want)
}
})
}
Expand Down
10 changes: 8 additions & 2 deletions dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,14 @@ func getMapResponseDNSConfig(
for _, p := range peers {
namespaceSet.Add(p.Namespace)
}
for _, namespace := range namespaceSet.List() {
var dnsRoute string = fmt.Sprintf("%v.%v", namespace.(Namespace).Name, baseDomain)
for _, ns := range namespaceSet.List() {
namespace, ok := ns.(Namespace)
if !ok {
dnsConfig = dnsConfigOrig

continue
}
dnsRoute := fmt.Sprintf("%v.%v", namespace.Name, baseDomain)
dnsConfig.Routes[dnsRoute] = nil
}
} else {
Expand Down

0 comments on commit 9c23400

Please sign in to comment.