Commit graph

6 commits

Author SHA1 Message Date
positiveblue
1589efe1ea
rpcserver: add Marshaler interface
The Marshaler interface is used to transform internal types to
decorated RPC ones.

It decouples that functionality form the rpcServer so it is easier to
test exhaustively.
2021-12-14 20:40:02 -08:00
positiveblue
65157959b0
account: generate mocks for account/interfaces.go 2021-12-14 20:40:02 -08:00
positiveblue
5d93deab0f
order: generate mocks for order/interfaces.go
The `mockgen` tool seems to have a bug and it is not able to parse a
valid go file. I had to change the `[sha256.Size]byte` to `[size]byte`
and define `hashSize` in the order package in the same way it is defined in
the sha256 one.
2021-12-14 20:39:55 -08:00
positiveblue
739498543a
mocks: add account/watcher mocks 2021-12-07 12:22:37 -08:00
positiveblue
08921b51ad
mocks: udpate TestRegisterSidecar to use gomock
Create mocks for `sidecar/interfaces.go` and `internal/test/interfaces.go`
and use them for rewriting the `TestRegisterSidecar`.
2021-11-11 09:59:36 -08:00
positiveblue
f98f27b2fd
mock: Add mockgen workflow
- `make mock`: generates all the mocks for testing.
- `mock-check`: generates all the mocks + checks if any *.go file changed.
- `make gen`: generates all the auto generated files (protos + mocks).
- Add `mock-check` to our CI
2021-11-10 14:05:10 -08:00