cli: resolve deployments by (name, kind), not bare name
Thread kind through every CLI resolver so a tool, service, and job can share a name. Reads go through config.deployment(kind,name) / deployments_named(name) / all_deployments(); writes target the per-kind store (config.services/jobs/tools/statics). delete cascades over (kind,name) tuples; run/info resolve via registry.named().
This commit is contained in:
@@ -50,7 +50,7 @@ class TestAdd:
|
||||
def test_adopt_rust_declares_commands(self, castle_root: Path, tmp_path: Path) -> None:
|
||||
repo = tmp_path / "rusty"
|
||||
repo.mkdir()
|
||||
(repo / "Cargo.toml").write_text("[package]\nname = \"rusty\"\n")
|
||||
(repo / "Cargo.toml").write_text('[package]\nname = "rusty"\n')
|
||||
rc, config = _run_add(castle_root, target=str(repo))
|
||||
assert rc == 0
|
||||
prog = config.programs["rusty"]
|
||||
@@ -62,9 +62,7 @@ class TestAdd:
|
||||
assert prog.commands.run == [["cargo", "run"]]
|
||||
|
||||
def test_adopt_git_url_records_repo(self, castle_root: Path) -> None:
|
||||
rc, config = _run_add(
|
||||
castle_root, target="https://github.com/someone/widget.git"
|
||||
)
|
||||
rc, config = _run_add(castle_root, target="https://github.com/someone/widget.git")
|
||||
assert rc == 0
|
||||
prog = config.programs["widget"]
|
||||
assert prog.repo == "https://github.com/someone/widget.git"
|
||||
|
||||
Reference in New Issue
Block a user