test: CLI and adapter unit tests (38 total) - #9
Merged
Conversation
- test_cli.py: 8 tests via Click CliRunner — dry-run, error paths, missing config, atlassian/m365 not-implemented, adapter call verification - test_adapters.py: 14 tests covering XWikiAdapter and RedmineAdapter — config validation, HTTP mocking (get/put/post), idempotency, deploy logic Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tests/test_cli.py(8 tests): dry-run success, rendered-count output, org-name in output, atlassian/m365 in dry-run, missing config file, atlassian/m365 live raises ClickException, selfhosted live calls both adapterstests/test_adapters.py(14 tests): XWikiAdapter — raises on missing selfhosted config, page_exists (200/404), create_or_update_page PUT call, deploy upserts all pages, trailing slash stripped; RedmineAdapter — raises on missing config, project_exists (200/HTTPError), create_project idempotency, get_tracker_id lookup, deploy seeds mapped / skips unmappedAll HTTP calls mocked — no live Docker services required.
Test plan
🤖 Generated with Claude Code