Skip to content

test(cli): add smoke tests to verify core commands#5

Closed
jgafnea wants to merge 3 commits intopointblank-club:mainfrom
jgafnea:test/cli-smoke-test
Closed

test(cli): add smoke tests to verify core commands#5
jgafnea wants to merge 3 commits intopointblank-club:mainfrom
jgafnea:test/cli-smoke-test

Conversation

@jgafnea
Copy link

@jgafnea jgafnea commented Jan 12, 2026

Adds minimal CLI smoke tests to verify the main entry point and subcommands are registered and parsed correctly.

Running the tests:

pytest tests/test_cli.py -v
tests/test_cli.py::test_cli_options[version] PASSED
tests/test_cli.py::test_cli_options[help] PASSED 
tests/test_cli.py::test_cli_commands[check] PASSED
tests/test_cli.py::test_cli_commands[apply] PASSED 
tests/test_cli.py::test_cli_commands[report] PASSED 
tests/test_cli.py::test_cli_commands[rollback] PASSED
tests/test_cli.py::test_cli_commands[list-rules] PASSED

Closes #3

@jgafnea jgafnea marked this pull request as draft January 13, 2026 07:40
@jgafnea jgafnea force-pushed the test/cli-smoke-test branch from c8922dd to 54fb40d Compare January 14, 2026 06:06
@jgafnea jgafnea marked this pull request as ready for review January 14, 2026 06:31
Copy link
Collaborator

@Aswinr24 Aswinr24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @jgafnea this approach is pretty good
a minor change, otherwise looks good to merge

@jgafnea
Copy link
Author

jgafnea commented Jan 16, 2026

Changes applied.

@jgafnea jgafnea requested a review from Aswinr24 January 16, 2026 20:15
(["--version"], ["SysHardn", "version"]),
(["--help"], ["Usage:", "Options:", "Commands:"]),
],
# Optionally specify IDs for nicer pytest results
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this comment


assert result.exit_code == 0
assert result.output
assert "Usage:" in result.output
Copy link
Collaborator

@Aswinr24 Aswinr24 Jan 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the earlier request (including result.output in the exit-code assertion for debugging) still isn’t covered... could you switch to assert result.exit_code == 0, result.output and drop the Usage:/substring assert (not needed for this smoke test since we just want to confirm commands are registered and --help works)

@jgafnea jgafnea closed this Jan 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add CLI smoke test coverage for core commands

2 participants