Skip to content

Commit

Permalink
Fix engine test
Browse files Browse the repository at this point in the history
  • Loading branch information
lixmal committed Jan 19, 2025
1 parent 27fc953 commit 6b1de51
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/internal/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,9 @@ func toDNSConfig(protoDNSConfig *mgmProto.DNSConfig, network *net.IPNet) nbdns.C
dnsUpdate.NameServerGroups = append(dnsUpdate.NameServerGroups, dnsNSGroup)
}

addReverseZone(&dnsUpdate, network)
if len(dnsUpdate.CustomZones) > 0 {
addReverseZone(&dnsUpdate, network)
}

return dnsUpdate
}
Expand Down
6 changes: 6 additions & 0 deletions client/internal/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,9 @@ func TestEngine_UpdateNetworkMapWithDNSUpdate(t *testing.T) {
},
},
},
{
Domain: "0.66.100.in-addr.arpa.",
},
},
NameServerGroups: []*mgmtProto.NameServerGroup{
{
Expand Down Expand Up @@ -730,6 +733,9 @@ func TestEngine_UpdateNetworkMapWithDNSUpdate(t *testing.T) {
},
},
},
{
Domain: "0.66.100.in-addr.arpa.",
},
},
expectedNSGroupsLen: 1,
expectedNSGroups: []*nbdns.NameServerGroup{
Expand Down

0 comments on commit 6b1de51

Please sign in to comment.