|
|
|
|
@ -333,6 +333,7 @@ func TestCloneBuilderAcc_hardware(t *testing.T) {
|
|
|
|
|
func hardwareConfig() string {
|
|
|
|
|
config := defaultConfig()
|
|
|
|
|
config["CPUs"] = 2
|
|
|
|
|
config["cpu_cores"] = 2
|
|
|
|
|
config["CPU_reservation"] = 1000
|
|
|
|
|
config["CPU_limit"] = 1500
|
|
|
|
|
config["RAM"] = 2048
|
|
|
|
|
@ -359,6 +360,11 @@ func checkHardware(t *testing.T) builderT.TestCheckFunc {
|
|
|
|
|
t.Errorf("VM should have 2 CPU sockets, got %v", cpuSockets)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cpuCores := vmInfo.Config.Hardware.NumCoresPerSocket
|
|
|
|
|
if cpuCores != 2 {
|
|
|
|
|
t.Errorf("VM should have 2 CPU cores per socket, got %v", cpuCores)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cpuReservation := *vmInfo.Config.CpuAllocation.Reservation
|
|
|
|
|
if cpuReservation != 1000 {
|
|
|
|
|
t.Errorf("VM should have CPU reservation for 1000 Mhz, got %v", cpuReservation)
|
|
|
|
|
|