publisher, deployer: neutral defaults in the packaged copies
build / build (push) Canceled after 2m34s

Default host is localhost, user is "user", paths are under /home/user;
the publisher apps_dir no longer points at a personal Tomcat. Tests of the
copies follow.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
das
2026-10-25 14:53:05 +02:00
co-authored by Claude Sonnet 5.5
parent 62b8b98086
commit 396986aaf4
5 changed files with 20 additions and 20 deletions
+8 -8
View File
@@ -36,7 +36,7 @@ dest = "~/scripts"
"""))
assert [a.name for a in cfg.apps] == ["a", "b"]
assert cfg.dest_path(cfg.app("a")) == "/srv/app/python/a"
assert cfg.dest_path(cfg.app("b")) == "/home/das/scripts"
assert cfg.dest_path(cfg.app("b")) == "/home/user/scripts"
assert cfg.app("a").src_path == Path.home() / "x"
@@ -80,7 +80,7 @@ def test_rsync_cmd_options():
cmd = remote.rsync_cmd(s, "src/", "/d/", filters=["- x"], delete=True, dry_run=True, extra=["--chmod=F640"])
assert cmd[0] == "rsync" and "-n" in cmd and "--delete" in cmd and "-c" in cmd
assert cmd.index("--chmod=F640") < cmd.index("--filter=- x")
assert cmd[-2:] == ["src/", "das@192.168.88.60:/d/"]
assert cmd[-2:] == ["src/", "user@localhost:/d/"]
def test_parse_itemize():
@@ -164,14 +164,14 @@ def test_python_config_layout(tmp_path):
(tmp_path / "configs").mkdir()
cfg = config.Config(tmp_path / "x.toml", config.Server(), [])
plan = type("P", (), {})()
plan.cfg, plan.dest = cfg, "/home/das/app/python/App"
plan.cfg, plan.dest = cfg, "/home/user/app/python/App"
plan.app = config.App(name="App", kind="python-update", src=str(tmp_path), dest="python/App", unit="u",
configs=["configs"])
k = get("python-update")
assert k.config_items(plan) == [("configs", "/home/das/app/configs/python/App")]
assert k.config_items(plan) == [("configs", "/home/user/app/configs/python/App")]
plan.app.configs = [".env", "secrets.yaml"]
assert k.config_items(plan) == [(".env", "/home/das/app/configs/python/App/app.env"),
("secrets.yaml", "/home/das/app/configs/python/App/secrets.yaml")]
plan.dest = "/home/das/app/docker/stack"
assert k.config_items(plan) == [(".env", "/home/user/app/configs/python/App/app.env"),
("secrets.yaml", "/home/user/app/configs/python/App/secrets.yaml")]
plan.dest = "/home/user/app/docker/stack"
plan.app = config.App(name="stack", kind="docker", src=str(tmp_path), dest="docker/stack")
assert get("docker").config_items(plan) == [(".env", "/home/das/app/configs/docker/stack.env")]
assert get("docker").config_items(plan) == [(".env", "/home/user/app/configs/docker/stack.env")]