Add encryption compatibility tests#695
Conversation
Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: Victor [C] Tsang <vitsangp@amazon.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: PatersonProjects <keldonhoff@gmail.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: PatersonProjects <keldonhoff@gmail.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: Daniel Frankcom <frankcom@amazon.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: PatersonProjects <keldonhoff@gmail.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: Daniel Frankcom <frankcom@amazon.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: PatersonProjects <keldonhoff@gmail.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: Daniel Frankcom <frankcom@amazon.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: Daniel Frankcom <frankcom@amazon.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: Victor [C] Tsang <vitsangp@amazon.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: PatersonProjects <keldonhoff@gmail.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: Daniel Frankcom <frankcom@amazon.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: Daniel Frankcom <frankcom@amazon.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: Victor [C] Tsang <vitsangp@amazon.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: Aaron Gong <jingyaog@amazon.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: PatersonProjects <keldonhoff@gmail.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: Daniel Frankcom <frankcom@amazon.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: PatersonProjects <keldonhoff@gmail.com> Co-authored-by: PatersonProjects <keldonhoff@gmail.com> Co-authored-by: Daniel Frankcom <frankcom@amazon.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: Daniel Frankcom <frankcom@amazon.com> Co-authored-by: Daniel Frankcom <frankcom@amazon.com> Co-authored-by: Mitchell Elholm <mitchell-elholm@users.noreply.github.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com> Co-authored-by: Alina (Xi) Li <Alina.Li@improving.com> Co-authored-by: Leszek Kurzyna <lkurzyna@amazon.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com> Co-authored-by: Alina (Xi) Li <Alina.Li@improving.com> Co-authored-by: Leszek Kurzyna <lkurzyna@amazon.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: Daniel Frankcom <frankcom@amazon.com> Co-authored-by: Mitchell Elholm <elholmit@amazon.com> Co-authored-by: Daniel Frankcom <frankcom@amazon.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: Daniel Frankcom <frankcom@amazon.com> Co-authored-by: Daniel Frankcom <frankcom@amazon.com> Co-authored-by: Victor Tsang <vitsangp@amazon.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: Victor [C] Tsang <vitsangp@amazon.com> Co-authored-by: Victor [C] Tsang <vitsangp@amazon.com> Co-authored-by: Mitchell Elholm <mitchell-elholm@users.noreply.github.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
Signed-off-by: Daniel Frankcom <frankcom@amazon.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
b5a6fa3 to
30546fd
Compare
There was a problem hiding this comment.
Pull request overview
This PR expands the compatibility test suite for Queryable Encryption by introducing shared QE-collection fixtures and adding focused tests covering CRUD enforcement, query/aggregation behavior, and edge cases (nested paths, large plaintext values, multi-document inserts). This aligns with Issue #537’s requirement for comprehensive QE compatibility coverage beyond the existing smoke test.
Changes:
- Added reusable fixtures for creating/dropping Queryable Encryption collections with different encrypted-field shapes.
- Added CRUD-focused tests validating that plaintext writes to encrypted paths are rejected while missing fields remain acceptable.
- Added query/aggregation and edge-case tests to ensure raw queries execute normally and that nested/large/multi-doc cases behave consistently.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| documentdb_tests/compatibility/tests/system/security/encryption/utils/qe_collections.py | Adds shared fixtures to create QE collections with single, multi-field, and nested encrypted paths. |
| documentdb_tests/compatibility/tests/system/security/encryption/utils/init.py | Ensures the new utils directory is a Python package for imports/fixture re-exporting. |
| documentdb_tests/compatibility/tests/system/security/encryption/conftest.py | Re-exports QE fixtures so all tests in the directory can use them without per-file imports. |
| documentdb_tests/compatibility/tests/system/security/encryption/test_encryption_crud.py | Adds CRUD validation tests ensuring plaintext writes to encrypted paths fail and delete/missing-field behaviors succeed. |
| documentdb_tests/compatibility/tests/system/security/encryption/test_encryption_query.py | Adds tests ensuring raw find/aggregate expressions referencing encrypted fields execute without encryption-specific errors. |
| documentdb_tests/compatibility/tests/system/security/encryption/test_encryption_edge_cases.py | Adds edge-case tests for nested encrypted paths, large plaintext rejection, multi-doc inserts, and explain compatibility. |
|
🤖 Auto-triaged by documentdb-triage-tool. Applied: Reasoningcomponent from path globs (test-coverage); effort from diff stats (412+0 LOC, 6 files); LLM: Adds expanded compatibility test coverage for the encryption feature (CRUD, null/missing, oversized, nested, incorrect types), closing a tracked issue for insufficient test coverage. If a label is wrong, remove it manually and ping |
What does this PR do?
This PR adds additional compatibility tests for the encryption feature: insert, update, delete, find, null/missing values, plaintext type, incorrect type, oversized, and nested values. Originally, there was only one, basic smoke test which only covered basic functionality. The tests were then verified in a MongoDB environment. A fixture was also created to be used by each of the additional tests.
Why was this PR needed?
This PR Closes #537, which required adding additional test coverage to the encryption feature. Initially, this operator only had one smoke test, which tested basic functionality. This PR addresses the issue of missing a more extensive test suite to ensure the encryption feature properly handles CRUD operations, null/missing values, oversized values, nested, and incorrect types of values.
What are the relevant issue numbers?
Closes #537
Screenshots
Does this PR meet the acceptance criteria?