-
Notifications
You must be signed in to change notification settings - Fork 1.1k
PYTHON-5046 Support $lookup in CSFLE and QE #2210
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
Changes from 1 commit
9306a9e
c69c3bd
1fb56b0
ff300a9
ea56a2e
3ea9a25
d967ffa
c9a4bd0
590e455
6e33d29
74fac79
daa420d
2c46edb
8770445
8c45daa
53da94d
c85a856
09a82da
74b338b
7dcf8bd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2472,6 +2472,9 @@ async def asyncSetUp(self): | |
await encrypted_client.db.no_schema.insert_one({"no_schema": "no_schema"}) | ||
await encrypted_client.db.no_schema2.insert_one({"no_schema2": "no_schema2"}) | ||
|
||
await encrypted_client.close() | ||
await unencrypted_client.close() | ||
|
||
@async_client_context.require_version_min(8, 1, -1) | ||
async def test_1_csfle_joins_no_schema(self): | ||
encrypted_client = await self.async_rs_or_single_client( | ||
|
@@ -2499,6 +2502,7 @@ async def test_1_csfle_joins_no_schema(self): | |
) | ||
) | ||
self.assertEqual(doc, {"csfle": "csfle", "matched": [{"no_schema": "no_schema"}]}) | ||
await encrypted_client.close() | ||
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. Closing the clients in the tests isn't needed since they're closed at tear down anyway. The reason I asked to close the clients in asyncSetUp is because otherwise they remain open for the entire test and compete with other tasks that need to be scheduled. 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. ahh okay, i see. fixed |
||
|
||
@async_client_context.require_version_min(8, 1, -1) | ||
async def test_2_qe_joins_no_schema(self): | ||
|
@@ -2527,6 +2531,7 @@ async def test_2_qe_joins_no_schema(self): | |
) | ||
) | ||
self.assertEqual(doc, {"qe": "qe", "matched": [{"no_schema": "no_schema"}]}) | ||
await encrypted_client.close() | ||
|
||
@async_client_context.require_version_min(8, 1, -1) | ||
async def test_3_no_schema_joins_csfle(self): | ||
|
@@ -2552,6 +2557,7 @@ async def test_3_no_schema_joins_csfle(self): | |
) | ||
) | ||
self.assertEqual(doc, {"no_schema": "no_schema", "matched": [{"csfle": "csfle"}]}) | ||
await encrypted_client.close() | ||
|
||
@async_client_context.require_version_min(8, 1, -1) | ||
async def test_4_no_schema_joins_qe(self): | ||
|
@@ -2580,6 +2586,7 @@ async def test_4_no_schema_joins_qe(self): | |
) | ||
) | ||
self.assertEqual(doc, {"no_schema": "no_schema", "matched": [{"qe": "qe"}]}) | ||
await encrypted_client.close() | ||
|
||
@async_client_context.require_version_min(8, 1, -1) | ||
async def test_5_csfle_joins_csfle2(self): | ||
|
@@ -2608,6 +2615,7 @@ async def test_5_csfle_joins_csfle2(self): | |
) | ||
) | ||
self.assertEqual(doc, {"csfle": "csfle", "matched": [{"csfle2": "csfle2"}]}) | ||
await encrypted_client.close() | ||
|
||
@async_client_context.require_version_min(8, 1, -1) | ||
async def test_6_qe_joins_qe2(self): | ||
|
@@ -2636,6 +2644,7 @@ async def test_6_qe_joins_qe2(self): | |
) | ||
) | ||
self.assertEqual(doc, {"qe": "qe", "matched": [{"qe2": "qe2"}]}) | ||
await encrypted_client.close() | ||
|
||
@async_client_context.require_version_min(8, 1, -1) | ||
async def test_7_no_schema_joins_no_schema2(self): | ||
|
@@ -2664,6 +2673,7 @@ async def test_7_no_schema_joins_no_schema2(self): | |
) | ||
) | ||
self.assertEqual(doc, {"no_schema": "no_schema", "matched": [{"no_schema2": "no_schema2"}]}) | ||
await encrypted_client.close() | ||
|
||
@async_client_context.require_version_min(8, 1, -1) | ||
async def test_8_csfle_joins_qe(self): | ||
|
@@ -2690,6 +2700,7 @@ async def test_8_csfle_joins_qe(self): | |
) | ||
) | ||
self.assertTrue("not supported" in str(exc)) | ||
await encrypted_client.close() | ||
|
||
@async_client_context.require_version_max(8, 1, -1) | ||
async def test_9_error(self): | ||
|
@@ -2719,6 +2730,7 @@ async def test_9_error(self): | |
) | ||
) | ||
self.assertTrue("Upgrade" in str(exc)) | ||
await encrypted_client.close() | ||
|
||
|
||
# https://github.com/mongodb/specifications/blob/072601/source/client-side-encryption/tests/README.md#rewrap | ||
|
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.
Could you add: