diff --git a/tests/dev.ps1 b/tests/dev.ps1 index e8e743f..895fe72 100644 --- a/tests/dev.ps1 +++ b/tests/dev.ps1 @@ -163,7 +163,7 @@ services: dev-infra: volumes: - ${RemoteRepoPath}:/repo - - /opt/pve-isos:/opt/pve-isos + - /opt/pve-integration:/opt/pve-integration "@ | Set-Content -Path $OverrideFile -Encoding utf8 $ComposeArgs = @('-f', $ComposeFile, '-f', $OverrideFile) @@ -254,7 +254,7 @@ if ($Integration) { Start-InfraContainer # Verify environment is ready (config file exists from provisioning) - $configCheck = docker exec $InfraContainer bash -c 'test -f "${CONFIG_FILE:-/tmp/pve-integration/config.json}" && echo OK || echo MISSING' + $configCheck = docker exec $InfraContainer bash -c 'test -f "${CONFIG_FILE:-/opt/pve-integration/work/config.json}" && echo OK || echo MISSING' if ($configCheck.Trim() -eq 'MISSING' -and -not $Provision) { throw "Integration environment not ready. Run with -Provision first, or use -Provision -Integration together." } diff --git a/tests/docker-compose.test.yml b/tests/docker-compose.test.yml index 196780c..11168c7 100644 --- a/tests/docker-compose.test.yml +++ b/tests/docker-compose.test.yml @@ -37,7 +37,7 @@ services: profiles: [infra] volumes: - ..:/repo - - /opt/pve-isos:/opt/pve-isos + - /opt/pve-integration:/opt/pve-integration # WARNING: Mounting the Docker socket grants this container root-equivalent # access to the host's Docker daemon. Only use on trusted, isolated machines. - /var/run/docker.sock:/var/run/docker.sock diff --git a/tests/infrastructure/scripts/run-integration.sh b/tests/infrastructure/scripts/run-integration.sh index a70c86e..ae28d9c 100755 --- a/tests/infrastructure/scripts/run-integration.sh +++ b/tests/infrastructure/scripts/run-integration.sh @@ -46,8 +46,8 @@ INFRA_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" REPO_ROOT="$(cd "$INFRA_DIR/../.." && pwd)" # ── Defaults ──────────────────────────────────────────────────────── -CACHE_DIR="${CACHE_DIR:-/opt/pve-isos}" -WORK_DIR="${WORK_DIR:-${RUNNER_TEMP:-/tmp/pve-integration}}" +CACHE_DIR="${CACHE_DIR:-/opt/pve-integration}" +WORK_DIR="${WORK_DIR:-${RUNNER_TEMP:-$CACHE_DIR/work}}" CONFIG_FILE="${CONFIG_FILE:-$WORK_DIR/config.json}" MODULE_ARTIFACT="${MODULE_ARTIFACT:-$REPO_ROOT/publish/netstandard2.0}" PVE_VERSIONS="${PVE_VERSIONS:-9 8}" diff --git a/tests/infrastructure/storage.tf b/tests/infrastructure/storage.tf index 44ccfda..be34495 100644 --- a/tests/infrastructure/storage.tf +++ b/tests/infrastructure/storage.tf @@ -1,9 +1,11 @@ # ── Answer server container ────────────────────────────────────────── resource "docker_container" "answer_server" { - name = "pvetest-answer-server" - image = "slothcroissant/proxmox-auto-installer-server:latest" - restart = "unless-stopped" + name = "pvetest-answer-server" + image = "slothcroissant/proxmox-auto-installer-server:latest" + restart = "unless-stopped" + must_run = true + start = true network_mode = "host"