mirror of
https://github.com/libp2p/go-libp2p-peerstore.git
synced 2024-12-27 23:40:16 +08:00
rename AddrMgr => AddrBook elsewhere.
This commit is contained in:
parent
7f4288fab1
commit
bc77b649dc
@ -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)
|
||||
|
@ -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
|
||||
})
|
||||
}
|
||||
|
@ -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()
|
Loading…
Reference in New Issue
Block a user