Closed duyanyan closed 5 years ago
Thank you Yan for quick fix
not sure I fully understand the context, but the code looks reasonnable
not sure I fully understand the context, but the code looks reasonnable
Same for me.
BTW, looks like CI broken. And cause is new. It can't deploy the webUI:
TASK [kubevirt_web_ui : Wait until Web UI is ready: 'v1.4.0-13']
With this change you will have two anonymous almost identical functions. Can you make the function more generic and use it in both cases? e.g.:
func curlReq(vmi *v1.VirtualMachineInstance, command, resp string) {
ktests.WaitUntilVMIReady(vmi, ktests.LoggedInCirrosExpecter)
err := ktests.CheckForTextExpecter(vmi, []expect.Batcher{
&expect.BSnd{S: command},
&expect.BExp{R: resp},
}, 60)
Expect(err).ToNot(HaveOccurred())
}
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
/lifecycle rotten
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen
.
Mark the issue as fresh with /remove-lifecycle rotten
.
/close
@kubevirt-bot: Closed this PR.
What this PR does / why we need it: Use anonymous function to fix curlReq redeclared issue
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged): Fixes # when running all the tests in the repo, separated functions for curlReq will cause below error:tests/networkpolicy_test.go:103:75: curlReq redeclared in this block previous declaration at tests/network_migration_test.go:152:75
use anonymous function instead
Special notes for your reviewer:
Release note: