-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Object
We want to have a test suite build into our CI system which helps us reduce the amount of manual testing. The test suite should cover most of the CLI command and tests on different VPSs and systems.
Design
Testing Accounts
We should create separate accounts or sub-users of our main account and limit the service access. This ensures the safety of our VPS main account. We also need to make sure the account credential is private. (i.e. set up as Github secrets or environment variables)
Testing cases
CI should be triggered on every new commit. Both CircleCI and GitHub Actions allow you to skip certain commits if you have [skip ci] in the title or description. source.It should cover both positive and negative test cases. And tests against different VPS should be running parallel if that's possible. It should test the following cases:
- Test the CLI binary is working and returns the expected version.
upa couple of nodes with different options anddestroythem with different options.- Deploy a node, testing following cases before destroy
- check
start,stopandrestartcommands are able to control the darknode status. - check
listcommand show the correct info of the darknode - check
updatecommand is able to compare the versions and do an update when outdated. - try
resizethe darknode to an upper tier and a lower tier and check the darknode status - check
execcommand with different options
- check
Discussion
-
Github Actions VS CircleCI
I personally favour CircleCI as we already have everything set up in CircleCI and it has some features which Github Actions doesn't have. Github Action is also good in terms of github integration, the setup should be more easy and friendly than CircleCi. We can achieve the same result with Github Actions, but with more developing time. -
Not sure how can we test the
sshcommand in CI.