This document describes the tests for basic CRUD and information retrieval operations in Couchbase Lite Edge Server.
Test retrieving basic server information from Edge Server.
- Get a reference to the first Edge Server instance.
- Retrieve the server version information.
- Log the raw version string.
Test retrieving database configuration and information from Edge Server.
- Get a reference to the first Edge Server instance.
- Fetch all databases from the Edge Server.
- Select the first database from the list.
- Fetch detailed database information for the selected database.
- Verify that database information is returned.
Test basic CRUD operations for a single document.
- Get a reference to the first Edge Server instance.
- Create a document with an auto-generated ID in database
db. - Fetch the created document and verify the body and revision.
- Create a document with a fixed ID.
- Update the document with a new body and verify the updated fields.
- Delete the document and verify retrieval fails.
Test CRUD operations on sub-documents.
- Get a reference to the first Edge Server instance.
- Create a document with an auto-generated ID in database
db. - Insert a sub-document at key
test_keywith a sample value. - Fetch the sub-document and verify the stored value.
- Delete the sub-document and verify retrieval fails.
Test CRUD operations with document expiry (TTL).
- Get a reference to the first Edge Server instance.
- Create a document with TTL=20 seconds and verify retrieval fails after expiry.
- Create a document with TTL=50 seconds, update it with TTL=20 seconds, and verify retrieval fails after expiry.
- Create a document with TTL=60 seconds and delete it, then verify retrieval fails.
Test bulk CRUD operations combining document creations, updates, and deletions in a single request.
- Configure Edge Server with the
namesdatabase. - Fetch existing documents to prepare a list of bulk changes.
- Prepare a bulk operation containing 10 document creations, 10 document updates, and 10 document deletions.
- Execute the bulk document operations on the Edge Server.
- Fetch the specifically created documents by key and verify all 10 exist.
- Fetch the updated documents by key and verify they exist with updated revisions.
- Fetch the deleted documents by key and verify they are no longer returned.