Skip to content

Commit

Permalink
tests: correct check for containerdisk env vars eventually appearing …
Browse files Browse the repository at this point in the history
…as labels (#3263)

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
  • Loading branch information
akalenyu authored May 20, 2024
1 parent 2b20854 commit dd07461
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tests/import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2187,13 +2187,14 @@ var _ = Describe("Containerdisk envs to PVC labels", func() {
err = utils.WaitForDataVolumePhase(f, f.Namespace.Name, phase, dataVolume.Name)
Expect(err).ToNot(HaveOccurred())

pvc, err = utils.FindPVC(f.K8sClient, dataVolume.Namespace, dataVolume.Name)
Expect(err).ToNot(HaveOccurred())

Eventually(func(g Gomega) {
g.Expect(pvc.GetLabels()).To(HaveKeyWithValue(testKubevirtIoKey, testKubevirtIoValue))
g.Expect(pvc.GetLabels()).To(HaveKeyWithValue(testKubevirtIoKeyExisting, testKubevirtIoValueExisting))
}, timeout, pollingInterval).Should(Succeed())
Eventually(func(g Gomega) map[string]string {
pvc, err = utils.FindPVC(f.K8sClient, dataVolume.Namespace, dataVolume.Name)
g.Expect(err).ToNot(HaveOccurred())
return pvc.GetLabels()
}, timeout, pollingInterval).Should(And(
HaveKeyWithValue(testKubevirtIoKey, testKubevirtIoValue),
HaveKeyWithValue(testKubevirtIoKeyExisting, testKubevirtIoValueExisting),
))
},
Entry("with pullMethod pod", cdiv1.RegistryPullPod, tinyCoreRegistryURL, false),
Entry("with pullMethod node", cdiv1.RegistryPullNode, trustedRegistryURL, false),
Expand Down

0 comments on commit dd07461

Please sign in to comment.