Add test for dht servers when utp disabled

#289
This commit is contained in:
Matt Joiner 2018-11-04 17:42:12 +11:00
parent 9a49f4b37e
commit 8a0f333bb9
1 changed files with 10 additions and 0 deletions

View File

@ -1020,3 +1020,13 @@ func TestClientAddressInUse(t *testing.T) {
require.Error(t, err)
require.Nil(t, cl)
}
func TestClientHasDhtServersWhenUtpDisabled(t *testing.T) {
cc := TestingConfig()
cc.DisableUTP = true
cc.NoDHT = false
cl, err := NewClient(cc)
require.NoError(t, err)
defer cl.Close()
assert.NotEmpty(t, cl.DhtServers())
}