diff options
| author | Sabyrzhan Tasbolatov <snovitoll@gmail.com> | 2024-09-04 21:33:28 +0500 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2024-09-09 16:49:28 +0000 |
| commit | cb2d8b3aef0920cbb5521f948e262598efc3fc1c (patch) | |
| tree | a5dd2e30ebaa63b2835fa6656e8e7078054829a0 /Makefile | |
| parent | 10df4c09063bf091d9d003880e4d1044b0ec163d (diff) | |
pkg/rpcserver: add unit tests, Manager mocks
Added more test coverage of the package and created an interface of
rpcserver to use it as the dependency (for syz-manager).
Also tried to cover with tests a private method handleConn(),
though it calls handleRunnerConn which has a separate logic in
Handshake(), which within handleConn() unit test we should've mocked.
This will require a refactoring of `runners map[int]*Runner` and
runner.go in general with a separate interface which we can mock as
well.
General idea is to have interfaces of Server (rpc), Runner etc. and mock a
compound logic like Handshake during a separate public (or private if it
has callable, if-else logic) method unit-testing.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -232,7 +232,7 @@ generate: $(MAKE) format generate_go: format_cpp - $(GO) generate ./executor ./pkg/ifuzz ./pkg/build + $(GO) generate ./executor ./pkg/ifuzz ./pkg/build ./pkg/rpcserver $(GO) generate ./vm/proxyapp generate_rpc: |
