提交 93806601 作者: Christopher Buesser

Test Fix: nil pointer error for core.NewNode

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: 's avatarChris Buesser <christopher.buesser@gmail.com>
上级 af8edb06
......@@ -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)
}
......
......@@ -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)
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论