Skip to content

PHPLIB-1482: Skip range V1 tests on ext-mongodb 1.20+ #1351

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

Merged
merged 2 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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');
}
Expand Down
8 changes: 8 additions & 0 deletions tests/SpecTests/ClientSideEncryptionSpecTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -112,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
Expand Down Expand Up @@ -163,6 +167,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);
}
Expand Down