@@ -89,32 +89,34 @@ func runPostUpgradeReleaseSmoke() {
8989}
9090
9191func (t * currentReleaseSmokeTest ) createResources () {
92+ ctx := context .Background ()
93+
9294 By ("Creating root and hotplug virtual disks" )
93- Expect (t .framework .CreateWithDeferredDeletion (context . Background () , t .diskObjects ()... )).To (Succeed ())
95+ Expect (t .framework .CreateWithDeferredDeletion (ctx , t .diskObjects ()... )).To (Succeed ())
9496
9597 By ("Creating virtual machines" )
96- Expect (t .framework .CreateWithDeferredDeletion (context . Background () , t .vmObjects ()... )).To (Succeed ())
98+ Expect (t .framework .CreateWithDeferredDeletion (ctx , t .vmObjects ()... )).To (Succeed ())
9799 if runningVMs := t .initialRunningVMObjects (); len (runningVMs ) > 0 {
98- util .UntilObjectPhase (string (v1alpha2 .MachineRunning ), framework .LongTimeout , runningVMs ... )
100+ util .UntilObjectPhase (ctx , string (v1alpha2 .MachineRunning ), framework .LongTimeout , runningVMs ... )
99101 }
100102 if stoppedVMs := t .initialStoppedVMObjects (); len (stoppedVMs ) > 0 {
101- util .UntilObjectPhase (string (v1alpha2 .MachineStopped ), framework .MiddleTimeout , stoppedVMs ... )
103+ util .UntilObjectPhase (ctx , string (v1alpha2 .MachineStopped ), framework .MiddleTimeout , stoppedVMs ... )
102104 }
103105
104106 By ("Starting manual-policy virtual machines" )
105107 for _ , vmScenario := range t .manualStartVMs () {
106- util .StartVirtualMachine (t .framework , vmScenario .vm )
108+ util .StartVirtualMachine (ctx , t .framework , vmScenario .vm )
107109 }
108110 if startedVMs := t .manualStartVMObjects (); len (startedVMs ) > 0 {
109- util .UntilObjectPhase (string (v1alpha2 .MachineRunning ), framework .LongTimeout , startedVMs ... )
111+ util .UntilObjectPhase (ctx , string (v1alpha2 .MachineRunning ), framework .LongTimeout , startedVMs ... )
110112 }
111113
112114 By ("Attaching hotplug disks" )
113- Expect (t .framework .CreateWithDeferredDeletion (context . Background () , t .attachmentObjects ()... )).To (Succeed ())
114- util .UntilObjectPhase (string (v1alpha2 .BlockDeviceAttachmentPhaseAttached ), framework .MaxTimeout , t .attachmentObjects ()... )
115+ Expect (t .framework .CreateWithDeferredDeletion (ctx , t .attachmentObjects ()... )).To (Succeed ())
116+ util .UntilObjectPhase (ctx , string (v1alpha2 .BlockDeviceAttachmentPhaseAttached ), framework .MaxTimeout , t .attachmentObjects ()... )
115117
116118 By ("Waiting for all disks to become ready after consumers appear" )
117- util .UntilObjectPhase (string (v1alpha2 .DiskReady ), framework .LongTimeout , t .diskObjects ()... )
119+ util .UntilObjectPhase (ctx , string (v1alpha2 .DiskReady ), framework .LongTimeout , t .diskObjects ()... )
118120}
119121
120122func (t * currentReleaseSmokeTest ) verifyVMsReady () {
@@ -132,7 +134,7 @@ func (t *currentReleaseSmokeTest) verifyVMsReady() {
132134
133135func (t * currentReleaseSmokeTest ) verifyVMsSurvivedUpgrade () {
134136 By ("Waiting for upgraded virtual machines to be running" )
135- util .UntilObjectPhase (string (v1alpha2 .MachineRunning ), framework .LongTimeout , t .vmObjects ()... )
137+ util .UntilObjectPhase (context . Background (), string (v1alpha2 .MachineRunning ), framework .LongTimeout , t .vmObjects ()... )
136138
137139 By ("Checking guest access after module upgrade" )
138140 for _ , vmScenario := range t .vms {
0 commit comments