This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
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:
|
||||
workflow = (ROOT / ".gitea/workflows/ci.yml").read_text(encoding="utf-8")
|
||||
parsed = yaml.safe_load(workflow)
|
||||
|
||||
@@ -58,12 +58,12 @@ PY
|
||||
|
||||
start_container() {
|
||||
local container="$1"
|
||||
docker run --detach \
|
||||
--name "$container" \
|
||||
docker create --name "$container" \
|
||||
--platform linux/amd64 \
|
||||
--mount "type=bind,src=${options_file},dst=/data/options.json,readonly" \
|
||||
--publish 127.0.0.1::8080 \
|
||||
"$image" >/dev/null
|
||||
docker cp "$options_file" "$container:/data/options.json"
|
||||
docker start "$container" >/dev/null
|
||||
}
|
||||
|
||||
host_port() {
|
||||
|
||||
Reference in New Issue
Block a user