Skip to content

Commit

Permalink
Test Fix: nil pointer error for core.NewNode
Browse files Browse the repository at this point in the history
This commit fixes the errors resulting from passing a nil pointer to the
core.NewNode function in TestExternalUnmmount and setupIpnsTest.

In the previous nil's place a &core.BuildCfg{} is now passed.

Both changes follow the same pattern:

```diff
-  node, err = core.NewNode(context.Background(), nil)
+  node, err = core.NewNode(context.Background(), &core.BuildCfg{})
```

 On branch go-test-fix
 Changes to be committed:
	modified:   fuse/ipns/ipns_test.go
	modified:   fuse/node/mount_test.go
License: MIT
Signed-off-by: Chris Buesser <[email protected]>
  • Loading branch information
cbuesser committed May 2, 2019
1 parent af8edb0 commit 9380660
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fuse/ipns/ipns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func setupIpnsTest(t *testing.T, node *core.IpfsNode) (*core.IpfsNode, *mountWra

var err error
if node == nil {
node, err = core.NewNode(context.Background(), nil)
node, err = core.NewNode(context.Background(), &core.BuildCfg{})
if err != nil {
t.Fatal(err)
}
Expand Down
2 changes: 1 addition & 1 deletion fuse/node/mount_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestExternalUnmount(t *testing.T) {
// TODO: needed?
maybeSkipFuseTests(t)

node, err := core.NewNode(context.Background(), nil)
node, err := core.NewNode(context.Background(), &core.BuildCfg{})
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit 9380660

Please sign in to comment.