8000 todo by raghavendra-talur · Pull Request #2002 · RamenDR/ramen · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

todo #2002

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed

todo #2002

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions internal/controller/vrg_volrep_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,22 @@
}
}
})
It("waits for VRG clusterdataprotected", func() {
for c := 0; c < len(vrgTests); c++ {
v := vrgTests[c]
v.clusterDataProtectedWait(metav1.ConditionTrue)
}
})
It("waits for VRG dataProtected", func() {
for c := 0; c < len(vrgTests); c++ {
v := vrgTests[c]
if c != 0 {
v.dataProtectedWait(metav1.ConditionFalse)
} else {
v.dataProtectedWait(metav1.ConditionTrue)
}
}
})
It("protects kube objects", func() { kubeObjectProtectionValidate(vrgTests) })
It("cleans up after testing", func() {
for c := 0; c < len(vrgTests); c++ {
Expand Down Expand Up @@ -2433,6 +2449,22 @@
return
}

func (v *vrgTest) dataProtectedWait(status metav1.ConditionStatus,
) (vrg *ramendrv1alpha1.VolumeReplicationGroup) {

Check failure on line 2453 in internal/controller/vrg_volrep_test.go

View workflow job for this annotation

GitHub Actions / Golangci Lint (.)

(*vrgTest).dataProtectedWait - result vrg is never used (unparam)
Eventually(func() metav1.ConditionStatus {
vrg = v.getVRG()
dataProtectedCondition := meta.FindStatusCondition(
vrg.Status.Conditions, vrgController.VRGConditionTypeDataProtected)
if dataProtectedCondition == nil {
return metav1.ConditionUnknown
}

return dataProtectedCondition.Status
}, vrgtimeout, vrginterval).Should(Equal(status))

return
}

func (v *vrgTest) vrgDownloadAndValidate(vrgK8s *ramendrv1alpha1.VolumeReplicationGroup) {
vrgs := []ramendrv1alpha1.VolumeReplicationGroup{}
Expect(vrgController.DownloadTypedObjects(*vrgObjectStorer, v.s3KeyPrefix(), &vrgs)).To(Succeed())
Expand Down
Loading
0