improve UpdateTTLs test coverage

This commit is contained in:
Steven Allen 2018-01-04 18:23:02 -08:00
parent 62cbfac7c6
commit 9cb6ba9eb7

View File

@ -214,8 +214,16 @@ func TestUpdateTTLs(t *testing.T) {
ma22 := MA(t, "/ip4/1.2.3.1/tcp/1122")
m := AddrManager{}
// Shouldn't panic.
m.UpdateAddrs(id1, time.Hour, time.Minute)
m.SetAddr(id1, ma11, time.Hour)
m.SetAddr(id1, ma12, time.Minute)
// Shouldn't panic.
m.UpdateAddrs(id2, time.Hour, time.Minute)
m.SetAddr(id2, ma21, time.Hour)
m.SetAddr(id2, ma22, time.Minute)