test: migrate vdsnapshots e2e to new framefork#2350
Open
eofff wants to merge 5 commits into
Open
Conversation
hardcoretime
requested changes
May 15, 2026
Comment on lines
+277
to
+289
| volumeSnapshot := &unstructured.Unstructured{} | ||
| volumeSnapshot.SetAPIVersion("snapshot.storage.k8s.io/v1") | ||
| volumeSnapshot.SetKind("VolumeSnapshot") | ||
| err = f.GenericClient().Get(ctx, crclient.ObjectKey{ | ||
| Namespace: actualVDSnapshot.Namespace, | ||
| Name: actualVDSnapshot.Status.VolumeSnapshotName, | ||
| }, volumeSnapshot) | ||
| Expect(err).NotTo(HaveOccurred()) | ||
|
|
||
| readyToUse, found, err := unstructured.NestedBool(volumeSnapshot.Object, "status", "readyToUse") | ||
| Expect(err).NotTo(HaveOccurred()) | ||
| Expect(found).To(BeTrue(), "VolumeSnapshot status.readyToUse must be present") | ||
| Expect(readyToUse).To(BeTrue(), "VolumeSnapshot status.readyToUse must be true") |
Contributor
There was a problem hiding this comment.
Is this required in the test?
| vmWatchErrCh := make(chan error, 1) | ||
| var vmWasFrozen atomic.Bool | ||
| go func() { | ||
| wasFrozen, err := ensureVMWasFrozenInProgress( |
Contributor
There was a problem hiding this comment.
It seems that Eventually is sufficient for this test case.
Contributor
Author
There was a problem hiding this comment.
Need to watch without blocking
|
|
||
| const vdSnapshotNSPrefix = "virtual-disk-snapshots" | ||
|
|
||
| var _ = Describe("VirtualDiskSnapshots", Label(precheck.PrecheckImmediateStorageClass, precheck.PrecheckSnapshot), func() { |
Contributor
There was a problem hiding this comment.
Without ordering, all It containers will run simultaneously when Ginkgo runs in parallel. If you want to run it in parallel, split it.
Contributor
Author
There was a problem hiding this comment.
What's the problem now?
| "github.com/deckhouse/virtualization/test/e2e/internal/util" | ||
| ) | ||
|
|
||
| const vdSnapshotNSPrefix = "virtual-disk-snapshots" |
Contributor
There was a problem hiding this comment.
Move it under Describe or delete it if the test cases will be split.
Contributor
Author
There was a problem hiding this comment.
What's the problem with this const?
added 4 commits
May 20, 2026 16:47
Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@flant.com>
Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@flant.com>
Signed-off-by: Valeriy Khorunzhin <valeriy.khorunzhin@flant.com>
0cc79e6 to
76fdd51
Compare
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 vdsnapshots e2e to new framefork.
Why do we need it, and what problem does it solve?
What is the expected result?
Checklist
Changelog entries