@@ -57,7 +57,7 @@ var _ = Describe("VirtualMachineConfiguration", func() {
5757 f .Before ()
5858
5959 By ("Environment preparation" )
60- t .GenerateConfigurationResources (restartApprovalMode )
60+ t .GenerateResources (restartApprovalMode )
6161 err := f .CreateWithDeferredDeletion (context .Background (), t .VM , t .VDRoot , t .VDBlank )
6262 Expect (err ).NotTo (HaveOccurred ())
6363
@@ -125,24 +125,24 @@ func NewConfigurationTest(f *framework.Framework) *configurationTest {
125125 }
126126}
127127
128- func (c * configurationTest ) GenerateConfigurationResources (restartApprovalMode v1alpha2.RestartApprovalMode ) {
129- c .VDRoot = vdbuilder .New (
128+ func (t * configurationTest ) GenerateResources (restartApprovalMode v1alpha2.RestartApprovalMode ) {
129+ t .VDRoot = vdbuilder .New (
130130 vdbuilder .WithName ("vd-root" ),
131- vdbuilder .WithNamespace (c .Framework .Namespace ().Name ),
131+ vdbuilder .WithNamespace (t .Framework .Namespace ().Name ),
132132 vdbuilder .WithDataSourceHTTP (& v1alpha2.DataSourceHTTP {
133133 URL : object .ImageURLUbuntu ,
134134 }),
135135 )
136136
137- c .VDBlank = vdbuilder .New (
137+ t .VDBlank = vdbuilder .New (
138138 vdbuilder .WithName ("vd-blank" ),
139- vdbuilder .WithNamespace (c .Framework .Namespace ().Name ),
139+ vdbuilder .WithNamespace (t .Framework .Namespace ().Name ),
140140 vdbuilder .WithSize (ptr .To (resource .MustParse ("100Mi" ))),
141141 )
142142
143- c .VM = vmbuilder .New (
143+ t .VM = vmbuilder .New (
144144 vmbuilder .WithName ("vm" ),
145- vmbuilder .WithNamespace (c .Framework .Namespace ().Name ),
145+ vmbuilder .WithNamespace (t .Framework .Namespace ().Name ),
146146 vmbuilder .WithCPU (1 , ptr .To (initialCoreFraction )),
147147 vmbuilder .WithMemory (resource .MustParse (initialMemorySize )),
148148 vmbuilder .WithLiveMigrationPolicy (v1alpha2 .AlwaysSafeMigrationPolicy ),
@@ -151,14 +151,14 @@ func (c *configurationTest) GenerateConfigurationResources(restartApprovalMode v
151151 vmbuilder .WithBlockDeviceRefs (
152152 v1alpha2.BlockDeviceSpecRef {
153153 Kind : v1alpha2 .DiskDevice ,
154- Name : c .VDRoot .Name ,
154+ Name : t .VDRoot .Name ,
155155 },
156156 ),
157157 vmbuilder .WithRestartApprovalMode (restartApprovalMode ),
158158 )
159159}
160160
161- func (c * configurationTest ) IsVDAttached (vd * v1alpha2.VirtualDisk , vm * v1alpha2.VirtualMachine ) bool {
161+ func (t * configurationTest ) IsVDAttached (vd * v1alpha2.VirtualDisk , vm * v1alpha2.VirtualMachine ) bool {
162162 for _ , bd := range vm .Status .BlockDeviceRefs {
163163 if bd .Kind == v1alpha2 .DiskDevice && bd .Name == vd .Name && bd .Attached {
164164 return true
@@ -172,7 +172,7 @@ func (t *configurationTest) CheckRestartAwaitingChanges(vm *v1alpha2.VirtualMach
172172 return
173173 }
174174
175- // Avoid race condition with need restart condition calculation
175+ // Avoid race conditions during the calculation of the " need restart" condition.
176176 Eventually (func (g Gomega ) {
177177 err := t .Framework .Clients .GenericClient ().Get (context .Background (), crclient .ObjectKeyFromObject (t .VM ), t .VM )
178178 g .Expect (err ).NotTo (HaveOccurred ())
0 commit comments