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 mesh command (API calls mocked)."""
|
||||
"""Tests for the wildpc mesh command (API calls mocked)."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -6,7 +6,7 @@ import urllib.error
|
||||
from argparse import Namespace
|
||||
from unittest.mock import patch
|
||||
|
||||
from castle_cli.commands.mesh import run_mesh
|
||||
from wildpc_cli.commands.mesh import run_mesh
|
||||
|
||||
|
||||
class TestMeshCommand:
|
||||
@@ -15,7 +15,7 @@ class TestMeshCommand:
|
||||
"enabled": True, "connected": True, "nats_url": "tls://x:4222",
|
||||
"peer_count": 1, "peers": ["primer"],
|
||||
}
|
||||
with patch("castle_cli.commands.mesh._get", return_value=data):
|
||||
with patch("wildpc_cli.commands.mesh._get", return_value=data):
|
||||
rc = run_mesh(Namespace(mesh_command="status"))
|
||||
assert rc == 0
|
||||
out = capsys.readouterr().out # type: ignore[attr-defined]
|
||||
@@ -28,7 +28,7 @@ class TestMeshCommand:
|
||||
{"hostname": "primer", "online": True, "is_stale": False,
|
||||
"deployed_count": 3, "is_local": False},
|
||||
]
|
||||
with patch("castle_cli.commands.mesh._get", return_value=data):
|
||||
with patch("wildpc_cli.commands.mesh._get", return_value=data):
|
||||
rc = run_mesh(Namespace(mesh_command="nodes"))
|
||||
assert rc == 0
|
||||
out = capsys.readouterr().out # type: ignore[attr-defined]
|
||||
@@ -36,7 +36,7 @@ class TestMeshCommand:
|
||||
|
||||
def test_config_list(self, capsys: object) -> None:
|
||||
data = {"role": "authority", "keys": ["fleet/motd"]}
|
||||
with patch("castle_cli.commands.mesh._get", return_value=data):
|
||||
with patch("wildpc_cli.commands.mesh._get", return_value=data):
|
||||
rc = run_mesh(
|
||||
Namespace(mesh_command="config", mesh_config_command="list")
|
||||
)
|
||||
@@ -45,7 +45,7 @@ class TestMeshCommand:
|
||||
|
||||
def test_config_set_calls_put(self) -> None:
|
||||
with patch(
|
||||
"castle_cli.commands.mesh._put", return_value={"ok": True}
|
||||
"wildpc_cli.commands.mesh._put", return_value={"ok": True}
|
||||
) as put:
|
||||
rc = run_mesh(
|
||||
Namespace(
|
||||
@@ -60,7 +60,7 @@ class TestMeshCommand:
|
||||
|
||||
def test_api_unreachable_returns_1(self, capsys: object) -> None:
|
||||
with patch(
|
||||
"castle_cli.commands.mesh._get",
|
||||
"wildpc_cli.commands.mesh._get",
|
||||
side_effect=urllib.error.URLError("refused"),
|
||||
):
|
||||
rc = run_mesh(Namespace(mesh_command="status"))
|
||||
|
||||
Reference in New Issue
Block a user