Expand guest metrics and add Proxmox maintenance overview
This commit is contained in:
@@ -15,3 +15,16 @@ func TestGuestJSON(t *testing.T) {
|
||||
t.Fatalf("неожиданные данные гостя: %+v", guest)
|
||||
}
|
||||
}
|
||||
|
||||
func TestGuestConfigHelpers(t *testing.T) {
|
||||
if got := storageName("local-zfs:vm-101-disk-0,size=32G"); got != "local-zfs" {
|
||||
t.Fatalf("storage: %s", got)
|
||||
}
|
||||
ips := ipsFromConfig("name=eth0,bridge=vmbr0,ip=192.168.0.20/24,ip6=auto")
|
||||
if len(ips) != 1 || ips[0] != "192.168.0.20" {
|
||||
t.Fatalf("ips: %+v", ips)
|
||||
}
|
||||
if !agentEnabled("enabled=1,fstrim_cloned_disks=1") {
|
||||
t.Fatal("agent should be enabled")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user