rename AddrMgr => AddrBook elsewhere.

This commit is contained in:
Raúl Kripalani 2018-09-05 15:08:33 +01:00
parent 7f4288fab1
commit bc77b649dc
3 changed files with 5 additions and 5 deletions

View File

@ -48,7 +48,7 @@ func TestBadgerDsPeerstore(t *testing.T) {
}
func TestBadgerDsAddrBook(t *testing.T) {
test.TestAddrMgr(t, func() (peerstore.AddrBook, func()) {
test.TestAddrBook(t, func() (peerstore.AddrBook, func()) {
ds, closeDB := setupBadgerDatastore(t)
mgr, err := NewAddrBook(context.Background(), ds, 100*time.Microsecond)

View File

@ -13,8 +13,8 @@ func TestInMemoryPeerstore(t *testing.T) {
})
}
func TestInMemoryAddrMgr(t *testing.T) {
test.TestAddrMgr(t, func() (pstore.AddrBook, func()) {
func TestInMemoryAddrBook(t *testing.T) {
test.TestAddrBook(t, func() (pstore.AddrBook, func()) {
return NewAddrBook(), nil
})
}

View File

@ -19,9 +19,9 @@ var addressBookSuite = map[string]func(book pstore.AddrBook) func(*testing.T){
"AddressesExpire": testAddressesExpire,
}
type AddrMgrFactory func() (pstore.AddrBook, func())
type AddrBookFactory func() (pstore.AddrBook, func())
func TestAddrMgr(t *testing.T, factory AddrMgrFactory) {
func TestAddrBook(t *testing.T, factory AddrBookFactory) {
for name, test := range addressBookSuite {
// Create a new peerstore.
ab, closeFunc := factory()