mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-08-24 19:46:29 +00:00
fix: resolve all integration test failures against live PVE
- BaseUrl trailing slash and resource path cleanup: PveSession.BaseUrl now
ends with '/', all cmdlet resource strings stripped of leading slashes and
/api2/json/ prefixes so URLs compose correctly
- PveNodeStatus: rename Name -> Node to match JSON field and test expectations
- NewPveVmCmdlet: auto-allocate vmid via GET cluster/nextid when -VmId omitted
- UploadFileAsync (BZ 7389 workarounds):
* Unquoted multipart boundary in Content-Type header
* Quoted name= values in Content-Disposition (embedded double-quotes)
* Content-Disposition set before Content-Type on file part — PVE's parser
closes the connection if Content-Type appears first
- SendPveIsoCmdlet: run upload in Task.Run, track progress atomically with
Interlocked, poll and call WriteProgress only from pipeline thread to avoid
InvalidOperationException from PSCmdlet thread-affinity requirements
- Add debug/Capture-UploadDiff.ps1: mitmproxy capture script used to isolate
the header-ordering bug by diffing raw multipart bytes from PS vs C# module
Integration test result: 11 passed, 0 failed, 4 skipped (expected — no
template/stopped VMs on bare nested PVE test node).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -72,7 +72,7 @@ namespace PSProxmoxVE.Core.Tests.Models
|
||||
var data = JObject.Parse(json)["data"];
|
||||
var status = data.ToObject<PveNodeStatus>();
|
||||
Assert.NotNull(status);
|
||||
Assert.Equal("pve1", status.Name);
|
||||
Assert.Equal("pve1", status.Node);
|
||||
Assert.Equal(68719476736L, status.MemoryTotal);
|
||||
Assert.Equal(17179869184L, status.MemoryUsed);
|
||||
Assert.Equal(864000L, status.Uptime);
|
||||
|
||||
Reference in New Issue
Block a user