Skip to content

Commit 706035d

Browse files
author
Roman Sysoev
committed
test(vmrestore): enable annotations and labels checks
Signed-off-by: Roman Sysoev <roman.sysoev@flant.com>
1 parent f6c3b13 commit 706035d

File tree

2 files changed

+16
-20
lines changed

2 files changed

+16
-20
lines changed

test/e2e/legacy/vm_restore_force.go

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,12 @@ var _ = Describe("VirtualMachineRestoreForce", Ordered, func() {
258258
})
259259

260260
By("Checking the result of restoration", func() {
261-
// const (
262-
// testLabelKey = "test-label"
263-
// testLabelValue = "test-label-value"
264-
// testAnnotationKey = "test-annotation"
265-
// testAnnotationValue = "test-annotation-value"
266-
// )
261+
const (
262+
testLabelKey = "test-label"
263+
testLabelValue = "test-label-value"
264+
testAnnotationKey = "test-annotation"
265+
testAnnotationValue = "test-annotation-value"
266+
)
267267

268268
vmrestores := &v1alpha2.VirtualMachineRestoreList{}
269269
err := GetObjects(v1alpha2.VirtualMachineRestoreKind, vmrestores, kc.GetOptions{Namespace: namespace, Labels: testCaseLabel})
@@ -289,10 +289,8 @@ var _ = Describe("VirtualMachineRestoreForce", Ordered, func() {
289289
Expect(err).NotTo(HaveOccurred())
290290
Expect(vd.Annotations).To(HaveKeyWithValue(annotations.AnnVMRestore, string(restore.UID)))
291291

292-
// Skip the annotation and label checks until the issue with virtual disk restoration is fixed.
293-
// Cause: Sometimes, a virtual disk does not have annotations and labels from a virtual disk snapshot, causing the test to fail.
294-
// Expect(vd.Annotations).To(HaveKeyWithValue(testAnnotationKey, testAnnotationValue))
295-
// Expect(vd.Labels).To(HaveKeyWithValue(testLabelKey, testLabelValue))
292+
Expect(vd.Annotations).To(HaveKeyWithValue(testAnnotationKey, testAnnotationValue))
293+
Expect(vd.Labels).To(HaveKeyWithValue(testLabelKey, testLabelValue))
296294
}
297295

298296
// if bd.VirtualMachineBlockDeviceAttachmentName != "" {

test/e2e/legacy/vm_restore_safe.go

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -264,12 +264,12 @@ var _ = Describe("VirtualMachineRestoreSafe", Ordered, func() {
264264
})
265265

266266
By("Checking the result of restoration", func() {
267-
// const (
268-
// testLabelKey = "test-label"
269-
// testLabelValue = "test-label-value"
270-
// testAnnotationKey = "test-annotation"
271-
// testAnnotationValue = "test-annotation-value"
272-
// )
267+
const (
268+
testLabelKey = "test-label"
269+
testLabelValue = "test-label-value"
270+
testAnnotationKey = "test-annotation"
271+
testAnnotationValue = "test-annotation-value"
272+
)
273273

274274
vmrestores := &v1alpha2.VirtualMachineRestoreList{}
275275
err := GetObjects(v1alpha2.VirtualMachineRestoreKind, vmrestores, kc.GetOptions{Namespace: namespace, Labels: testCaseLabel})
@@ -294,10 +294,8 @@ var _ = Describe("VirtualMachineRestoreSafe", Ordered, func() {
294294
Expect(err).NotTo(HaveOccurred())
295295
Expect(vd.Annotations).To(HaveKeyWithValue(annotations.AnnVMRestore, string(restore.UID)))
296296

297-
// Skip the annotation and label checks until the issue with virtual disk restoration is fixed.
298-
// Cause: Sometimes, a virtual disk does not have annotations and labels from a virtual disk snapshot, causing the test to fail.
299-
// Expect(vd.Annotations).To(HaveKeyWithValue(testAnnotationKey, testAnnotationValue))
300-
// Expect(vd.Labels).To(HaveKeyWithValue(testLabelKey, testLabelValue))
297+
Expect(vd.Annotations).To(HaveKeyWithValue(testAnnotationKey, testAnnotationValue))
298+
Expect(vd.Labels).To(HaveKeyWithValue(testLabelKey, testLabelValue))
301299
}
302300

303301
// Disable dut to the issue with virtual disk restoration because of VMBDA.

0 commit comments

Comments
 (0)