Skip to content

Commit

Permalink
add dv-https-import-zst test
Browse files Browse the repository at this point in the history
Signed-off-by: huangzy <huangzynn@outlook.com>
  • Loading branch information
huangzynn committed Mar 7, 2023
1 parent ee0cfc5 commit 6b05833
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/datavolume_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ var _ = Describe("[vendor:cnv-qe@redhat.com][level:component]DataVolume tests",
httpsTinyCoreVhdxURL := func() string {
return fmt.Sprintf(utils.HTTPSTinyCoreVhdxURL, f.CdiInstallNs)
}
httpsTinyCoreZstURL := func() string {
return fmt.Sprintf(utils.HTTPSTinyCoreZstURL, f.CdiInstallNs)
}
tinyCoreQcow2URL := func() string {
return fmt.Sprintf(utils.TinyCoreQcow2URL+".gz", f.CdiInstallNs)
}
Expand Down Expand Up @@ -600,6 +603,30 @@ var _ = Describe("[vendor:cnv-qe@redhat.com][level:component]DataVolume tests",
Message: "Import Complete",
Reason: "Completed",
}}),
table.Entry("[rfe_id:1115][crit:high][test_id:1379]succeed creating import dv with given valid zst url (https)", dataVolumeTestArguments{
name: "dv-https-import-zst",
size: "1Gi",
url: httpsTinyCoreZstURL,
dvFunc: createHTTPSDataVolume,
eventReason: dvc.ImportSucceeded,
phase: cdiv1.Succeeded,
checkPermissions: true,
readyCondition: &cdiv1.DataVolumeCondition{
Type: cdiv1.DataVolumeReady,
Status: v1.ConditionTrue,
},
boundCondition: &cdiv1.DataVolumeCondition{
Type: cdiv1.DataVolumeBound,
Status: v1.ConditionTrue,
Message: "PVC dv-https-import-zst Bound",
Reason: "Bound",
},
runningCondition: &cdiv1.DataVolumeCondition{
Type: cdiv1.DataVolumeRunning,
Status: v1.ConditionFalse,
Message: "Import Complete",
Reason: "Completed",
}}),
table.Entry("succeed creating import dv with custom https cert that has a weird filename", dataVolumeTestArguments{
name: "dv-https-import-qcow2",
size: "1Gi",
Expand Down
2 changes: 2 additions & 0 deletions tests/utils/datavolume.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ const (
HTTPSTinyCoreIsoURL = "https://cdi-file-host.%s/tinyCore.iso"
// HTTPSTinyCoreQcow2URL provides a test (https) url for the tineyCore qcow2 image
HTTPSTinyCoreQcow2URL = "https://cdi-file-host.%s/tinyCore.qcow2"
// HTTPSTinyCoreZstURL provides a test (https) url for the tineyCore zst image
HTTPSTinyCoreZstURL = "https://cdi-file-host.%s/tinyCore.zst"
// TinyCoreQcow2URLRateLimit provides a test url for the tineyCore qcow2 image via rate-limiting proxy
TinyCoreQcow2URLRateLimit = "http://cdi-file-host.%s:82/tinyCore.qcow2"
// TinyCoreQcow2GzURLRateLimit provides a test url for the tineyCore qcow2.gz image via rate-limiting proxy
Expand Down

0 comments on commit 6b05833

Please sign in to comment.