From b12a5f114cbefce8e43f428c7e1e0c42061d08c8 Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Fri, 21 Jun 2024 20:50:42 -0400 Subject: [PATCH 1/2] PHPLIB-1482: Skip range V1 tests on ext-mongodb 1.20+ ext-mongodb 1.20 uses libmongoc 1.28, which enables range V2 from libmongocrypt 1.10+ and drops support for range V1. --- .../Prose22_RangeExplicitEncryptionTest.php | 6 ++++++ tests/SpecTests/ClientSideEncryptionSpecTest.php | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/tests/SpecTests/ClientSideEncryption/Prose22_RangeExplicitEncryptionTest.php b/tests/SpecTests/ClientSideEncryption/Prose22_RangeExplicitEncryptionTest.php index 3a5b7dbc9..5b5aea63d 100644 --- a/tests/SpecTests/ClientSideEncryption/Prose22_RangeExplicitEncryptionTest.php +++ b/tests/SpecTests/ClientSideEncryption/Prose22_RangeExplicitEncryptionTest.php @@ -20,6 +20,8 @@ use function file_get_contents; use function get_debug_type; use function is_int; +use function phpversion; +use function version_compare; /** * Prose test 22: Range Explicit Encryption @@ -39,6 +41,10 @@ public function setUp(): void { parent::setUp(); + if (version_compare(phpversion('mongodb'), '1.20.0dev', '>=')) { + $this->markTestIncomplete('Range protocol V1 is not supported by ext-mongodb 1.20+'); + } + if ($this->isStandalone()) { $this->markTestSkipped('Range explicit encryption tests require replica sets'); } diff --git a/tests/SpecTests/ClientSideEncryptionSpecTest.php b/tests/SpecTests/ClientSideEncryptionSpecTest.php index 44c311d60..e1afd4d7c 100644 --- a/tests/SpecTests/ClientSideEncryptionSpecTest.php +++ b/tests/SpecTests/ClientSideEncryptionSpecTest.php @@ -38,9 +38,12 @@ use function in_array; use function iterator_to_array; use function json_decode; +use function phpversion; use function sprintf; use function str_repeat; +use function str_starts_with; use function substr; +use function version_compare; use const JSON_THROW_ON_ERROR; @@ -163,6 +166,10 @@ public function testClientSideEncryption(stdClass $test, ?array $runOn, array $d $this->markTestIncomplete(self::$incompleteTests[$this->dataDescription()]); } + if (str_starts_with($this->dataDescription(), 'fle2v2-Range-') && version_compare(phpversion('mongodb'), '1.20.0dev', '>=')) { + $this->markTestIncomplete('Range protocol V1 is not supported by ext-mongodb 1.20+'); + } + if (isset($runOn)) { $this->checkServerRequirements($runOn); } From 201b490d28d7c74754a1eba1f04471917b45ae50 Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Wed, 26 Jun 2024 09:46:37 +0200 Subject: [PATCH 2/2] Skip test failing due to libmongocrypt issue --- tests/SpecTests/ClientSideEncryptionSpecTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/SpecTests/ClientSideEncryptionSpecTest.php b/tests/SpecTests/ClientSideEncryptionSpecTest.php index e1afd4d7c..83621635a 100644 --- a/tests/SpecTests/ClientSideEncryptionSpecTest.php +++ b/tests/SpecTests/ClientSideEncryptionSpecTest.php @@ -115,6 +115,7 @@ class ClientSideEncryptionSpecTest extends FunctionalTestCase 'timeoutMS: timeoutMS applied to listCollections to get collection schema' => 'Not yet implemented (PHPC-1760)', 'timeoutMS: remaining timeoutMS applied to find to get keyvault data' => 'Not yet implemented (PHPC-1760)', 'namedKMS: Automatically encrypt and decrypt with a named KMS provider' => 'Not yet implemented (PHPLIB-1328)', + 'fle2v2-Compact: Compact works' => 'Failing due to bug in libmongocrypt (LIBMONGOCRYPT-699)', ]; public function setUp(): void