User custom loopback address (#589)

We will probe a set of addresses and port
to define the one available for our DNS service

if none is available, we return an error
This commit is contained in:
Maycon Santos
2022-11-29 11:49:18 +01:00
committed by GitHub
parent 20a73e3e14
commit ae500b63a7
3 changed files with 47 additions and 24 deletions

View File

@ -71,6 +71,10 @@ func TestEngine_SSH(t *testing.T) {
WgPort: 33100,
}, nbstatus.NewRecorder())
engine.dnsServer = &dns.MockServer{
UpdateDNSServerFunc: func(serial uint64, update nbdns.Config) error { return nil },
}
var sshKeysAdded []string
var sshPeersRemoved []string
@ -385,6 +389,10 @@ func TestEngine_Sync(t *testing.T) {
WgPort: 33100,
}, nbstatus.NewRecorder())
engine.dnsServer = &dns.MockServer{
UpdateDNSServerFunc: func(serial uint64, update nbdns.Config) error { return nil },
}
defer func() {
err := engine.Stop()
if err != nil {