test_preserve_shared_assets_e2e.py python
46 lines 1.7 KB
Raw
sha256:0e9549ec7b463911bc08b7d586dc320b1ac9b1f5c943ee7e3865dcc6cb0f6f83 chore(governance): sync handover+roadmap to 84db8c8 (drift:… Human 22 hours ago
1 """E2E — preserve shared assets then status/sync retain (§PSA.8)."""
2
3 from __future__ import annotations
4
5 from pathlib import Path
6
7 from cli.footprint import MUSE_BRIDGE_DEPLOY_DEST, MUSE_BRIDGE_WORKFLOW_DEST
8 from cli.kit_root import kit_root
9 from tests.support import FIXTURES, muse_mirror_status_runner, run_cli
10
11
12 HAND_SCRIPT = "#!/bin/bash\necho e2e-consumer-bridge\n"
13 HAND_WORKFLOW = "# e2e consumer workflow\n"
14
15
16 def test_preserve_migrate_force_footprint_ok_and_sync_retains(tmp_path: Path) -> None:
17 scripts = tmp_path / "scripts"
18 scripts.mkdir(parents=True)
19 (scripts / "muse-bridge-deploy.sh").write_text(HAND_SCRIPT, encoding="utf-8")
20 (tmp_path / MUSE_BRIDGE_WORKFLOW_DEST).write_text(HAND_WORKFLOW, encoding="utf-8")
21 (tmp_path / "docs").mkdir(parents=True)
22 (tmp_path / "docs" / "OVERSEER-HANDOVER.md").write_text("# H\n", encoding="utf-8")
23 (tmp_path / "docs" / "ROADMAP.md").write_text("# R\n", encoding="utf-8")
24
25 runner = muse_mirror_status_runner(tmp_path)
26 assert (
27 run_cli(
28 [
29 "init",
30 "--migrate",
31 "--force",
32 "--preserve-shared-assets",
33 "--from-config",
34 str(FIXTURES / "config-muse-git-mirror.yaml"),
35 "--non-interactive",
36 ],
37 cwd=tmp_path,
38 kit=kit_root(),
39 runner=runner,
40 )
41 == 0
42 )
43 assert run_cli(["status", "--check-footprint"], cwd=tmp_path, runner=runner) == 0
44 assert run_cli(["sync", "-y"], cwd=tmp_path, runner=runner) == 0
45 assert (tmp_path / MUSE_BRIDGE_DEPLOY_DEST).read_text(encoding="utf-8") == HAND_SCRIPT
46 assert (tmp_path / MUSE_BRIDGE_WORKFLOW_DEST).read_text(encoding="utf-8") == HAND_WORKFLOW
File History 1 commit
sha256:6abcf1fa82a7a621ccbc945f19acdba5bc0db54569599404a1452fb4a096a199 fix(ISR): default require_independent_second_reviewer to require Human minor 22 hours ago