This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import struct
|
||||
from pathlib import Path
|
||||
|
||||
import yaml
|
||||
@@ -21,8 +22,18 @@ def test_unraid_uses_one_dockerman_container_with_ui_metadata() -> None:
|
||||
assert list(compose["services"]) == ["app"]
|
||||
labels = compose["services"]["app"]["labels"]
|
||||
assert labels["net.unraid.docker.managed"] == "dockerman"
|
||||
assert labels["net.unraid.docker.webui"].endswith(":8080]/")
|
||||
assert labels["net.unraid.docker.icon"].endswith("/static/favicon.svg")
|
||||
assert labels["net.unraid.docker.webui"] == "http://[IP]:[PORT:8080]/"
|
||||
assert (
|
||||
labels["net.unraid.docker.icon"]
|
||||
== "http://127.0.0.1:1226/static/img/vacatureradar-docker.png"
|
||||
)
|
||||
assert "[IP]" not in labels["net.unraid.docker.icon"]
|
||||
assert "[PORT:" not in labels["net.unraid.docker.icon"]
|
||||
|
||||
icon = ROOT / "static" / "img" / "vacatureradar-docker.png"
|
||||
payload = icon.read_bytes()
|
||||
assert payload.startswith(b"\x89PNG\r\n\x1a\n")
|
||||
assert struct.unpack(">II", payload[16:24]) == (256, 256)
|
||||
|
||||
dockerfile = (ROOT / "Dockerfile.unraid").read_text(encoding="utf-8")
|
||||
entrypoint = (ROOT / "scripts" / "unraid_aio_entrypoint.sh").read_text(encoding="utf-8")
|
||||
@@ -62,3 +73,15 @@ def test_deployment_examples_use_per_platform_mailbox_configuration() -> None:
|
||||
assert "IMAP_ENABLED" not in content
|
||||
for key in required_keys:
|
||||
assert f"{key}=" in content
|
||||
|
||||
|
||||
def test_unraid_deploy_requires_dedicated_ssh_alias() -> None:
|
||||
deploy_script = (ROOT / "scripts" / "deploy_unraid.sh").read_text(encoding="utf-8")
|
||||
|
||||
assert 'UNRAID_SSH_HOST:-unraid-itworx' in deploy_script
|
||||
assert "ssh -G" in deploy_script
|
||||
assert '[[ "$ssh_user" != "root" ]]' in deploy_script
|
||||
assert "itworx_unraid_deploy" in deploy_script
|
||||
assert "BatchMode=yes" in deploy_script
|
||||
assert "git ls-files --cached --others --exclude-standard -z" in deploy_script
|
||||
assert "/health/ready/" in deploy_script
|
||||
|
||||
Reference in New Issue
Block a user