mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-08-17 00:45:25 +00:00
refactor: rename Send-PveIso to Send-PveFile and move VM provisioning into integration tests
Send-PveFile replaces Send-PveIso with a -ContentType parameter (iso, vztmpl, import). This is a breaking rename — the module has not been released yet. Test infrastructure refactored: - prepare-test-vm.sh replaced with prepare-test-environment.sh (only SSH ops: enable content types, upload cloud-init snippet, curl download cloud image) - VM provisioning moved into integration tests as "Linux VM — Provisioning" context: Send-PveFile, New-PveVm, Import-PveVmDisk, Set-PveVmConfig, Set-PveCloudInitConfig, Start-PveVm, Test-PveVmGuestAgent — all tested as part of the test suite - PVETEST_LINUX_VMID env var removed (VM created by tests) - PVETEST_CLOUD_IMAGE_PATH + PVETEST_PASSWORD added Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -275,19 +275,17 @@ jobs:
|
||||
|
||||
# ── Prepare test Linux VM ────────────────────────────────────────
|
||||
|
||||
- name: Deploy test Linux VM to nested PVE
|
||||
- name: Prepare test environment on nested PVE
|
||||
if: inputs.skip_provision != true
|
||||
id: linux_vm
|
||||
id: test_env
|
||||
shell: bash
|
||||
run: |
|
||||
OUTPUT=$(bash ${SCRIPTS_DIR}/prepare-test-vm.sh \
|
||||
OUTPUT=$(bash ${SCRIPTS_DIR}/prepare-test-environment.sh \
|
||||
"${{ steps.provision.outputs.host }}" \
|
||||
"${PVE_PASSWORD}" \
|
||||
200 \
|
||||
"${{ steps.target.outputs.node }}" \
|
||||
"${{ steps.provision.outputs.token }}")
|
||||
LINUX_VMID=$(echo "$OUTPUT" | grep "^LINUX_VMID=" | cut -d= -f2)
|
||||
echo "linux_vmid=${LINUX_VMID}" >> "$GITHUB_OUTPUT"
|
||||
"${RUNNER_TEMP}")
|
||||
CLOUD_IMAGE_PATH=$(echo "$OUTPUT" | grep "^CLOUD_IMAGE_PATH=" | cut -d= -f2)
|
||||
echo "cloud_image_path=${CLOUD_IMAGE_PATH}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
# ── Run tests ─────────────────────────────────────────────────────
|
||||
|
||||
@@ -304,7 +302,8 @@ jobs:
|
||||
PVETEST_NODE: ${{ steps.target.outputs.node }}
|
||||
PVETEST_STORAGE: ${{ steps.target.outputs.storage }}
|
||||
PVETEST_PVE_VERSION: ${{ matrix.pve_version }}
|
||||
PVETEST_LINUX_VMID: ${{ steps.linux_vm.outputs.linux_vmid }}
|
||||
PVETEST_PASSWORD: ${{ env.PVE_PASSWORD }}
|
||||
PVETEST_CLOUD_IMAGE_PATH: ${{ steps.test_env.outputs.cloud_image_path }}
|
||||
run: |
|
||||
$env:PVETEST_ISO_PATH = Join-Path $env:RUNNER_TEMP "pvetest.iso"
|
||||
Import-Module Pester -MinimumVersion 5.0
|
||||
|
||||
Reference in New Issue
Block a user