-
Notifications
You must be signed in to change notification settings - Fork 27
Separate MongoDB Multi-Cluster tests and encapsulate shared functionalities for reuse. #602
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
base: master
Are you sure you want to change the base?
Conversation
MCK 1.6.1 Release Notes |
|
|
||
| # this test is run, with an operator with race enabled | ||
| - name: e2e_om_reconcile_race_with_telemetry | ||
| - name: e2e_mongodbmulticluster_om_reconcile_race_with_telemetry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should only modify tests that test MongoDBMultiCluster CRD. This one seems to be only about Ops Manager. I don't think we should touch this test.
Or am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some tests which use MongoDBMulti in a different way. For example, they aren't centered on testing MongoDBMulti but rather as a supporting component. These tests use MongoDBMulti as a resource to test functionalities such as backup and restore workflows, Ops Manager integration, or multi-cluster configurations without focusing on MongoDBMulti itself. I’ve attached such tests below (description using AI) :
multicluster/multi_cluster_reconcile_races.py - This test validates the MongoDB Kubernetes Operator's ability to reconcile resources reliably across multi-cluster environments while detecting data races and ensuring telemetry correctness.
multicluster_om/multicluster_om_appdb_no_mesh.py - This test validates the Multi-Cluster MongoDB Kubernetes Operator when deployed without Service Mesh, focusing on its ability to manage MongoDBMulti resources with TLS security, S3 backups, external app database monitoring, external connectivity, data restoration via restores, and telemetry validation.
multicluster_appdb/multicluster_appdb_s3_based_backup_restore.py - This test validates the MongoDB Kubernetes Operator in a multi-cluster environment with S3-backed backups and restores, ensuring Ops Manager is properly configured with cluster-level TLS, external connectivity, and custom DNS settings while verifying metadata stores, restore functionality, and backup consistency for MongoDBMulti resources.
While leaving them alone and just replacing MongoDBMultiCluster with MongoDB once the feature branch is merged is one possibility, I would consider replicating them as well in order to be on the safe side. As a result, it’s safer to leave these tests untouched (aside from changes such as renaming and library inclusion for multicluster/multi_cluster_reconcile_races.py) while creating new, identical tests for MongoDB. This approach also makes it easier to delete them once the resource is deprecated.
Additionally, multicluster_om/multicluster_om_appdb_no_mesh.py and multicluster_appdb/multicluster_appdb_s3_based_backup_restore.py will not adopt the library-based approach, as these tests are unique within their respective folders (being the only tests utilizing MongoDBMulti) and will simply be replicated as is.
Summary
This PR to the master branch focuses exclusively on the implementation of MongoDBMultiCluster using the shared library approach.
As part of the effort to replicate the end-to-end (E2E) test coverage from MongoDBMulti to MongoDB with a multicluster topology, we transition to a library-based approach.
Additionally, the following tests do not follow the library based approached since using the shared library would result in increased complexity. These tests are unique within their respective folders, unlike the multicluster folder, which contains 40 resource specific tests.
Proof of Work
Shared library:
Test implementation
Naming convention for distinction:
Checklist
skip-changeloglabel if not needed