Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

847 B
Raw Blame
package main

import "testing"

func TestProviderMSPCommandExposesBackup(t *testing.T) {
	cmd := newProviderMSPCmd()
	for _, child := range cmd.Commands() {
		if child.Name() == "backup" {
			foundCreate := false
			foundRestore := false
			foundVerify := false
			for _, backupChild := range child.Commands() {
				switch backupChild.Name() {
				case "create":
					foundCreate = true
				case "restore":
					foundRestore = true
				case "verify":
					foundVerify = true
				}
			}
			if !foundCreate {
				t.Fatal("provider-msp backup create command is not registered")
			}
			if !foundRestore {
				t.Fatal("provider-msp backup restore command is not registered")
			}
			if !foundVerify {
				t.Fatal("provider-msp backup verify command is not registered")
			}
			return
		}
	}
	t.Fatal("provider-msp backup command is not registered")
}