Skip to content

Commit

Permalink
Additional review comments.
Browse files Browse the repository at this point in the history
Fixed functional test that was not doing the right
thing while running the test.

Signed-off-by: Alexander Wels <awels@redhat.com>
  • Loading branch information
awels committed Aug 4, 2023
1 parent 06dec15 commit 2060ecc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/importer/http-datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func (hs *HTTPDataSource) Info() (ProcessingPhase, error) {
if hs.contentType == cdiv1.DataVolumeArchive {
return ProcessingPhaseTransferDataDir, nil
}
if !hs.readers.Convert && (hs.readers.Archived || hs.customCA != "") {
if !hs.readers.Convert {
return ProcessingPhaseTransferDataFile, nil
}
// removing check for hs.brokenForQemuImg, and always assuming it is true
Expand Down
9 changes: 3 additions & 6 deletions tests/datavolume_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2864,14 +2864,11 @@ var _ = Describe("[vendor:cnv-qe@redhat.com][level:component]DataVolume tests",
Expect(err).ToNot(HaveOccurred())

// here we want to have more than 0, to be sure it started
progressRegExp := regexp.MustCompile(`[1-9]\d{0,2}\.?\d{1,2}%`)
Eventually(func() bool {
Eventually(func() string {
dv, err := f.CdiClient.CdiV1beta1().DataVolumes(f.Namespace.Name).Get(context.TODO(), dataVolume.Name, metav1.GetOptions{})
Expect(err).ToNot(HaveOccurred())
progress := dv.Status.Progress
fmt.Fprintf(GinkgoWriter, "INFO: current progress:%v, matches:%v\n", progress, progressRegExp.MatchString(string(progress)))
return progressRegExp.MatchString(string(progress))
}, timeout, pollingInterval).Should(BeTrue())
return string(dv.Status.Progress)
}, timeout, pollingInterval).Should(Equal("N/A"))

By("Remove source image file & kill http container to force restart")
fileHostPod, err := utils.FindPodByPrefix(f.K8sClient, f.CdiInstallNs, utils.FileHostName, "name="+utils.FileHostName)
Expand Down

0 comments on commit 2060ecc

Please sign in to comment.