MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / storageListResponse

Function storageListResponse

internal/cli/cli_integration_test.go:19–24  ·  view source on GitHub ↗

Integration tests for storage commands. These tests use a local httptest server to simulate the Proxmox API and exercise the full command handler pipeline (flag parsing → API call → JSON output). They are separate from unit tests because they wire up a real api.Client and go through initCLISession

()

Source from the content-addressed store, hash-verified

17
18// storageListResponse returns a minimal /nodes/{node}/storage JSON response.
19func storageListResponse() string {
20 return `{"data":[
21 {"storage":"local","plugintype":"dir","content":"vztmpl,iso,backup","disk":1073741824,"maxdisk":10737418240,"status":"available","shared":0,"type":"storage","node":"pve01"},
22 {"storage":"local-zfs","plugintype":"zfspool","content":"images,rootdir","disk":5368709120,"maxdisk":21474836480,"status":"available","shared":0,"type":"storage","node":"pve01"}
23 ]}`
24}
25
26// storageContentResponse returns a minimal /nodes/{node}/storage/{storage}/content JSON response.
27func storageContentResponse() string {

Callers 1

newStorageTestServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected