test: migrate VirtualMachineImageHotplug e2e test to new framework#2443
Draft
eofff wants to merge 2 commits into
Draft
test: migrate VirtualMachineImageHotplug e2e test to new framework#2443eofff wants to merge 2 commits into
eofff wants to merge 2 commits into
Conversation
8ae0ba1 to
6dd1ae7
Compare
Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@flant.com>
hardcoretime
reviewed
Jun 4, 2026
Comment on lines
113
to
+116
| type TestData struct { | ||
| ImageHotplug string `yaml:"imageHotplug"` | ||
| VMMigration string `yaml:"vmMigration"` | ||
| Sshkey string `yaml:"sshKey"` | ||
| SSHUser string `yaml:"sshUser"` | ||
| VMMigration string `yaml:"vmMigration"` | ||
| Sshkey string `yaml:"sshKey"` | ||
| SSHUser string `yaml:"sshUser"` |
Contributor
There was a problem hiding this comment.
This is the last legacy test case, and unused configurations and legacy test data should be removed as well.
Also, delete the .keep files in the test data directory.
| vmbuilder.WithName("vm"), | ||
| vmbuilder.WithNamespace(f.Namespace().Name), | ||
| vmbuilder.WithCPU(1, ptr.To("100%")), | ||
| vmbuilder.WithMemory(resource.MustParse("256Mi")), |
Contributor
There was a problem hiding this comment.
Use 512Mi to prevent problems with out-of-memory (OOM) errors.
#2444
Contributor
There was a problem hiding this comment.
Should this test be placed in the block device section? Also, the block device util contains some lsblk structures.
| attached++ | ||
| } | ||
| } | ||
| g.Expect(attached).To(BeNumerically(">=", expectedAttached+1)) |
Contributor
There was a problem hiding this comment.
Add a short description to the error message.
| util.UntilGuestCommandsReady(f, vm, []string{"lsblk"}, framework.ShortTimeout) | ||
|
|
||
| By("Calculating initial block devices count") | ||
| initialDiskCnt, err := util.GetDiskCount(f, vm.Name, vm.Namespace) |
Contributor
There was a problem hiding this comment.
Suggested change
| initialDiskCnt, err := util.GetDiskCount(f, vm.Name, vm.Namespace) | |
| initialDiskCount, err := util.GetDiskCount(f, vm.Name, vm.Namespace) |
| Eventually(func(g Gomega) { | ||
| count, diskErr := util.GetDiskCount(f, vm.Name, vm.Namespace) | ||
| g.Expect(diskErr).NotTo(HaveOccurred()) | ||
| g.Expect(count).To(Equal(initialDiskCnt + hotplugImagesCount)) |
Contributor
There was a problem hiding this comment.
Add a short description to the error message.
hardcoretime
requested changes
Jun 4, 2026
| util.UntilSSHReady(f, vm, framework.MiddleTimeout) | ||
| util.UntilGuestCommandsReady(f, vm, []string{"lsblk"}, framework.ShortTimeout) | ||
|
|
||
| By("Calculating initial block devices count") |
Contributor
There was a problem hiding this comment.
Suggested change
| By("Calculating initial block devices count") | |
| By("Getting initial block devices count") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Migrate
VirtualMachineImageHotpluge2e test to the new framework.Checklist
Changelog entries