Skip to content

Commit b704462

Browse files
authored
PHPLIB-1088: Skip Queryable Encryption tests in QEv1 driver for QEv2 server (#1062)
Synced with mongodb/specifications@baf3724 but omits newer range index tests, which don't apply. * Skip QEv1 prose tests on newer server versions * Update PHPC versions in CI matrices Versions were from "stable" to "master" in bf85cb9 and never reverted after PHPC's 1.14.0 release.
1 parent 5cb1631 commit b704462

20 files changed

+197
-163
lines changed

.evergreen/config.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -624,22 +624,16 @@ axes:
624624
- id: driver-versions
625625
display_name: Driver Version
626626
values:
627-
# TODO: Update to "1.14.0" once PHPC 1.14.0 is released
628627
- id: "oldest-supported"
629-
# display_name: "1.14.0"
630-
display_name: "PHPC 1.14-dev (master)"
628+
display_name: "PHPC 1.14.0"
631629
variables:
632-
# EXTENSION_VERSION: "1.14.0"
633-
EXTENSION_BRANCH: "master"
634-
# TODO: Update to "1.14.x"/"stable" once PHPC 1.14.0 is released
630+
EXTENSION_VERSION: "1.14.0"
635631
- id: "latest-stable"
636-
# display_name: "1.14.x"
637-
display_name: "PHPC 1.14-dev (master)"
632+
display_name: "PHPC (stable)"
638633
variables:
639-
# EXTENSION_VERSION: "stable"
640-
EXTENSION_BRANCH: "master"
634+
EXTENSION_VERSION: "stable"
641635
- id: "latest-dev"
642-
display_name: "PHPC 1.14-dev (master)"
636+
display_name: "PHPC (master)"
643637
variables:
644638
EXTENSION_BRANCH: "master"
645639

.github/workflows/tests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,34 +27,34 @@ jobs:
2727
mongodb-version:
2828
- "4.4"
2929
driver-version:
30-
- "mongodb/mongo-php-driver@master"
30+
- "stable"
3131
topology:
3232
- "server"
3333
include:
3434
- os: "ubuntu-20.04"
3535
php-version: "8.0"
3636
mongodb-version: "6.0"
37-
driver-version: "mongodb/mongo-php-driver@master"
37+
driver-version: "stable"
3838
topology: "replica_set"
3939
- os: "ubuntu-20.04"
4040
php-version: "8.0"
4141
mongodb-version: "6.0"
42-
driver-version: "mongodb/mongo-php-driver@master"
42+
driver-version: "stable"
4343
topology: "sharded_cluster"
4444
- os: "ubuntu-20.04"
4545
php-version: "8.0"
4646
mongodb-version: "5.0"
47-
driver-version: "mongodb/mongo-php-driver@master"
47+
driver-version: "stable"
4848
topology: "server"
4949
- os: "ubuntu-20.04"
5050
php-version: "8.0"
5151
mongodb-version: "4.4"
52-
driver-version: "mongodb/mongo-php-driver@master"
52+
driver-version: "stable"
5353
topology: "replica_set"
5454
- os: "ubuntu-20.04"
5555
php-version: "8.0"
5656
mongodb-version: "4.4"
57-
driver-version: "mongodb/mongo-php-driver@master"
57+
driver-version: "stable"
5858
topology: "sharded_cluster"
5959

6060
steps:

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'));

tests/SpecTests/client-side-encryption/tests/fle2-BypassQueryAnalysis.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
{
22
"runOn": [
33
{
4+
"maxServerVersion": "6.2.99",
45
"minServerVersion": "6.0.0",
56
"topology": [
67
"replicaset",
7-
"sharded"
8+
"sharded",
9+
"load-balanced"
810
]
911
}
1012
],

tests/SpecTests/client-side-encryption/tests/fle2-Compact.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
{
22
"runOn": [
33
{
4+
"maxServerVersion": "6.2.99",
45
"minServerVersion": "6.0.0",
56
"topology": [
67
"replicaset",
7-
"sharded"
8+
"sharded",
9+
"load-balanced"
810
]
911
}
1012
],

0 commit comments

Comments
 (0)