Skip to content

Commit

Permalink
Add polarion rfes and ids to webhook rendering
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Alon Goldblatt <[email protected]>
  • Loading branch information
kgoldbla committed Mar 19, 2024
1 parent cd7ee9e commit 09c8dee
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 33 deletions.
32 changes: 16 additions & 16 deletions tests/clone-populator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ var _ = Describe("Clone Populator tests", func() {
targetHash := getHash(target, 0)
Expect(targetHash).To(Equal(sourceHash))
},
Entry("with immediateBinding annotation", false),
Entry("with incomplete target PVC webhook rendering", Serial, true),
Entry("[test_id:10973]with immediateBinding annotation", false),
Entry("[rfe_id:10985][crit:high][test_id:10974]with incomplete target PVC webhook rendering", Serial, true),
)

It("should do filesystem to filesystem clone, source created after target", func() {
Expand Down Expand Up @@ -301,8 +301,8 @@ var _ = Describe("Clone Populator tests", func() {
Expect(targetHash).To(Equal(sourceHash))
f.ExpectCloneFallback(target, clone.IncompatibleVolumeModes, clone.MessageIncompatibleVolumeModes)
},
Entry("with valid target PVC", false),
Entry("with incomplete target PVC webhook rendering", Serial, true),
Entry("[test_id:10975]with valid target PVC", false),
Entry("[rfe_id:10985][crit:high][test_id:10976]with incomplete target PVC webhook rendering", Serial, true),
)

DescribeTable("should do filesystem to block clone", func(webhookRendering bool) {
Expand All @@ -324,8 +324,8 @@ var _ = Describe("Clone Populator tests", func() {
Expect(targetHash).To(Equal(sourceHash))
f.ExpectCloneFallback(target, clone.IncompatibleVolumeModes, clone.MessageIncompatibleVolumeModes)
},
Entry("with valid target PVC", false),
Entry("with incomplete target PVC webhook rendering", Serial, true),
Entry("[test_id:11044]with valid target PVC", false),
Entry("[rfe_id:10985][crit:high][test_id:11013]with incomplete target PVC webhook rendering", Serial, true),
)

DescribeTable("should clone explicit types requested by user", func(cloneType string, webhookRendering bool, canDo func() bool) {
Expand All @@ -345,12 +345,12 @@ var _ = Describe("Clone Populator tests", func() {
targetHash := getHash(target, 0)
Expect(targetHash).To(Equal(sourceHash))
},
Entry("should do csi clone if possible", "csi-clone", false, f.IsCSIVolumeCloneStorageClassAvailable),
Entry("should do csi clone if possible, with pvc webhook rendering", Serial, "csi-clone", true, f.IsCSIVolumeCloneStorageClassAvailable),
Entry("should do snapshot clone if possible", "snapshot", false, f.IsSnapshotStorageClassAvailable),
Entry("should do snapshot clone if possible, with pvc webhook rendering", Serial, "snapshot", true, f.IsSnapshotStorageClassAvailable),
Entry("should do host assisted clone", "copy", false, nil),
Entry("should do host assisted clone, with pvc webhook rendering", Serial, "copy", true, nil),
Entry("[test_id:10977]should do csi clone if possible", "csi-clone", false, f.IsCSIVolumeCloneStorageClassAvailable),
Entry("[rfe_id:10985][crit:high][test_id:10992]should do csi clone if possible, with pvc webhook rendering", Serial, "csi-clone", true, f.IsCSIVolumeCloneStorageClassAvailable),
Entry("[test_id:10993]should do snapshot clone if possible", "snapshot", false, f.IsSnapshotStorageClassAvailable),
Entry("[rfe_id:10985][crit:high][test_id:10994]should do snapshot clone if possible, with pvc webhook rendering", Serial, "snapshot", true, f.IsSnapshotStorageClassAvailable),
Entry("[test_id:10995]should do host assisted clone", "copy", false, nil),
Entry("[rfe_id:10985][crit:high][test_id:10996]should do host assisted clone, with pvc webhook rendering", Serial, "copy", true, nil),
)
})

Expand Down Expand Up @@ -391,8 +391,8 @@ var _ = Describe("Clone Populator tests", func() {
Expect(err).ToNot(HaveOccurred())
Expect(same).To(BeTrue())
},
Entry("with valid target PVC", false),
Entry("with incomplete target PVC webhook rendering", Serial, true),
Entry("[test_id:10997]with valid target PVC", false),
Entry("[rfe_id:10985][crit:high][test_id:10998]with incomplete target PVC webhook rendering", Serial, true),
)

Context("Fallback to host assisted", func() {
Expand Down Expand Up @@ -430,8 +430,8 @@ var _ = Describe("Clone Populator tests", func() {
Expect(k8serrors.IsNotFound(err)).To(BeTrue())
f.ExpectCloneFallback(target, clone.NoVolumeExpansion, clone.MessageNoVolumeExpansion)
},
Entry("with valid target PVC", false),
Entry("with incomplete target PVC webhook rendering", Serial, true),
Entry("[test_id:10999]with valid target PVC", false),
Entry("[rfe_id:10985][crit:high][test_id:11000]with incomplete target PVC webhook rendering", Serial, true),
)

It("should finish the clone after creating the source snapshot", func() {
Expand Down
12 changes: 6 additions & 6 deletions tests/datavolume_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2134,7 +2134,7 @@ var _ = Describe("[vendor:[email protected]][level:component]DataVolume tests",
}, timeout, pollingInterval).Should(BeTrue())
},
Entry("[test_id:5912] (controller rendering)", "false", verifyControllerRenderingEvent),
Entry("[test_id:XXXX] (webhook rendering)", Serial, "true", verifyWebhookRenderingEvent),
Entry("[rfe_id:10985][crit:high][test_id:11045] (webhook rendering)", Serial, "true", verifyWebhookRenderingEvent),
)

DescribeTable("Import fails when no default storage class, and recovers when default is set", func(webhookRenderingLabel string, verifyEvent func(string) bool) {
Expand Down Expand Up @@ -2183,7 +2183,7 @@ var _ = Describe("[vendor:[email protected]][level:component]DataVolume tests",
Expect(err).ToNot(HaveOccurred())
},
Entry("[test_id:8383] (controller rendering)", "false", verifyControllerRenderingNoDefaultScEvent),
Entry("[test_id:XXXX] (webhook rendering)", Serial, "true", verifyWebhookRenderingEvent),
Entry("[rfe_id:10985][crit:high][test_id:11046] (webhook rendering)", Serial, "true", verifyWebhookRenderingEvent),
)

DescribeTable("Import recovers when user adds accessModes to profile", func(webhookRenderingLabel string, verifyEvent func(string) bool) {
Expand Down Expand Up @@ -2238,7 +2238,7 @@ var _ = Describe("[vendor:[email protected]][level:component]DataVolume tests",
updateStorageProfileSpec(f.CrClient, storageProfileName, *originalProfileSpec)
},
Entry("[test_id:5913] (controller rendering)", "false", verifyControllerRenderingEvent),
Entry("[test_id:XXXX] (webhook rendering)", Serial, "true", verifyWebhookRenderingEvent),
Entry("[rfe_id:10985][crit:high][test_id:11047] (webhook rendering)", Serial, "true", verifyWebhookRenderingEvent),
)

It("[test_id:6483]Import pod should not have size corrected on block", func() {
Expand Down Expand Up @@ -2656,9 +2656,9 @@ var _ = Describe("[vendor:[email protected]][level:component]DataVolume tests",
Entry("[test_id:9922]the storage class is created (controller rendering)", "false", testScName, verifyControllerRenderingEventAndConditions, createStorageClass),
Entry("[test_id:9924]PV with the SC name is created (controller rendering)", "false", testScName, verifyControllerRenderingEventAndConditions, createPV),
Entry("[test_id:9925]PV with the SC name (\"\" blank) is created (controller rendering)", "false", "", verifyControllerRenderingEventAndConditions, createPV),
Entry("[test_id:XXXX]the storage class is created (webhook rendering)", Serial, "true", testScName, verifyWebhookRenderingEventAndConditions, createStorageClass),
Entry("[test_id:XXXX]PV with the SC name is created (webhook rendering)", Serial, "true", testScName, verifyWebhookRenderingEventAndConditions, createPV),
Entry("[test_id:XXXX]PV with the SC name (\"\" blank) is created (webhook rendering)", Serial, "true", "", verifyWebhookRenderingEventAndConditions, createPV),
Entry("[rfe_id:10985][crit:high][test_id:11049]the storage class is created (webhook rendering)", Serial, "true", testScName, verifyWebhookRenderingEventAndConditions, createStorageClass),
Entry("[rfe_id:10985][crit:high][test_id:11050]PV with the SC name is created (webhook rendering)", Serial, "true", testScName, verifyWebhookRenderingEventAndConditions, createPV),
Entry("[rfe_id:10985][crit:high][test_id:11051]PV with the SC name (\"\" blank) is created (webhook rendering)", Serial, "true", "", verifyWebhookRenderingEventAndConditions, createPV),
)

newDataVolumeWithStorageSpec := func(scName string) *cdiv1.DataVolume {
Expand Down
22 changes: 11 additions & 11 deletions tests/import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1682,17 +1682,17 @@ var _ = Describe("Import populator", func() {
return err != nil && k8serrors.IsNotFound(err)
}, timeout, pollingInterval).Should(BeTrue())
},
Entry("with HTTP image and preallocation", utils.TinyCoreMD5, createHTTPImportPopulatorCR, true, false),
Entry("with HTTP image without preallocation", utils.TinyCoreMD5, createHTTPImportPopulatorCR, false, false),
Entry("with HTTP image and preallocation, with incomplete PVC webhook rendering", Serial, utils.TinyCoreMD5, createHTTPImportPopulatorCR, true, true),
Entry("with Registry image and preallocation", utils.TinyCoreMD5, createRegistryImportPopulatorCR, true, false),
Entry("with Registry image without preallocation", utils.TinyCoreMD5, createRegistryImportPopulatorCR, false, false),
Entry("with ImageIO image with preallocation", Serial, utils.ImageioMD5, createImageIOImportPopulatorCR, true, false),
Entry("with ImageIO image without preallocation", Serial, utils.ImageioMD5, createImageIOImportPopulatorCR, false, false),
Entry("with VDDK image with preallocation", utils.VcenterMD5, createVDDKImportPopulatorCR, true, false),
Entry("with VDDK image without preallocation", utils.VcenterMD5, createVDDKImportPopulatorCR, false, false),
Entry("with Blank image with preallocation", utils.BlankMD5, createBlankImportPopulatorCR, true, false),
Entry("with Blank image without preallocation", utils.BlankMD5, createBlankImportPopulatorCR, false, false),
Entry("[test_id:11001]with HTTP image and preallocation", utils.TinyCoreMD5, createHTTPImportPopulatorCR, true, false),
Entry("[test_id:11002]with HTTP image without preallocation", utils.TinyCoreMD5, createHTTPImportPopulatorCR, false, false),
Entry("[rfe_id:10985][crit:high][test_id:11003]with HTTP image and preallocation, with incomplete PVC webhook rendering", Serial, utils.TinyCoreMD5, createHTTPImportPopulatorCR, true, true),
Entry("[test_id:11004]with Registry image and preallocation", utils.TinyCoreMD5, createRegistryImportPopulatorCR, true, false),
Entry("[test_id:11005]with Registry image without preallocation", utils.TinyCoreMD5, createRegistryImportPopulatorCR, false, false),
Entry("[test_id:11006]with ImageIO image with preallocation", Serial, utils.ImageioMD5, createImageIOImportPopulatorCR, true, false),
Entry("[test_id:11007]with ImageIO image without preallocation", Serial, utils.ImageioMD5, createImageIOImportPopulatorCR, false, false),
Entry("[test_id:11008]with VDDK image with preallocation", utils.VcenterMD5, createVDDKImportPopulatorCR, true, false),
Entry("[test_id:11009]with VDDK image without preallocation", utils.VcenterMD5, createVDDKImportPopulatorCR, false, false),
Entry("[test_id:11010]with Blank image with preallocation", utils.BlankMD5, createBlankImportPopulatorCR, true, false),
Entry("[test_id:11011]with Blank image without preallocation", utils.BlankMD5, createBlankImportPopulatorCR, false, false),
)

DescribeTable("should import Block PVC", func(expectedMD5 string, volumeImportSourceFunc func(cdiv1.DataVolumeContentType, bool) error) {
Expand Down

0 comments on commit 09c8dee

Please sign in to comment.