-
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
Open
filipcirtog
wants to merge
9
commits into
master
Choose a base branch
from
multicluster-shared-testing-library
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
a73e13b
library + mongodbmulticluster implementation
filipcirtog 4fc5603
bug fixes
filipcirtog d66ea7b
bug fixes
filipcirtog c9eed83
rename tests
filipcirtog a95ac8f
rename test
filipcirtog 186f5d0
lint fix
filipcirtog 3c65443
test renaming
filipcirtog a059392
bug fix
filipcirtog a998177
bug fix
filipcirtog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
MongoDBMultiClusterCRD. 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.pyandmulticluster_appdb/multicluster_appdb_s3_based_backup_restore.pywill 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.