Repository navigation
GH-3289: Add basic CLI smoke tests - #3848
zhangxinyao88 wants to merge 2 commits into
Conversation
|
I'm just wondering do we really need test cases like this? |
|
The changes themselves LGTM but I agree with @wgtmac's question on whether such tests are necessary. Can we write a more concise set of 1-2 tests to validate basic functionality instead? Also, is the exact wording from CLI output considered a stable API? If not, these tests are brittle and I'm not sure what exact contract they're testing. |
Reduced to two smoke tests in 59c5aab: version output and unknown-command failure, without asserting help or error wording. |
Thinking about it more, these two tests may not justify a separate PR. I'd lean toward closing this and focusing on command options reaching the actual logic, as outlined in the tracker. Let me know your thoughts. |
I'll defer to @wgtmac here. IMO this doesn't need a separate PR. If we're just adding tests, my preference is a smaller set of bigger PRs rather than a large set of tiny ones. |
Rationale for this change
Continue #3289 with basic CLI smoke coverage, using the helper added in #3843.
What changes are included in this PR?
Add two tests:
versionreturns the expected version with a zero exit code, and an unknown command returns a nonzero exit code with the command name in the output. Neither test asserts help or error wording.Are these changes tested?
CLI module tests: 72 passed, 2 skipped. Spotless and license checks passed.
Are there any user-facing changes?
No. Tests only.