1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-11 18:20:33 +09:00

GO-3886 fix tests

This commit is contained in:
Roman Khafizianov 2024-09-16 10:52:55 +02:00
parent f353bd54b3
commit ba6560d771
No known key found for this signature in database
GPG key ID: F07A7D55A2684852

View file

@ -80,19 +80,19 @@ func TestLocalDiscovery_Init(t *testing.T) {
}
func TestLocalDiscovery_checkAddrs(t *testing.T) {
t.Run("checkAddrs - server run successfully", func(t *testing.T) {
t.Run("refreshInterfaces - server run successfully", func(t *testing.T) {
// given
f := newFixture(t)
// when
ld := f.LocalDiscovery.(*localDiscovery)
ld.port = 6789
err := ld.checkAddrs(context.Background())
err := ld.refreshInterfaces(context.Background())
// then
assert.Nil(t, err)
})
t.Run("checkAddrs - server run successfully and send update to peer to peer status hook", func(t *testing.T) {
t.Run("refreshInterfaces - server run successfully and send update to peer to peer status hook", func(t *testing.T) {
// given
f := newFixture(t)
@ -103,7 +103,7 @@ func TestLocalDiscovery_checkAddrs(t *testing.T) {
hookCalled.Store(int64(state))
})
ld.port = 6789
err := ld.checkAddrs(context.Background())
err := ld.refreshInterfaces(context.Background())
// then
assert.Nil(t, err)