test(cli): indoor-kit-migrate v1-to-v2 CLI regression coverage#234
Merged
Conversation
Co-authored-by: Boden <th3w1zard1@users.noreply.github.com>
4 tasks
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.
Description
Adds focused
cli_maintests for theindoor-kit-migrate-v1-to-v2command: successful v1→v2 migration (including nesteddoorhooks), and failure paths (missing input, invalid JSON, already v2, empty kitid). This closes the gap between library migration tests (migrate_kit_json_v1_to_v2intest_tilekit_v2.py) and the CLI entrypoint indispatch.py/commands/indoor_kit_migrate.py.Type of Change
Package(s) Affected
Changes Made
Libraries/PyKotor/tests/cli/test_indoor_kit_migrate_cli.py— five deterministic tests usingtmp_pathonly.Testing
Test Results
Risky behavior now covered
cli_main([...])forindoor-kit-migrate-v1-to-v2ensures the subcommand stays wired indispatch.py.format_version2), and invalid v1 metadata (emptyid) all return exit code 1 without writing partial output.format_version: 2, preservedid, and floor templates with hooks copied from v1 components.Why this reduces regression risk
The migrate command is the supported path for authors moving legacy kit JSON to tile templates; silent wiring breaks or swallowed errors would break modding workflows. These tests fail fast on regressions in argument parsing, dispatch routing, or error handling without requiring a game installation or slow integration fixtures.
Related Issues
Related to coverage automation / missing CLI tests for recently merged indoor tooling.
Checklist