Skip to content

Commit

Permalink
tests: fix tests for NewVSHandler (#4)
Browse files Browse the repository at this point in the history
Signed-off-by: Sheetal Pamecha <[email protected]>
  • Loading branch information
Sheetalpamecha authored Jun 23, 2024
1 parent 7e748a8 commit 15dc497
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions controllers/volsync/vshandler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ var _ = Describe("VolSync Handler - Volume Replication Class tests", func() {
var vsHandler *volsync.VSHandler

BeforeEach(func() {
vsHandler = volsync.NewVSHandler(ctx, k8sClient, logger, nil, asyncSpec, "none", "Snapshot", false)
vsHandler = volsync.NewVSHandler(ctx, k8sClient, logger, nil, asyncSpec, "none", "Snapshot", true)
})

It("GetVolumeSnapshotClasses() should find all volume snapshot classes", func() {
Expand Down Expand Up @@ -116,7 +116,7 @@ var _ = Describe("VolSync Handler - Volume Replication Class tests", func() {
},
}

vsHandler = volsync.NewVSHandler(ctx, k8sClient, logger, nil, asyncSpec, "none", "Snapshot", false)
vsHandler = volsync.NewVSHandler(ctx, k8sClient, logger, nil, asyncSpec, "none", "Snapshot", true)
})

It("GetVolumeSnapshotClasses() should find matching volume snapshot classes", func() {
Expand Down Expand Up @@ -159,7 +159,7 @@ var _ = Describe("VolSync Handler - Volume Replication Class tests", func() {
},
}

vsHandler = volsync.NewVSHandler(ctx, k8sClient, logger, nil, asyncSpec, "none", "Snapshot", false)
vsHandler = volsync.NewVSHandler(ctx, k8sClient, logger, nil, asyncSpec, "none", "Snapshot", true)
})

It("GetVolumeSnapshotClasses() should find matching volume snapshot classes", func() {
Expand Down Expand Up @@ -216,7 +216,7 @@ var _ = Describe("VolSync Handler - Volume Replication Class tests", func() {

// Initialize a vshandler
vsHandler = volsync.NewVSHandler(ctx, k8sClient, logger, nil, asyncSpec,
"openshift-storage.cephfs.csi.ceph.com", "Snapshot", false)
"openshift-storage.cephfs.csi.ceph.com", "Snapshot", true)
})

JustBeforeEach(func() {
Expand Down Expand Up @@ -431,7 +431,7 @@ var _ = Describe("VolSync_Handler", func() {
Expect(ownerCm.GetName()).NotTo(BeEmpty())
owner = ownerCm

vsHandler = volsync.NewVSHandler(ctx, k8sClient, logger, owner, asyncSpec, "none", "Snapshot", false)
vsHandler = volsync.NewVSHandler(ctx, k8sClient, logger, owner, asyncSpec, "none", "Snapshot", true)
})

AfterEach(func() {
Expand Down Expand Up @@ -656,7 +656,7 @@ var _ = Describe("VolSync_Handler", func() {

BeforeEach(func() {
rdSpec.ProtectedPVC.Namespace = testNamespace.GetName()
vsHandler = volsync.NewVSHandler(ctx, k8sClient, logger, owner, asyncSpec, "none", "Direct", false)
vsHandler = volsync.NewVSHandler(ctx, k8sClient, logger, owner, asyncSpec, "none", "Direct", true)
})

It("PrecreateDestPVCIfEnabled() should return CopyMethod Snapshot and App PVC name", func() {
Expand Down Expand Up @@ -1468,7 +1468,7 @@ var _ = Describe("VolSync_Handler", func() {
Expect(k8sClient.Create(ctx, otherOwnerCm)).To(Succeed())
Expect(otherOwnerCm.GetName()).NotTo(BeEmpty())
otherVSHandler := volsync.NewVSHandler(ctx, k8sClient, logger, otherOwnerCm, asyncSpec,
"none", "Snapshot", false)
"none", "Snapshot", true)

for i := 0; i < 2; i++ {
otherOwnerRdSpec := ramendrv1alpha1.VolSyncReplicationDestinationSpec{
Expand Down Expand Up @@ -1660,7 +1660,7 @@ var _ = Describe("VolSync_Handler", func() {
Expect(k8sClient.Create(ctx, otherOwnerCm)).To(Succeed())
Expect(otherOwnerCm.GetName()).NotTo(BeEmpty())
otherVSHandler := volsync.NewVSHandler(ctx, k8sClient, logger, otherOwnerCm, asyncSpec,
"none", "Snapshot", false)
"none", "Snapshot", true)

for i := 0; i < 2; i++ {
otherOwnerRsSpec := ramendrv1alpha1.VolSyncReplicationSourceSpec{
Expand Down

0 comments on commit 15dc497

Please sign in to comment.