Skip to content

e2e: add test suite with controller-runtime client - #15

Merged
Madhu-1 merged 1 commit into
RamenDR:mainfrom
Rakshith-R:add-e2e
Mar 24, 2026
Merged

e2e: add test suite with controller-runtime client#15
Madhu-1 merged 1 commit into
RamenDR:mainfrom
Rakshith-R:add-e2e

Conversation

@Rakshith-R

Copy link
Copy Markdown
Collaborator
  • Replace utils-based CertManager setup with controller-runtime and client-go clients for typed access to VolSync CRDs, VolumeSnapshots, and core resources
  • Split e2e tests into helpers, manual trigger, and schedule trigger files
  • Add parameterized tests across nfs, cephfs, and rbd drivers
  • Add FailFast config and change namespace to rook-ceph
  • Extract debug log collection into debugAfterEach helper
  • Add createRS to codespell ignore list
  • Promote k8s.io/utils to a direct dependency

E2E now covers most of the scenarios:

  • data write + validation
  • 3 drivers
  • copyMethod: direct and copy
  • triger:
    • RepSource: schedule, manual
    • RepDestination: schedule, manual, None

@Rakshith-R

Copy link
Copy Markdown
Collaborator Author

/cc @Madhu-1 @iPraveenParihar

@Rakshith-R
Rakshith-R requested a review from Madhu-1 March 18, 2026 12:03
@Rakshith-R
Rakshith-R force-pushed the add-e2e branch 3 times, most recently from 2d97f86 to b3013ad Compare March 23, 2026 03:08

@Madhu-1 Madhu-1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have a general comment on code readability, let's not split the lines wheever its possible. it becomes hard to read the code.

Comment thread test/e2e/e2e_suite_test.go Outdated
Comment on lines +51 to +55
suiteConfig, reporterConfig :=
GinkgoConfiguration()
suiteConfig.FailFast = true
RunSpecs(t, "e2e suite",
suiteConfig, reporterConfig,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make it single line

Comment thread test/e2e/e2e_suite_test.go Outdated
Comment on lines +62 to +76
Expect(
clientgoscheme.AddToScheme(scheme),
).To(Succeed())
Expect(
volsyncv1alpha1.AddToScheme(scheme),
).To(Succeed())
Expect(
snapv1.AddToScheme(scheme),
).To(Succeed())

cfg := ctrl.GetConfigOrDie()
var err error
k8sClient, err = client.New(
cfg, client.Options{Scheme: scheme},
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make it single line

Comment thread test/e2e/e2e_suite_test.go Outdated
Comment on lines +80 to +82
k8sClientSet, err =
kubernetes.NewForConfig(cfg)
Expect(err).NotTo(HaveOccurred())

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here as well, please take care of it in all the places

Comment thread test/e2e/helpers_test.go Outdated
type driverConfig struct {
name string
provider string
sc string

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets use a full naming convention

Comment thread test/e2e/helpers_test.go Outdated
Comment on lines +85 to +92
name: "rbd",
provider: "rook-ceph." +
"rbd.csi.ceph.com",
sc: "rook-ceph-block",
vsClass: "csi-rbdplugin-snapclass",
volumeMode: ptr.To(
corev1.PersistentVolumeBlock),
accessMode: corev1.ReadWriteOnce,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any specific reason to add rbd?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any specific reason to add rbd?

rbd mover+ worker is done too.

Comment thread test/e2e/helpers_test.go Outdated
Equal(corev1.ClaimBound),
)
}).WithTimeout(
2 * time.Minute,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets have this as configurable value

@Rakshith-R
Rakshith-R force-pushed the add-e2e branch 2 times, most recently from 308cefc to db9a3ef Compare March 23, 2026 06:35
- Replace utils-based CertManager setup with controller-runtime
  and client-go clients for typed access to VolSync CRDs,
  VolumeSnapshots, and core resources
- Split e2e tests into helpers, manual trigger,
  and schedule trigger files
- Add parameterized tests across nfs, cephfs, and rbd drivers
- Add FailFast config and change namespace to rook-ceph
- Extract debug log collection into debugAfterEach helper
- Add createRS to codespell ignore list
- Promote k8s.io/utils to a direct dependency

E2E now covers most of the scenarios:
- data write + validation
- 3 drivers
- copyMethod: direct and copy
- triger:
  - RepSource: schedule, manual
  - RepDestination: schedule, manual, None

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Rakshith R <rar@redhat.com>
@Madhu-1
Madhu-1 merged commit ef06aa1 into RamenDR:main Mar 24, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants