-
Notifications
You must be signed in to change notification settings - Fork 1
Migrate remaining chaos/MTLS/CRUD tests for edge server #397
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
barkha06
wants to merge
5
commits into
main
Choose a base branch
from
edge_server_tests
base: main
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 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5ba4f62
Migrate pending edge server tests
barkha06 b1b383e
Added spec files for tests
barkha06 37238c4
Modified certificate property
barkha06 61e9eba
Modifed test steps to be more descriptive and match spec
barkha06 54d7670
Fixed formatting errors
barkha06 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
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
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
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,30 @@ | ||
| { | ||
| "$schema": "https://packages.couchbase.com/couchbase-edge-server/config_schema.json", | ||
| "interface": "0.0.0.0:59840", | ||
| "enable_anonymous_users": true, | ||
| "databases": { | ||
| "names": | ||
| { | ||
| "path": "/home/ec2-user/database/names.cblite2", | ||
| "create": true, | ||
| "enable_adhoc_queries": true, | ||
| "enable_client_writes": true, | ||
| "enable_client_sync": true | ||
| } | ||
| }, | ||
| "https": { | ||
| "tls_cert_path": "/home/ec2-user/cert/es_cert.pem", | ||
| "tls_key_path": "/home/ec2-user/cert/es_key.pem", | ||
| "client_cert_path": "/home/ec2-user/cert/ca_cert.pem" | ||
| }, | ||
| "logging": { | ||
| "console": false, | ||
| "file": { | ||
| "dir": "/home/ec2-user/log", | ||
| "format": "text" | ||
| }, | ||
| "domains": { | ||
| "Listener": "info" | ||
| } | ||
| } | ||
| } |
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 |
|---|---|---|
|
|
@@ -44,11 +44,19 @@ async def test_basic_auth(self, cblpytest: CBLPyTest) -> None: | |
| assert failed, "No auth did not fail as expected" | ||
|
|
||
| @pytest.mark.asyncio(loop_scope="session") | ||
| async def test_valid_tls(self, cblpytest: CBLPyTest, dataset_path: Path) -> None: | ||
| async def test_valid_tls_mtls( | ||
| self, cblpytest: CBLPyTest, dataset_path: Path | ||
| ) -> None: | ||
| self.mark_test_step("test_valid_tls") | ||
| edge_server = await cblpytest.edge_servers[0].configure_dataset( | ||
| db_name="names", config_file=f"{SCRIPT_DIR}/config/test_tls_config.json" | ||
| ) | ||
| self.mark_test_step("get server information") | ||
| self.mark_test_step("get server information with TLS") | ||
| version = await edge_server.get_version() | ||
| self.mark_test_step(f"VERSION:{version}") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like it should be a normal log message, not a test step. |
||
| edge_server = await cblpytest.edge_servers[0].configure_dataset( | ||
| db_name="names", config_file=f"{SCRIPT_DIR}/config/test_mtls_config.json" | ||
| ) | ||
| self.mark_test_step("get server information with TLS") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With mTLS right? |
||
| version = await edge_server.get_version() | ||
| self.mark_test_step(f"VERSION:{version}") | ||
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.
What is the purpose of step 11?
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.
It validates that the newly created documents have been fully propagated and stored across the replication.Also by killing ES3 again after replication reaches idle, we ensure no buffered data is lost. It's an attempt to test replication after source removal.
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.
It seems like the result would be the same without it, would it not?
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.
Yes, do you think it would make more sense if i wait for ES2 (which replicates with ES3) to be idle and kill ES3 and then wait the other edge-servers to be idle
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.
It's not hurting anything I guess, but I don't see the point. I am always wary of creating tests with too many steps.
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.
Okay then I'll remove the kill edge-server step