feat: add proxmox reconciliation job

This commit is contained in:
Philipp
2026-06-11 14:48:50 +02:00
parent d08e41b013
commit 137c13fa98
10 changed files with 487 additions and 2 deletions
+19
View File
@@ -130,6 +130,25 @@ func TestClientPowersVM(t *testing.T) {
}
}
func TestClientGetsVMStatus(t *testing.T) {
server := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.URL.Path != "/api2/json/nodes/pve/qemu/100/status/current" {
t.Fatalf("path = %q", r.URL.Path)
}
_, _ = w.Write([]byte(`{"data":{"status":"running"}}`))
}))
defer server.Close()
client := newTestClient(t, server, fingerprintForServer(server))
status, err := client.GetVMStatus(context.Background(), "pve", 100)
if err != nil {
t.Fatalf("GetVMStatus() error = %v", err)
}
if status.Status != "running" {
t.Fatalf("status = %q, want running", status.Status)
}
}
func TestNewClientRejectsInvalidFingerprint(t *testing.T) {
_, err := NewClient(cluster.Cluster{
APIEndpoint: "https://pve.example.test:8006/api2/json",