-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feat/memory-transport
- Loading branch information
Showing
60 changed files
with
2,100 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"opRetro": { | ||
"projectId": "0xc71faa1bcb4ceb785816c3f22823377e9e5e7c48649badd9f0a0ce491f20d4b3" | ||
}, | ||
"drips": { | ||
"filecoin": { | ||
"ownedBy": "0x53DCAf729e11022D5b8949946f6601211C662B38" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package libp2p | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/libp2p/go-libp2p/core/event" | ||
"github.com/libp2p/go-libp2p/core/host" | ||
"github.com/libp2p/go-libp2p/core/peer" | ||
"github.com/libp2p/go-libp2p/p2p/protocol/identify" | ||
"github.com/stretchr/testify/require" | ||
"go.uber.org/fx" | ||
) | ||
|
||
func TestGetPeerID(t *testing.T) { | ||
var id peer.ID | ||
host, err := New( | ||
WithFxOption(fx.Populate(&id)), | ||
) | ||
require.NoError(t, err) | ||
defer host.Close() | ||
|
||
require.Equal(t, host.ID(), id) | ||
|
||
} | ||
|
||
func TestGetEventBus(t *testing.T) { | ||
var eb event.Bus | ||
host, err := New( | ||
NoTransports, | ||
WithFxOption(fx.Populate(&eb)), | ||
) | ||
require.NoError(t, err) | ||
defer host.Close() | ||
|
||
require.NotNil(t, eb) | ||
} | ||
|
||
func TestGetHost(t *testing.T) { | ||
var h host.Host | ||
host, err := New( | ||
NoTransports, | ||
WithFxOption(fx.Populate(&h)), | ||
) | ||
require.NoError(t, err) | ||
defer host.Close() | ||
|
||
require.NotNil(t, h) | ||
} | ||
|
||
func TestGetIDService(t *testing.T) { | ||
var id identify.IDService | ||
host, err := New( | ||
NoTransports, | ||
WithFxOption(fx.Populate(&id)), | ||
) | ||
require.NoError(t, err) | ||
defer host.Close() | ||
|
||
require.NotNil(t, id) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.