@@ -21,6 +21,7 @@ import (
21
21
22
22
. "github.com/onsi/ginkgo/v2"
23
23
. "github.com/onsi/gomega"
24
+ "k8s.io/utils/ptr"
24
25
"sigs.k8s.io/controller-runtime/pkg/client"
25
26
26
27
vmbuilder "github.com/deckhouse/virtualization-controller/pkg/builder/vm"
@@ -90,12 +91,12 @@ var _ = Describe("LifecycleHandler", func() {
90
91
virtv2 .VMOPPhasePending ,
91
92
),
92
93
Entry ("is ok for AlwaysSafe and force=false" ,
93
- newVMOPEvictPending (vmopbuilder .WithForceFalse ( )),
94
+ newVMOPEvictPending (vmopbuilder .WithForce ( ptr . To ( false ) )),
94
95
virtv2 .AlwaysSafeMigrationPolicy ,
95
96
virtv2 .VMOPPhasePending ,
96
97
),
97
98
Entry ("should become Failed for AlwaysSafe and force=true" ,
98
- newVMOPEvictPending (vmopbuilder .WithForce ()),
99
+ newVMOPEvictPending (vmopbuilder .WithForce (ptr . To ( true ) )),
99
100
virtv2 .AlwaysSafeMigrationPolicy ,
100
101
virtv2 .VMOPPhaseFailed ,
101
102
),
@@ -107,12 +108,12 @@ var _ = Describe("LifecycleHandler", func() {
107
108
virtv2 .VMOPPhasePending ,
108
109
),
109
110
Entry ("is ok for PreferSafe and force=false" ,
110
- newVMOPEvictPending (vmopbuilder .WithForceFalse ( )),
111
+ newVMOPEvictPending (vmopbuilder .WithForce ( ptr . To ( false ) )),
111
112
virtv2 .PreferSafeMigrationPolicy ,
112
113
virtv2 .VMOPPhasePending ,
113
114
),
114
115
Entry ("is ok for PreferSafe and force=true" ,
115
- newVMOPEvictPending (vmopbuilder .WithForce ()),
116
+ newVMOPEvictPending (vmopbuilder .WithForce (ptr . To ( true ) )),
116
117
virtv2 .PreferSafeMigrationPolicy ,
117
118
virtv2 .VMOPPhasePending ,
118
119
),
@@ -124,12 +125,12 @@ var _ = Describe("LifecycleHandler", func() {
124
125
virtv2 .VMOPPhasePending ,
125
126
),
126
127
Entry ("should become Failed for AlwaysForced and force=false" ,
127
- newVMOPEvictPending (vmopbuilder .WithForceFalse ( )),
128
+ newVMOPEvictPending (vmopbuilder .WithForce ( ptr . To ( false ) )),
128
129
virtv2 .AlwaysForcedMigrationPolicy ,
129
130
virtv2 .VMOPPhaseFailed ,
130
131
),
131
132
Entry ("is ok for AlwaysForced and force=true" ,
132
- newVMOPEvictPending (vmopbuilder .WithForce ()),
133
+ newVMOPEvictPending (vmopbuilder .WithForce (ptr . To ( true ) )),
133
134
virtv2 .AlwaysForcedMigrationPolicy ,
134
135
virtv2 .VMOPPhasePending ,
135
136
),
@@ -141,12 +142,12 @@ var _ = Describe("LifecycleHandler", func() {
141
142
virtv2 .VMOPPhasePending ,
142
143
),
143
144
Entry ("is ok for PreferForced and force=false" ,
144
- newVMOPEvictPending (vmopbuilder .WithForceFalse ( )),
145
+ newVMOPEvictPending (vmopbuilder .WithForce ( ptr . To ( false ) )),
145
146
virtv2 .PreferForcedMigrationPolicy ,
146
147
virtv2 .VMOPPhasePending ,
147
148
),
148
149
Entry ("is ok for PreferForced and force=true" ,
149
- newVMOPEvictPending (vmopbuilder .WithForce ()),
150
+ newVMOPEvictPending (vmopbuilder .WithForce (ptr . To ( true ) )),
150
151
virtv2 .PreferForcedMigrationPolicy ,
151
152
virtv2 .VMOPPhasePending ,
152
153
),
0 commit comments