-
Notifications
You must be signed in to change notification settings - Fork 550
Discussion: Testing strategies for the CLI #1860
Copy link
Copy link
Closed
Description
Extracting the discussion from #1848 to an issue.
With the move to v2 we should think of a strategy on how to test CLI commands and integration with plugins.
Some ideas from the PR on how to setup the tests:
- Run Cobra commands directly via code
- Invoke the CLI as an external process
Some ideas from the PR on how to assert the tests:
- Snapshot CLI output (not included in the PR)
- Assert other CLI command side effects, like generated configurations (already exists in our existing tests)
Dump any thoughts you have, for example https://medium.com/@sapegin/whats-wrong-with-snapshot-tests-37fbe20dfe8e
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels