Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go test fix #6293

Merged
merged 2 commits into from
May 3, 2019
Merged

Go test fix #6293

merged 2 commits into from
May 3, 2019

Commits on May 2, 2019

  1. 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: Chris Buesser <christopher.buesser@gmail.com>
    cbuesser committed May 2, 2019
    Configuration menu
    Copy the full SHA
    9380660 View commit details
    Browse the repository at this point in the history
  2. Test Fix: Nil error handling

    In TestExternalUnmount, the Mount function is called which returns an
    error which can be nil. The error type is then used in a comparison
    where Error() is called on it. If the error is nil, this results in a
    panic.
    
    Added a if err != nil {} guard to make sure that Error() is not called
    if the value is nil
     On branch go-test-fix
     Changes to be committed:
    	modified:   fuse/node/mount_test.go
    License: MIT
    Signed-off-by: Chris Buesser <christopher.buesser@gmail.com>
    cbuesser committed May 2, 2019
    Configuration menu
    Copy the full SHA
    5ce2deb View commit details
    Browse the repository at this point in the history