Skip to content

Commit

Permalink
fix: run core API tests in "dht server" mode
Browse files Browse the repository at this point in the history
Otherwise, we'd need to wait a delay on start for nodes to start becoming
servers.
  • Loading branch information
Stebalien committed Apr 10, 2020
1 parent bb08f7f commit d6604a2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/coreapi/test/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/ipfs/go-ipfs/core/bootstrap"
"github.com/ipfs/go-ipfs/core/coreapi"
mock "github.com/ipfs/go-ipfs/core/mock"
"github.com/ipfs/go-ipfs/core/node/libp2p"
"github.com/ipfs/go-ipfs/keystore"
"github.com/ipfs/go-ipfs/repo"

Expand Down Expand Up @@ -78,9 +79,10 @@ func (NodeProvider) MakeAPISwarm(ctx context.Context, fullIdentity bool, n int)
}

node, err := core.NewNode(ctx, &core.BuildCfg{
Repo: r,
Host: mock.MockHostOption(mn),
Online: fullIdentity,
Routing: libp2p.DHTServerOption,
Repo: r,
Host: mock.MockHostOption(mn),
Online: fullIdentity,
ExtraOpts: map[string]bool{
"pubsub": true,
},
Expand Down

0 comments on commit d6604a2

Please sign in to comment.