Skip to content

Commit a1eb812

Browse files
committed
Skip QEv1 prose tests on newer server versions
1 parent 21c6bb1 commit a1eb812

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

tests/DocumentationExamplesTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1867,6 +1867,11 @@ public function testQueryableEncryption(): void
18671867
$this->markTestSkipped('Queryable encryption requires MongoDB 6.0 or later');
18681868
}
18691869

1870+
// Note: this version requirement is consistent with QEv1 spec tests
1871+
if (version_compare($this->getServerVersion(), '6.2.99', '>')) {
1872+
$this->markTestSkipped('MongoDB 7.0 and later requires Queryable Encryption v2 protocol');
1873+
}
1874+
18701875
if (! $this->isEnterprise()) {
18711876
$this->markTestSkipped('Automatic encryption requires MongoDB Enterprise');
18721877
}

tests/SpecTests/ClientSideEncryptionSpecTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,6 +1238,11 @@ public function testExplicitEncryption(Closure $test): void
12381238
$this->markTestSkipped('Explicit encryption tests require MongoDB 6.0 or later');
12391239
}
12401240

1241+
// Note: this version requirement is consistent with QEv1 spec tests
1242+
if (version_compare($this->getServerVersion(), '6.2.99', '>')) {
1243+
$this->markTestSkipped('MongoDB 7.0 and later requires Queryable Encryption v2 protocol');
1244+
}
1245+
12411246
// Test setup
12421247
$encryptedFields = $this->decodeJson(file_get_contents(__DIR__ . '/client-side-encryption/etc/data/encryptedFields.json'));
12431248
$key1Document = $this->decodeJson(file_get_contents(__DIR__ . '/client-side-encryption/etc/data/keys/key1-document.json'));

0 commit comments

Comments
 (0)