Rename Castle -> Wild PC across the repo
Repo-side rename only (Phases 1-3 of the migration plan); the live box (~/.castle, systemd units, /data/castle, domains) is a separate cutover. - Slug `castle` -> `wildpc`: CLI command, module names (wildpc_core/cli/api), dist names, entry point `wildpc = wildpc_cli.main:main`. - Identifiers: CastleConfig/NATSClient/DirError/MDNS -> Wildpc*. - Env/constants: CASTLE_* -> WILDPC_*; ~/.castle -> ~/.wildpc, castle.yaml -> wildpc.yaml, /data/castle -> /data/wildpc. - Systemd UNIT_PREFIX castle- -> wildpc-; own programs castle-api/gateway/etc. - Display prose "Castle" -> "Wild PC" in docs, agent-guide files, README, frontend. - Package dirs and bootstrap yaml renamed via git mv; lockfiles regenerated; redundant nested uv.lock files dropped (workspace root lock is authoritative). Tests: core 273, cli 47, wildpc-api 120 all pass. Frontend type-checks + builds. Fixed a stale test fixture (secret_env_path kind arg) broken pre-rename.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"""Tests for the `castle tool` lens."""
|
||||
"""Tests for the `wildpc tool` lens."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -8,16 +8,16 @@ from pathlib import Path
|
||||
from unittest.mock import patch
|
||||
|
||||
|
||||
def _config(castle_root: Path):
|
||||
from castle_cli.config import load_config
|
||||
def _config(wildpc_root: Path):
|
||||
from wildpc_cli.config import load_config
|
||||
|
||||
return load_config(castle_root)
|
||||
return load_config(wildpc_root)
|
||||
|
||||
|
||||
class TestToolList:
|
||||
def test_list_includes_tool(self, castle_root: Path, capsys: object) -> None:
|
||||
with patch("castle_cli.commands.tool.load_config", return_value=_config(castle_root)):
|
||||
from castle_cli.commands.tool import run_tool_list
|
||||
def test_list_includes_tool(self, wildpc_root: Path, capsys: object) -> None:
|
||||
with patch("wildpc_cli.commands.tool.load_config", return_value=_config(wildpc_root)):
|
||||
from wildpc_cli.commands.tool import run_tool_list
|
||||
|
||||
rc = run_tool_list(Namespace(json=False))
|
||||
assert rc == 0
|
||||
@@ -26,9 +26,9 @@ class TestToolList:
|
||||
# test-svc is a service (systemd), not a tool — must not appear.
|
||||
assert "test-svc" not in out
|
||||
|
||||
def test_list_json_payload(self, castle_root: Path, capsys: object) -> None:
|
||||
with patch("castle_cli.commands.tool.load_config", return_value=_config(castle_root)):
|
||||
from castle_cli.commands.tool import run_tool_list
|
||||
def test_list_json_payload(self, wildpc_root: Path, capsys: object) -> None:
|
||||
with patch("wildpc_cli.commands.tool.load_config", return_value=_config(wildpc_root)):
|
||||
from wildpc_cli.commands.tool import run_tool_list
|
||||
|
||||
rc = run_tool_list(Namespace(json=True))
|
||||
assert rc == 0
|
||||
@@ -41,9 +41,9 @@ class TestToolList:
|
||||
|
||||
|
||||
class TestToolInfo:
|
||||
def test_info_json(self, castle_root: Path, capsys: object) -> None:
|
||||
with patch("castle_cli.commands.tool.load_config", return_value=_config(castle_root)):
|
||||
from castle_cli.commands.tool import run_tool_info
|
||||
def test_info_json(self, wildpc_root: Path, capsys: object) -> None:
|
||||
with patch("wildpc_cli.commands.tool.load_config", return_value=_config(wildpc_root)):
|
||||
from wildpc_cli.commands.tool import run_tool_info
|
||||
|
||||
rc = run_tool_info(Namespace(name="test-tool", json=True))
|
||||
assert rc == 0
|
||||
@@ -51,10 +51,10 @@ class TestToolInfo:
|
||||
assert data["name"] == "test-tool"
|
||||
assert data["executables"]
|
||||
|
||||
def test_info_rejects_non_tool(self, castle_root: Path, capsys: object) -> None:
|
||||
def test_info_rejects_non_tool(self, wildpc_root: Path, capsys: object) -> None:
|
||||
# test-svc is a service deployment, not a tool.
|
||||
with patch("castle_cli.commands.tool.load_config", return_value=_config(castle_root)):
|
||||
from castle_cli.commands.tool import run_tool_info
|
||||
with patch("wildpc_cli.commands.tool.load_config", return_value=_config(wildpc_root)):
|
||||
from wildpc_cli.commands.tool import run_tool_info
|
||||
|
||||
rc = run_tool_info(Namespace(name="test-svc", json=False))
|
||||
assert rc == 1
|
||||
|
||||
Reference in New Issue
Block a user