Skip to content

Commit

Permalink
simplify dag only mock
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-forbes committed May 27, 2021
1 parent 00d3af0 commit 2e5a7e4
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions ipfs/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ type dagOnlyMock struct {
format.DAGService
}

func (dom dagOnlyMock) Dag() coreiface.APIDagService { return mockAPIDagService{dom.DAGService} }
func (dom dagOnlyMock) Dag() coreiface.APIDagService { return dom }

func (dagOnlyMock) Unixfs() coreiface.UnixfsAPI { return nil }
func (dagOnlyMock) Block() coreiface.BlockAPI { return nil }
Expand All @@ -65,9 +65,4 @@ func (dagOnlyMock) ResolvePath(context.Context, path.Path) (path.Resolved, error
func (dagOnlyMock) ResolveNode(context.Context, path.Path) (format.Node, error) { return nil, nil }
func (dagOnlyMock) WithOptions(...options.ApiOption) (coreiface.CoreAPI, error) { return nil, nil }
func (dagOnlyMock) Close() error { return nil }

type mockAPIDagService struct {
format.DAGService
}

func (mockAPIDagService) Pinning() format.NodeAdder { return nil }
func (dagOnlyMock) Pinning() format.NodeAdder { return nil }

0 comments on commit 2e5a7e4

Please sign in to comment.