Skip to content

PHPLIB-1088: Skip Queryable Encryption tests in QEv1 driver for QEv2 server #1062

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 3 commits into from
Apr 17, 2023
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
16 changes: 5 additions & 11 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -624,22 +624,16 @@ axes:
- id: driver-versions
display_name: Driver Version
values:
# TODO: Update to "1.14.0" once PHPC 1.14.0 is released
- id: "oldest-supported"
# display_name: "1.14.0"
display_name: "PHPC 1.14-dev (master)"
display_name: "PHPC 1.14.0"
variables:
# EXTENSION_VERSION: "1.14.0"
EXTENSION_BRANCH: "master"
# TODO: Update to "1.14.x"/"stable" once PHPC 1.14.0 is released
EXTENSION_VERSION: "1.14.0"
- id: "latest-stable"
# display_name: "1.14.x"
display_name: "PHPC 1.14-dev (master)"
display_name: "PHPC (stable)"
variables:
# EXTENSION_VERSION: "stable"
EXTENSION_BRANCH: "master"
EXTENSION_VERSION: "stable"
- id: "latest-dev"
display_name: "PHPC 1.14-dev (master)"
display_name: "PHPC (master)"
variables:
EXTENSION_BRANCH: "master"

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,34 +27,34 @@ jobs:
mongodb-version:
- "4.4"
driver-version:
- "mongodb/mongo-php-driver@master"
- "stable"
topology:
- "server"
include:
- os: "ubuntu-20.04"
php-version: "8.0"
mongodb-version: "6.0"
driver-version: "mongodb/mongo-php-driver@master"
driver-version: "stable"
topology: "replica_set"
- os: "ubuntu-20.04"
php-version: "8.0"
mongodb-version: "6.0"
driver-version: "mongodb/mongo-php-driver@master"
driver-version: "stable"
topology: "sharded_cluster"
- os: "ubuntu-20.04"
php-version: "8.0"
mongodb-version: "5.0"
driver-version: "mongodb/mongo-php-driver@master"
driver-version: "stable"
topology: "server"
- os: "ubuntu-20.04"
php-version: "8.0"
mongodb-version: "4.4"
driver-version: "mongodb/mongo-php-driver@master"
driver-version: "stable"
topology: "replica_set"
- os: "ubuntu-20.04"
php-version: "8.0"
mongodb-version: "4.4"
driver-version: "mongodb/mongo-php-driver@master"
driver-version: "stable"
topology: "sharded_cluster"

steps:
Expand Down
5 changes: 5 additions & 0 deletions tests/DocumentationExamplesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1867,6 +1867,11 @@ public function testQueryableEncryption(): void
$this->markTestSkipped('Queryable encryption requires MongoDB 6.0 or later');
}

// Note: this version requirement is consistent with QEv1 spec tests
if (version_compare($this->getServerVersion(), '6.2.99', '>')) {
$this->markTestSkipped('MongoDB 7.0 and later requires Queryable Encryption v2 protocol');
}

if (! $this->isEnterprise()) {
$this->markTestSkipped('Automatic encryption requires MongoDB Enterprise');
}
Expand Down
5 changes: 5 additions & 0 deletions tests/SpecTests/ClientSideEncryptionSpecTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,11 @@ public function testExplicitEncryption(Closure $test): void
$this->markTestSkipped('Explicit encryption tests require MongoDB 6.0 or later');
}

// Note: this version requirement is consistent with QEv1 spec tests
if (version_compare($this->getServerVersion(), '6.2.99', '>')) {
$this->markTestSkipped('MongoDB 7.0 and later requires Queryable Encryption v2 protocol');
}

// Test setup
$encryptedFields = $this->decodeJson(file_get_contents(__DIR__ . '/client-side-encryption/etc/data/encryptedFields.json'));
$key1Document = $this->decodeJson(file_get_contents(__DIR__ . '/client-side-encryption/etc/data/keys/key1-document.json'));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"runOn": [
{
"maxServerVersion": "6.2.99",
"minServerVersion": "6.0.0",
"topology": [
"replicaset",
"sharded"
"sharded",
"load-balanced"
]
}
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"runOn": [
{
"maxServerVersion": "6.2.99",
"minServerVersion": "6.0.0",
"topology": [
"replicaset",
"sharded"
"sharded",
"load-balanced"
]
}
],
Expand Down
Loading