Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanups #1667

Merged
merged 2 commits into from Nov 2, 2018
Merged

Cleanups #1667

merged 2 commits into from Nov 2, 2018

Conversation

ahadas
Copy link
Contributor

@ahadas ahadas commented Nov 1, 2018

What this PR does / why we need it:
Minor cleanup in controller's vmi.go and vmi_tests.go, e.g., fix typo, moving variables declaration closer to the place they're used, etc.

Release note:

None

Signed-off-by: Arik Hadas <ahadas@redhat.com>
Signed-off-by: Arik Hadas <ahadas@redhat.com>
@kubevirt-bot kubevirt-bot added release-note-none Denotes a PR that doesn't merit a release note. size/M labels Nov 1, 2018
templatePod, err := c.templateService.RenderLaunchManifest(vmi)
if _, ok := err.(services.PvcNotFoundError); ok {
return &syncErrorImpl{fmt.Errorf("failed to render launch manifest: %v", err), FailedPvcNotFoundReason}
} else if err != nil {
return &syncErrorImpl{fmt.Errorf("failed to render launch manifest: %v", err), FailedCreatePodReason}
}

vmiKey := controller.VirtualMachineKey(vmi)
c.podExpectations.ExpectCreations(vmiKey, 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not only cosmetic, that's also more correct. We don't expect a pod creation if the mentioned PVCs above do not exist yet. 👍

@rmohr rmohr merged commit 18ef13d into kubevirt:master Nov 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants