-
Notifications
You must be signed in to change notification settings - Fork 4
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
Split CLI and GRPC API tests #308
Comments
Should also revert any cases where |
Also wherever |
Once tests are split up in the service. Most tests of |
This should only be done on top of #292. Either that gets merged into master first, or any PRs has to be done on top of it as a stacked PR. |
Specification
It's time to split up the test modules for these areas, this will our test performance, and give us understanding of the test coverage of all our API behaviour:
tests/bin
tests/agent
tests/client
For
tests/bin
, each command can have its own test. Look attests/bin/agent
as a template for what to do. Right now all the other commands are single test modules in their own directory liketests/bin/identities/identities.test.ts
. These should all be split up into individual commands. Note that most of the tests should be using the shared global agent. However some tests may be independent. This is where you can use the nested describe pattern as demonstrated intests/bin/agent/status.test.ts
.Some tips:
pkExec
,pkStdio
,pkSpawn
,pkExpect
utilityWe may optimise it further when realising that some tests can just use their own agent instead of sharing the agent. This is because by using the global keypair, starting agents is really fast now. This will probably need to be used in the nodes commands anyway.
For
tests/agent
andtests/client
, this is about the GRPC API. We have now split up each RPC handler into their own file, this allows much more isolated and specific unit testing of each handler. Refer totests/client/service/agentStop.test.ts
as the template for each handler test. Allrpc*.test.ts
should be converted appropriately. Refer to #249 when you have questions or discussions about API design. This is just about splitting the tests up, however we may find we can fix things up regarding the API as this issue is tackled.Additional context
tests/
#306 - Node claims tests are still broken and need to be fixedTasks
tests/bin
tests/client/service
and refer tosrc/client/service
andtests/client/service/agentStop.test.ts
tests/agent/service
and refer tosrc/agent/service
The text was updated successfully, but these errors were encountered: