mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-09-04 03:05:32 +00:00
chore: repair the local dev path and delete its dead scaffolding
The local dev environment had drifted badly from CI. Remove the parts that no longer describe anything real, and make the rest match how CI actually runs. Delete tests/dev.ps1. It wrapped run-integration.sh, which CI calls directly, and duplicated the module build that script already performs internally. As a second entry point it drifted: it still offered the PVE 8 leg retired in #88, mounted the Docker socket for storage containers replaced by the storage VM in #87, and pointed its remote-host examples at a runner decommissioned in the ARC migration. All four documents describing it used a positional syntax that bound the bare word to -Tests and then fell through to -Shell, so every documented command silently opened a container shell. Recorded as D019. Delete tests/infrastructure/runner/, a self-hosted-runner-in-Docker superseded by Actions Runner Controller. Make disk_storage and iso_storage required. Their defaults named a NAS that the lab replaced with Ceph, and CI overrides both from repository variables, so the defaults only ever misled local runs. require_env now fails at the top of a run rather than at terraform apply, and the descriptions point at tests/.env.test because cmd_provision deletes terraform.tfvars before applying. preflight-cleanup.sh no longer falls back to the literal "local" storage. An unset TF_VAR_iso_storage now skips only the ISO branch, leaving VM destroy and state cleanup intact, and emits a workflow annotation: force-cleanup is the only cleanup CI runs and it wipes Terraform state, so a silent skip strands the uploaded ISO with nothing left to reclaim it. Drop docker-ce-cli and the /var/run/docker.sock mount. Nothing in the container has called docker since #87 moved storage into a VM; the remaining docker calls run inside that VM over SSH. The CI job image is built from the same target, so this also removes a third-party apt repository from its supply chain. Rewrite tests/.env.test.example against what the code now requires, and fix the documented commands in CLAUDE.md, README.md, copilot-instructions.md and the integration README.
This commit is contained in:
+35
-14
@@ -1,28 +1,49 @@
|
||||
# PSProxmoxVE integration test configuration.
|
||||
# Copy to .env.test and fill in values. This file is gitignored.
|
||||
#
|
||||
# These credentials point to the PARENT PVE host where nested test VMs
|
||||
# will be provisioned. Integration tests run against the nested VMs,
|
||||
# not against this host directly.
|
||||
# These credentials point to the PARENT PVE cluster where nested test VMs are
|
||||
# provisioned. Integration tests run against the nested VMs, not the parent.
|
||||
#
|
||||
# Provisioned resources:
|
||||
# Provisioned per run:
|
||||
# - 2x PVE 9 nodes (pve9a, pve9b) for cluster testing
|
||||
# - 2x PVE 8 nodes (pve8a, pve8b) for cluster testing
|
||||
# - Shared storage provided by Docker containers on the runner host (iSCSI + NFS)
|
||||
# - 1x storage VM (VMID 5080) serving NFS, iSCSI, and the auto-install
|
||||
# answer files over HTTP
|
||||
#
|
||||
# docker-compose.test.yml loads this file into both containers, so anything set
|
||||
# here reaches Terraform (TF_VAR_*) and run-integration.sh alike.
|
||||
|
||||
# ── Required: parent PVE for provisioning ─────────────────────────────
|
||||
PVE_ENDPOINT=https://pve.example.com:8006
|
||||
PVE_API_TOKEN=user@realm!tokenid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
|
||||
PVE_TARGET_NODE=pve1
|
||||
PVE_PASSWORD=<root-password-for-nested-pve>
|
||||
|
||||
# ── Optional overrides ────────────────────────────────────────────────
|
||||
# CACHE_DIR=/opt/pve-isos
|
||||
# WORK_DIR=/tmp/pve-integration
|
||||
# PVE_VERSIONS=9 8
|
||||
# Parent node to provision onto. "auto" picks the online node with the most
|
||||
# free memory; the token's user then needs PVEAuditor on /nodes for the stats.
|
||||
PVE_TARGET_NODE=auto
|
||||
|
||||
# ── Required: Terraform storage and placement ─────────────────────────
|
||||
# CI supplies these from GitHub repository variables. There are no defaults —
|
||||
# terraform fails with "No value for required variable" if they are unset.
|
||||
# iso_storage must accept the "iso" AND "import" content types.
|
||||
TF_VAR_disk_storage=<storage pool for VM disks, must support raw format>
|
||||
TF_VAR_iso_storage=<storage pool for ISO and cloud-image uploads>
|
||||
|
||||
# ── Optional: match your parent cluster ───────────────────────────────
|
||||
# TF_VAR_network_bridge=Core
|
||||
# TF_VAR_pool_id=ci
|
||||
#
|
||||
# ── VMID overrides ───────────────────────────────────────────────────
|
||||
# DNS name of the storage VM. It boots via DHCP as hostname pvetest-storage
|
||||
# and must resolve from the container and from the nested VMs' VLAN.
|
||||
# STORAGE_VM_FQDN=pvetest-storage.test.local
|
||||
|
||||
# ── Optional overrides ────────────────────────────────────────────────
|
||||
# The ISO CI pins. Leave unset and you provision a different PVE build than CI
|
||||
# does — run-integration.sh defaults to 9.1. Keep in step with the PVE9_ISO in
|
||||
# .github/workflows/integration-tests.yml.
|
||||
# PVE9_ISO=proxmox-ve_9.2-1.iso
|
||||
#
|
||||
# CACHE_DIR=/opt/pve-integration
|
||||
# WORK_DIR=/opt/pve-integration/work
|
||||
# PVE9A_VMID=5091
|
||||
# PVE9B_VMID=5092
|
||||
# PVE8A_VMID=5081
|
||||
# PVE8B_VMID=5082
|
||||
# STORAGE_VMID=5080
|
||||
|
||||
Reference in New Issue
Block a user