-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Test users db security rules on clustered interface #288
Closed
mikewallace1979
wants to merge
3
commits into
master
from
2452-users-db-security-on-clustered-interface
Closed
Test users db security rules on clustered interface #288
mikewallace1979
wants to merge
3
commits into
master
from
2452-users-db-security-on-clustered-interface
Conversation
This file contains 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 commit makes dev/run replace the nodes DB with an empty DB before adding the nodes doc. This changes the previous behaviour which was to just try adding the docs and ignore conflicts. The change makes it possible for a developer to run `dev/run -n 1` (to spawn a single node cluster) having previously run `dev/run` (which spawns a three node cluster). Without replacing the nodes DB the `dev/run -n 1` single-node cluster would still have two other nodes in the nodes DB and therefore not work correctly. Note that we explicitly delete each node doc rather than deleting the whole database because the cluster membership layer gets upset when the nodes database itself is deleted/recreated.
This commit modifies the _users DB security test so that it tests the authentication DB against the clustered interface in addition to the admin interface. Previously this test was only being run against the admin port. COUCHDB-2452
The users_db_security.js test will not work against a multi-node cluster because it relies on config settings being made by the test code. Because there is no generic way of discovering the locations of the other nodes on a dev cluster (they may be on unexpected ports for one reason or another) it is only possible to guarantee those settings are made on a single node. This commit therefore forces the users_db_security.js test to run against a single node cluster by: - setting the cluster variables to N=Q=R=W=1 - excluding the test in the Makefile and running it explicitly with `dev/run -n 1` - teaching run_on_modified_server to correctly preserve the old config settings when nested run_on_modified_server calls are made COUCHDB-2452
LGTM |
Hey UPD: sorry, wrong autocompletion. @mikewallace1979 ^^^ (: |
Oof this was a truly unpleasant piece of work :) I'll give it a shot and see what fun issues I run into. |
@mikewallace1979 yea, sorry for that /: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Explicitly test authentication_db security rules when authentication_db is on the clustered interface (5984).
COUCHDB-2452