File tree Expand file tree Collapse file tree
images/virtualization-artifact/pkg/controller/kvbuilder Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ func (b *KVVM) SetCPUModel(class *v1alpha2.VirtualMachineClass) error {
188188 features = append (features , virtv1.CPUFeature {Name : "svm" , Policy : "optional" })
189189 }
190190 if ! hasHT {
191- features = append (features , virtv1.CPUFeature {Name : HTCPUFeature , Policy : "optional " })
191+ features = append (features , virtv1.CPUFeature {Name : HTCPUFeature , Policy : "require " })
192192 }
193193 cpu .Features = features
194194 default :
Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ func TestSetCPUModel(t *testing.T) {
229229 name := "test-name"
230230 namespace := "test-namespace"
231231
232- t .Run ("should add optional ht feature for discovery cpu" , func (t * testing.T ) {
232+ t .Run ("should add required 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 {
@@ -245,8 +245,8 @@ func TestSetCPUModel(t *testing.T) {
245245 }
246246
247247 features := builder .Resource .Spec .Template .Spec .Domain .CPU .Features
248- if ! containsCPUFeature (features , virtv1.CPUFeature {Name : HTCPUFeature , Policy : "optional " }) {
249- t .Fatalf ("expected optional ht feature to be added, got %#v" , features )
248+ if ! containsCPUFeature (features , virtv1.CPUFeature {Name : HTCPUFeature , Policy : "require " }) {
249+ t .Fatalf ("expected required ht feature to be added, got %#v" , features )
250250 }
251251 })
252252
You can’t perform that action at this time.
0 commit comments