Skip to content

Commit

Permalink
mocks: udpate TestRegisterSidecar to use gomock
Browse files Browse the repository at this point in the history
Create mocks for `sidecar/interfaces.go` and `internal/test/interfaces.go`
and use them for rewriting the `TestRegisterSidecar`.
  • Loading branch information
positiveblue committed Nov 11, 2021
1 parent f98f27b commit 08921b5
Show file tree
Hide file tree
Showing 6 changed files with 615 additions and 113 deletions.
3 changes: 3 additions & 0 deletions gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ package pool
//
// make mock
//

//go:generate mockgen -source=sidecar/interfaces.go -package=sidecar -destination=sidecar/mock_interfaces.go
//go:generate mockgen -source=internal/test/interfaces.go -package=test -destination=internal/test/mock_interfaces.go
11 changes: 11 additions & 0 deletions internal/test/interfaces.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package test

import "github.com/lightninglabs/lndclient"

type SignerClient interface {
lndclient.SignerClient
}

type WalletKitClient interface {
lndclient.WalletKitClient
}
321 changes: 321 additions & 0 deletions internal/test/mock_interfaces.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
Loading

0 comments on commit 08921b5

Please sign in to comment.