Add Home Assistant Stelloauth app #1
@@ -143,6 +143,14 @@ def test_runtime_accepts_docker_port_unpublished_status() -> None:
|
|||||||
assert 'docker port "$container" 9222/tcp 2>/dev/null || true' in runtime_test
|
assert 'docker port "$container" 9222/tcp 2>/dev/null || true' in runtime_test
|
||||||
|
|
||||||
|
|
||||||
|
def test_runtime_copies_options_without_a_host_bind_mount() -> None:
|
||||||
|
runtime_test = (ROOT / "tests/test_runtime.sh").read_text(encoding="utf-8")
|
||||||
|
assert "docker create --name" in runtime_test
|
||||||
|
assert 'docker cp "$options_file" "$container:/data/options.json"' in runtime_test
|
||||||
|
assert 'docker start "$container"' in runtime_test
|
||||||
|
assert "--mount" not in runtime_test
|
||||||
|
|
||||||
|
|
||||||
def test_ci_builds_and_loads_only_the_amd64_test_image() -> None:
|
def test_ci_builds_and_loads_only_the_amd64_test_image() -> None:
|
||||||
workflow = (ROOT / ".gitea/workflows/ci.yml").read_text(encoding="utf-8")
|
workflow = (ROOT / ".gitea/workflows/ci.yml").read_text(encoding="utf-8")
|
||||||
parsed = yaml.safe_load(workflow)
|
parsed = yaml.safe_load(workflow)
|
||||||
|
|||||||
@@ -58,12 +58,12 @@ PY
|
|||||||
|
|
||||||
start_container() {
|
start_container() {
|
||||||
local container="$1"
|
local container="$1"
|
||||||
docker run --detach \
|
docker create --name "$container" \
|
||||||
--name "$container" \
|
|
||||||
--platform linux/amd64 \
|
--platform linux/amd64 \
|
||||||
--mount "type=bind,src=${options_file},dst=/data/options.json,readonly" \
|
|
||||||
--publish 127.0.0.1::8080 \
|
--publish 127.0.0.1::8080 \
|
||||||
"$image" >/dev/null
|
"$image" >/dev/null
|
||||||
|
docker cp "$options_file" "$container:/data/options.json"
|
||||||
|
docker start "$container" >/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
host_port() {
|
host_port() {
|
||||||
|
|||||||
Reference in New Issue
Block a user