Skip to content

Add migrated tests and infra to run on uberjenkins#189

Merged
vipbhardwaj merged 26 commits into
mainfrom
cbl_migration
Jun 11, 2025
Merged

Add migrated tests and infra to run on uberjenkins#189
vipbhardwaj merged 26 commits into
mainfrom
cbl_migration

Conversation

@vipbhardwaj

Copy link
Copy Markdown
Contributor

This commit has the first set of migrated tests, as well as the infra needed to run it on uberjenkins, which is in compliance with the directory and file structure being used by dev_e2e.

@vipbhardwaj vipbhardwaj requested review from pasin and torcolvin and removed request for torcolvin May 15, 2025 07:27
@pasin pasin requested a review from borrrden May 15, 2025 15:59

@pasin pasin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good in general. The dev tests also have the test spec for each test. The test spec allows the other to review your test plan (ideally before writing the tests) and to provide a bit info about the purpose of the test. The test spec would also allow the test developers to have a second thought whether the test is really needed or maybe duplicate with the other test. I think it's a good idea for QE to do that as well.

Sample : https://github.com/couchbaselabs/couchbase-lite-tests/tree/main/spec/tests/dev_e2e

@torcolvin torcolvin mentioned this pull request May 19, 2025
@vipbhardwaj

Copy link
Copy Markdown
Contributor Author

I have added the specs @pasin , along with a couple of more migrated tests

@vipbhardwaj

Copy link
Copy Markdown
Contributor Author

I have added a few more tests and the specs related to them.
This commit also contains the new XL blob and the spec for that.
It also contains a new dataset and its config, named short_expiry-sg.json and short_expiry-sg-config.json, and has the spec for that as well

@vipbhardwaj vipbhardwaj requested a review from pasin May 23, 2025 12:38

@borrrden borrrden left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will start with the spec and other things before getting to the actual test implementation. Also please rebase to get a clean GH actions run.

Comment thread client/src/cbltest/api/syncgateway.py Outdated
Comment thread dataset/sg/short_expiry-sg-config.json Outdated
Comment thread environment/aws/topology_setup/test_server_platforms/ios_bridge.py Outdated
Comment thread environment/aws/topology_setup/test_server_platforms/ios_bridge.py Outdated
Comment thread jenkins/pipelines/QE/ios/Jenkinsfile Outdated
Comment thread spec/tests/QE/test_replication_eventing.md Outdated
Comment thread spec/tests/QE/test_replicator_encryption_hook.md Outdated
Comment thread spec/tests/QE/test_replicator_encryption_hook.md Outdated
Comment thread tests/QE/config.example.json Outdated
Comment thread tests/QE/test_replication_eventing.py Outdated

@borrrden borrrden left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made progress, but needs a whole lot more detail in the spec. Saying things like "start a replicator" is unhelpful. What are the characteristics of the replicator? See the other specs for an example.

Comment thread environment/aws/topology_setup/test_server_platforms/ios_bridge.py Outdated
Comment thread spec/tests/QE/test_delta_sync.md Outdated
Comment thread spec/tests/QE/test_delta_sync.md Outdated
Comment thread spec/tests/QE/test_no_conflicts.md Outdated
Comment thread spec/tests/QE/test_no_conflicts.md Outdated
Comment thread spec/tests/QE/test_replicator_encryption_hook.md Outdated
Comment thread tests/QE/config.example.json Outdated
@pasin pasin requested a review from borrrden June 4, 2025 15:18

@borrrden borrrden left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made it through the first two test suites (delta_sync and no_conflicts)

Comment thread client/src/cbltest/api/syncgateway.py Outdated
Comment thread tests/QE/test_delta_sync.py Outdated
Comment thread tests/QE/test_delta_sync.py Outdated
Comment thread tests/QE/test_delta_sync.py
Comment thread spec/tests/QE/test_delta_sync.md Outdated
Comment thread spec/tests/QE/test_delta_sync.md Outdated
Comment thread tests/QE/test_no_conflicts.py
await cblpytest.sync_gateways[0].get_document(
"posts", "large_doc", collection="_default.posts"
)
assert "404" in str(excinfo.value) or "returned 404" in str(excinfo.value)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the behavior I designed in sync gateway's get_document. Is that what actually happens? It should return None instead of raising an exception.

Comment thread tests/QE/test_replication_eventing.py Outdated
@pytest.mark.min_couchbase_servers(1)
class TestReplicatorEncryptionHook(CBLTestClass):
@pytest.mark.asyncio(loop_scope="session")
async def test_replication_complex_doc_encryption(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is very similar to test_encrypted_push in the dev_e2e suite so I think these two tests should be consolidated and one of them removed.

@vipbhardwaj vipbhardwaj requested a review from borrrden June 10, 2025 05:28

@borrrden borrrden left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming that these tests reliably pass I think this is good to go, but I don't like the sgw throwing an exception for a 404. It should just return null and it is probably a bug that it does not. I'll try to address that later.

@vipbhardwaj

Copy link
Copy Markdown
Contributor Author

Yes. I have confirmed the fact that all the tests are running thoroughly, and passing. Thank you for an amazing review, I've learnt alot during the review process.

@vipbhardwaj vipbhardwaj merged commit c8cb095 into main Jun 11, 2025
4 checks passed
@vipbhardwaj vipbhardwaj deleted the cbl_migration branch June 11, 2025 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants