Option C Tools
Loading...
Searching...
No Matches
tests_migrate.test_option_c_migration Namespace Reference

Classes

class  TestDryRun
class  TestCopySemantics
class  TestBackup
class  TestOcStatus
class  TestIdempotent
class  TestEmptyProject

Functions

None _seed_legacy_project (Path root)

Detailed Description

Purpose
-------
FS-539 regression coverage — :func:`oct.migrate.oct_migrate.run_migrate_option_c`
relocates legacy artefacts into ``.option_c/`` and writes ``oc_status.json``.

Responsibilities
----------------
- dry-run is side-effect-free.
- Each legacy artefact is copied (not moved) to ``.option_c/``.
- A ``.bk`` backup is created when the destination exists and differs.
- ``oc_status.json`` records ``migrated_from`` and pillar enablement.
- An idempotent second run skips already-migrated artefacts.
- An unmigrated project with no legacy artefacts produces "nothing to
  migrate".

Diagnostics
-----------
Domain: MIGRATE-TESTS
    Levels:
        L2 — test lifecycle
        L3 — assertion details
        L4 — deep tracing

Contracts
---------
- All migration operations use ``tmp_path`` as the project root; no
  real project files are touched.

Function Documentation

◆ _seed_legacy_project()

None tests_migrate.test_option_c_migration._seed_legacy_project ( Path root)
protected
Create a minimal legacy Option C project layout.

Definition at line 45 of file test_option_c_migration.py.

Here is the caller graph for this function: