@@ -229,14 +229,14 @@ func TestSetCPUModel(t *testing.T) {
229229 name := "test-name"
230230 namespace := "test-namespace"
231231
232- t .Run ("should add optional ht feature for intel x86 discovery cpu" , func (t * testing.T ) {
232+ t .Run ("should add optional ht feature for discovery cpu" , func (t * testing.T ) {
233233 builder := NewEmptyKVVM (types.NamespacedName {Name : name , Namespace : namespace }, KVVMOptions {})
234234 class := & v1alpha2.VirtualMachineClass {
235235 Spec : v1alpha2.VirtualMachineClassSpec {
236236 CPU : v1alpha2.CPU {Type : v1alpha2 .CPUTypeDiscovery },
237237 },
238238 Status : v1alpha2.VirtualMachineClassStatus {
239- CpuFeatures : v1alpha2.CpuFeatures {Enabled : []string {"vmx" , " aes" }},
239+ CpuFeatures : v1alpha2.CpuFeatures {Enabled : []string {"aes" }},
240240 },
241241 }
242242
@@ -250,27 +250,6 @@ func TestSetCPUModel(t *testing.T) {
250250 }
251251 })
252252
253- t .Run ("should not add ht feature for amd discovery cpu" , func (t * testing.T ) {
254- builder := NewEmptyKVVM (types.NamespacedName {Name : name , Namespace : namespace }, KVVMOptions {})
255- class := & v1alpha2.VirtualMachineClass {
256- Spec : v1alpha2.VirtualMachineClassSpec {
257- CPU : v1alpha2.CPU {Type : v1alpha2 .CPUTypeDiscovery },
258- },
259- Status : v1alpha2.VirtualMachineClassStatus {
260- CpuFeatures : v1alpha2.CpuFeatures {Enabled : []string {"svm" , "aes" }},
261- },
262- }
263-
264- if err := builder .SetCPUModel (class ); err != nil {
265- t .Fatalf ("SetCPUModel() failed: %v" , err )
266- }
267-
268- features := builder .Resource .Spec .Template .Spec .Domain .CPU .Features
269- if containsCPUFeature (features , virtv1.CPUFeature {Name : HTCPUFeature , Policy : "optional" }) {
270- t .Fatalf ("did not expect optional ht feature for amd cpu, got %#v" , features )
271- }
272- })
273-
274253 t .Run ("should keep existing ht feature policy when already present" , func (t * testing.T ) {
275254 builder := NewEmptyKVVM (types.NamespacedName {Name : name , Namespace : namespace }, KVVMOptions {})
276255 class := & v1alpha2.VirtualMachineClass {
0 commit comments