Skip to content

Commit 383ec77

Browse files
jmikolaalcaeus
andauthored
PHPLIB-1482: Skip range V1 tests on ext-mongodb 1.20+ (#1351)
* 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. * Skip test failing due to libmongocrypt issue --------- Co-authored-by: Andreas Braun <[email protected]>
1 parent 0d9c466 commit 383ec77

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

tests/SpecTests/ClientSideEncryption/Prose22_RangeExplicitEncryptionTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
use function file_get_contents;
2121
use function get_debug_type;
2222
use function is_int;
23+
use function phpversion;
24+
use function version_compare;
2325

2426
/**
2527
* Prose test 22: Range Explicit Encryption
@@ -39,6 +41,10 @@ public function setUp(): void
3941
{
4042
parent::setUp();
4143

44+
if (version_compare(phpversion('mongodb'), '1.20.0dev', '>=')) {
45+
$this->markTestIncomplete('Range protocol V1 is not supported by ext-mongodb 1.20+');
46+
}
47+
4248
if ($this->isStandalone()) {
4349
$this->markTestSkipped('Range explicit encryption tests require replica sets');
4450
}

tests/SpecTests/ClientSideEncryptionSpecTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,12 @@
3838
use function in_array;
3939
use function iterator_to_array;
4040
use function json_decode;
41+
use function phpversion;
4142
use function sprintf;
4243
use function str_repeat;
44+
use function str_starts_with;
4345
use function substr;
46+
use function version_compare;
4447

4548
use const JSON_THROW_ON_ERROR;
4649

@@ -112,6 +115,7 @@ class ClientSideEncryptionSpecTest extends FunctionalTestCase
112115
'timeoutMS: timeoutMS applied to listCollections to get collection schema' => 'Not yet implemented (PHPC-1760)',
113116
'timeoutMS: remaining timeoutMS applied to find to get keyvault data' => 'Not yet implemented (PHPC-1760)',
114117
'namedKMS: Automatically encrypt and decrypt with a named KMS provider' => 'Not yet implemented (PHPLIB-1328)',
118+
'fle2v2-Compact: Compact works' => 'Failing due to bug in libmongocrypt (LIBMONGOCRYPT-699)',
115119
];
116120

117121
public function setUp(): void
@@ -163,6 +167,10 @@ public function testClientSideEncryption(stdClass $test, ?array $runOn, array $d
163167
$this->markTestIncomplete(self::$incompleteTests[$this->dataDescription()]);
164168
}
165169

170+
if (str_starts_with($this->dataDescription(), 'fle2v2-Range-') && version_compare(phpversion('mongodb'), '1.20.0dev', '>=')) {
171+
$this->markTestIncomplete('Range protocol V1 is not supported by ext-mongodb 1.20+');
172+
}
173+
166174
if (isset($runOn)) {
167175
$this->checkServerRequirements($runOn);
168176
}

0 commit comments

Comments
 (0)