-
Notifications
You must be signed in to change notification settings - Fork 1
Added 2 new tests related to the SGW database - CBS bucket connectivity #309
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
1f40264
added 2 more tests, second test is a combination of two tests
vipbhardwaj c1d2baf
Added 2 new tests related to the SGW database - CBS bucket connectivity
vipbhardwaj f3d4cd0
Merged the second and third tests into a single test.
vipbhardwaj 1da4d83
Merged the other PR's commit into this plus addressed the comments on…
vipbhardwaj 6343f15
removed the field 'online'
vipbhardwaj 4e72933
added the 10s wait + removed the test based helper functions from /ap…
vipbhardwaj 68f6df2
Removed the ssh related funcs from this PR
vipbhardwaj 634a30c
Removed the tests depending on ssh from this PR too
vipbhardwaj ed0d324
Removed unused funcs coming from #306
vipbhardwaj 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Database Online/Offline Tests | ||
|
|
||
| ## test_db_offline_on_bucket_deletion | ||
|
|
||
| Test that database goes offline when its bucket is deleted. | ||
|
|
||
| This test verifies that when the Couchbase Server bucket backing a Sync Gateway database is deleted, the database properly enters offline state and all REST API endpoints return 503 (Service Unavailable). | ||
vipbhardwaj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| 1. Create bucket and default collection | ||
| 2. Configure Sync Gateway database endpoint | ||
| 3. Create user 'vipul' with access to ['ABC'] | ||
| 4. Create 10 docs via Sync Gateway | ||
| 5. Verify database is online - REST endpoints work | ||
| 6. Delete bucket to sever connection | ||
| 7. Verify database is offline - REST endpoints return 403 | ||
vipbhardwaj marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ## test_multiple_dbs_bucket_deletion | ||
vipbhardwaj marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| Test that deleting specific buckets causes only those databases to go offline. | ||
|
|
||
| This test creates 4 databases with unique buckets, deletes 2 buckets, and verifies that only those 2 databases go offline while the other 2 remain online. | ||
|
|
||
| 1. Create buckets and configure databases | ||
| 2. Create 10 docs via Sync Gateway | ||
| 3. Verify all databases are online | ||
| 4. Delete buckets for db1 and db3 | ||
| 5. Verify db2 and db4 remain online | ||
| 6. Verify db1 and db3 are offline (return 403) | ||
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.
Uh oh!
There was an error while loading. Please reload this page.