This commit is contained in:
2026-06-05 17:14:39 +03:00
parent e9adcfec1c
commit fea00bbb42
157 changed files with 4837 additions and 251 deletions

View File

@@ -130,6 +130,12 @@ func TestGetListCloudAPI(t *testing.T) {
t.Error(err)
}
getResult("Compute get", bytes, compute.RecordCompute{}, t)
// GetCPUAlignmentProfile
bytes, err = client.CloudAPI().Compute().GetCPUAlignmentProfileRaw(context.Background(), compute.GetCPUAlignmentProfileRequest{ComputeID: id})
if err != nil {
t.Error(err)
}
getResult("Compute get_cpu_alignment_profile", bytes, compute.CPUAlignmentProfile{}, t)
} else {
t.Errorf("Can not test Compute get because compute list is empty")
}
@@ -526,6 +532,12 @@ func TestGetListCloudbroker(t *testing.T) {
t.Error(err)
}
getResult("Compute get", bytes, compute_cb.RecordCompute{}, t)
// GetCPUAlignmentProfile
bytes, err = client.CloudBroker().Compute().GetCPUAlignmentProfileRaw(context.Background(), compute_cb.GetCPUAlignmentProfileRequest{ComputeID: id})
if err != nil {
t.Error(err)
}
getResult("Compute get_cpu_alignment_profile", bytes, compute_cb.CPUAlignmentProfile{}, t)
} else {
t.Errorf("Can not test Compute get because compute list is empty")
}
@@ -706,10 +718,28 @@ func TestGetListCloudbroker(t *testing.T) {
t.Error(err)
}
getResult("Node get", bytes, node_cb.RecordNode{}, t)
// GetNetworkInfo
bytes, err = client.CloudBroker().Node().GetNetworkInfoRaw(context.Background(), node_cb.GetNetworkInfoRequest{NodeID: id})
if err != nil {
t.Error(err)
}
getResult("Node get_network_info", bytes, node_cb.RecordNodeNetworkInfo{}, t)
} else {
t.Errorf("Can not test Node get because LB list is empty")
}
// Node GetPCIDevices
if len(listNode.Data) > 0 {
id := listNode.Data[0].ID
bytes, err = client.CloudBroker().Node().GetPCIDevicesRaw(context.Background(), node_cb.GetPCIDevicesRequest{NodeID: id})
if err != nil {
t.Error(err)
}
getResult("Node PCI devices list", bytes, node_cb.ListPCIDevices{}, t)
} else {
t.Errorf("Can not test Node GetPCIDevices because node list is empty")
}
// Pcidevice
// List
bytes, err = client.CloudBroker().PCIDevice().ListRaw(context.Background(), pcidevice_cb.ListRequest{})
@@ -868,9 +898,23 @@ func TestGetListCloudbroker(t *testing.T) {
t.Error(err)
}
getResult("Zone get", bytes, zone_cb.RecordZone{}, t)
// GetCPUAlignmentProfile
bytes, err = client.CloudBroker().Zone().GetCPUAlignmentProfileRaw(context.Background(), zone_cb.GetCPUAlignmentProfileRequest{ZoneID: id})
if err != nil {
t.Error(err)
}
getResult("Zone get_cpu_alignment_profile", bytes, []zone_cb.CpuAlignmentProfile{}, t)
} else {
t.Errorf("Can not test Zone get because Zones list is empty")
}
// ListCPUAlignmentProfile
bytes, err = client.CloudBroker().Zone().ListCPUAlignmentProfileRaw(context.Background(), zone_cb.ListCPUAlignmentProfileRequest{})
if err != nil {
t.Error(err)
}
getResult("Zone list_cpu_alignment_profile", bytes, zone_cb.ListCPUAlignmentProfiles{}, t)
}
// TestGetListSDNAPI tests platforms responses vs. json tags of golang structures in cloudapi get/list methods