mirror of
https://github.com/kubevirt/containerized-data-importer.git
synced 2025-06-03 06:30:22 +00:00
Fix flaky DataImportCron volume snapshot test (#3583)
As commented by Alex Kalenyuk: the condition check flakes because the switch to snapshot boot sources is almost instant. The DataImportCron never becomes "not ready" following the switch. We also moved the DIC "ready" check after the snapshot "ready" check, otherwise we may check it before it's "not ready", which checks nothing. Signed-off-by: Arnon Gilboa <agilboa@redhat.com> Co-authored-by: Arnon Gilboa <agilboa@redhat.com>
This commit is contained in:
parent
1b826b0b28
commit
da1c19776b
@ -714,11 +714,9 @@ var _ = Describe("DataImportCron", func() {
|
||||
// Now simulate an upgrade, where a new CDI version has identified
|
||||
// more storage types that scale better with snapshots
|
||||
configureStorageProfileResultingFormat(cdiv1.DataImportCronSourceFormatSnapshot)
|
||||
// Switches to not ready because the snapshot wasn't created yet
|
||||
waitForConditions(corev1.ConditionFalse, corev1.ConditionFalse)
|
||||
waitForConditions(corev1.ConditionFalse, corev1.ConditionTrue)
|
||||
// Check snapshot now exists and PVC is gone
|
||||
currentSource := verifySourceReady(cdiv1.DataImportCronSourceFormatSnapshot, currentImportDv)
|
||||
waitForConditions(corev1.ConditionFalse, corev1.ConditionTrue)
|
||||
// DataSource is updated to point to a snapshot
|
||||
dataSource, err := f.CdiClient.CdiV1beta1().DataSources(ns).Get(context.TODO(), cron.Spec.ManagedDataSource, metav1.GetOptions{})
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
Loading…
Reference in New Issue
Block a user