Skip to content

Commit 7a13e4f

Browse files
Merge v2.1 into v2.x (#1722)
2 parents 9ba1e89 + 62a321e commit 7a13e4f

29 files changed

+7
-263
lines changed

.evergreen/config/functions.yml

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -172,38 +172,6 @@ functions:
172172
DRIVERS_TOOLS="${DRIVERS_TOOLS}" \
173173
bash ./run-mongohouse-image.sh
174174
175-
"create serverless instance":
176-
- command: subprocess.exec
177-
params:
178-
working_dir: "src"
179-
binary: bash
180-
args:
181-
- ${DRIVERS_TOOLS}/.evergreen/serverless/create-instance.sh
182-
- command: expansions.update
183-
params:
184-
file: src/serverless-expansion.yml
185-
186-
"create serverless proxy instance":
187-
- command: shell.exec
188-
params:
189-
working_dir: "src"
190-
script: |
191-
${PREPARE_SHELL}
192-
193-
VAULT_NAME=serverless_next \
194-
bash ${DRIVERS_TOOLS}/.evergreen/serverless/create-instance.sh
195-
- command: expansions.update
196-
params:
197-
file: src/serverless-expansion.yml
198-
199-
"delete serverless instance":
200-
- command: subprocess.exec
201-
params:
202-
working_dir: "src"
203-
binary: bash
204-
args:
205-
- ${DRIVERS_TOOLS}/.evergreen/serverless/delete-instance.sh
206-
207175
"run tests":
208176
- command: shell.exec
209177
type: test
@@ -252,42 +220,6 @@ functions:
252220
TESTS="atlas-data-lake" \
253221
bash ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
254222
255-
"run serverless tests":
256-
- command: shell.exec
257-
type: test
258-
params:
259-
working_dir: "src"
260-
script: |
261-
${PREPARE_SHELL}
262-
export AWS_ACCESS_KEY_ID="${client_side_encryption_aws_access_key_id}"
263-
export AWS_SECRET_ACCESS_KEY="${client_side_encryption_aws_secret_access_key}"
264-
export AWS_TEMP_ACCESS_KEY_ID="${client_side_encryption_aws_temp_access_key_id}"
265-
export AWS_TEMP_SECRET_ACCESS_KEY="${client_side_encryption_aws_temp_secret_access_key_key}"
266-
export AWS_TEMP_SESSION_TOKEN="${client_side_encryption_aws_temp_session_token}"
267-
export AZURE_TENANT_ID="${client_side_encryption_azure_tenant_id}"
268-
export AZURE_CLIENT_ID="${client_side_encryption_azure_client_id}"
269-
export AZURE_CLIENT_SECRET="${client_side_encryption_azure_client_secret}"
270-
export GCP_EMAIL="${client_side_encryption_gcp_email}"
271-
export GCP_PRIVATE_KEY="${client_side_encryption_gcp_privatekey}"
272-
export KMIP_ENDPOINT="${client_side_encryption_kmip_endpoint}"
273-
export KMS_ENDPOINT_EXPIRED="${client_side_encryption_kms_endpoint_expired}"
274-
export KMS_ENDPOINT_WRONG_HOST="${client_side_encryption_kms_endpoint_wrong_host}"
275-
export KMS_ENDPOINT_REQUIRE_CLIENT_CERT="${client_side_encryption_kms_endpoint_require_client_cert}"
276-
export KMS_TLS_CA_FILE="${client_side_encryption_kms_tls_ca_file}"
277-
export KMS_TLS_CERTIFICATE_KEY_FILE="${client_side_encryption_kms_tls_certificate_key_file}"
278-
export MONGODB_IS_SERVERLESS=on
279-
export PATH="${PHP_PATH}/bin:$PATH"
280-
281-
. ${DRIVERS_TOOLS}/.evergreen/serverless/secrets-export.sh
282-
283-
export MONGODB_USERNAME=$SERVERLESS_ATLAS_USER
284-
export MONGODB_PASSWORD=$SERVERLESS_ATLAS_PASSWORD
285-
286-
CRYPT_SHARED_LIB_PATH=${CRYPT_SHARED_LIB_PATH} \
287-
MONGODB_URI="${SERVERLESS_URI}" \
288-
TESTS="serverless" \
289-
bash ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
290-
291223
"cleanup":
292224
- command: shell.exec
293225
params:

.evergreen/config/generated/test-variant/modern-php-full.yml

Lines changed: 0 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.evergreen/config/generated/test-variant/phpc.yml

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.evergreen/config/templates/test-variant/modern-php-full.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
- ".replicaset .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
1717
- ".sharded .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
1818
- ".loadbalanced .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
19-
- "test_serverless_task_group"
20-
- "test_serverless_proxy_task_group"
2119
- "test-atlas-data-lake"
2220

2321
# Test MongoDB 5.0 and 6.0

.evergreen/config/templates/test-variant/phpc.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
- ".replicaset .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
1616
- ".sharded .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
1717
- ".loadbalanced .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
18-
- "test_serverless_task_group"
19-
- "test_serverless_proxy_task_group"
2018
- "test-atlas-data-lake"
2119

2220
- name: test-debian12-php-%phpVersion%-phpc-next-minor
@@ -35,6 +33,4 @@
3533
- ".replicaset .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
3634
- ".sharded .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
3735
- ".loadbalanced .local !.csfle !.4.2 !.4.4 !.5.0 !.6.0"
38-
- "test_serverless_task_group"
39-
- "test_serverless_proxy_task_group"
4036
- "test-atlas-data-lake"

.evergreen/config/test-task-groups.yml

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -37,41 +37,3 @@ task_groups:
3737
setup_group_timeout_secs: 1800
3838
tasks:
3939
- test-atlas
40-
41-
- name: test_serverless_task_group
42-
setup_group:
43-
- func: "fetch source"
44-
- func: "prepare resources"
45-
- func: "fix absolute paths"
46-
- func: "install dependencies"
47-
- func: "locate PHP binaries"
48-
- func: "fetch extension"
49-
- func: "install composer"
50-
- func: "create serverless instance"
51-
teardown_group:
52-
- func: "delete serverless instance"
53-
- func: "upload test results"
54-
- func: "cleanup"
55-
setup_group_can_fail_task: true
56-
setup_group_timeout_secs: 1800
57-
tasks:
58-
- test-serverless
59-
60-
- name: test_serverless_proxy_task_group
61-
setup_group:
62-
- func: "fetch source"
63-
- func: "prepare resources"
64-
- func: "fix absolute paths"
65-
- func: "install dependencies"
66-
- func: "locate PHP binaries"
67-
- func: "fetch extension"
68-
- func: "install composer"
69-
- func: "create serverless proxy instance"
70-
teardown_group:
71-
- func: "delete serverless instance"
72-
- func: "upload test results"
73-
- func: "cleanup"
74-
setup_group_can_fail_task: true
75-
setup_group_timeout_secs: 1800
76-
tasks:
77-
- test-serverless-proxy

.evergreen/config/test-tasks.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,6 @@ tasks:
77
vars:
88
TESTS: "atlas"
99

10-
- name: "test-serverless"
11-
tags: ["serverless"]
12-
exec_timeout_secs: 10800
13-
patch_only: true
14-
commands:
15-
- func: "start kms servers"
16-
- func: "set aws temp creds"
17-
- func: "run serverless tests"
18-
19-
- name: "test-serverless-proxy"
20-
tags: ["serverless"]
21-
exec_timeout_secs: 10800
22-
patch_only: true
23-
commands:
24-
- func: "start kms servers"
25-
- func: "set aws temp creds"
26-
- func: "run serverless tests"
27-
2810
- name: "test-atlas-data-lake"
2911
commands:
3012
- command: ec2.assume_role

.evergreen/run-tests.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,6 @@ case "$TESTS" in
102102
php vendor/bin/phpunit $PHPUNIT_OPTS --group versioned-api
103103
;;
104104

105-
serverless)
106-
php vendor/bin/phpunit $PHPUNIT_OPTS --group serverless
107-
;;
108-
109105
*)
110106
php vendor/bin/phpunit $PHPUNIT_OPTS
111107
;;

CONTRIBUTING.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ The `phpunit.xml.dist` file is used as the default configuration file for the
3535
test suite. In addition to various PHPUnit options, it defines environment
3636
variables such as `MONGODB_URI` and `MONGODB_DATABASE`. You may customize
3737
this configuration by creating your own `phpunit.xml` file based on the
38-
`phpunit.xml.dist` file we provide. To run the tests in serverless mode, set the
39-
`MONGODB_IS_SERVERLESS` environment variable to `on`.
38+
`phpunit.xml.dist` file we provide.
4039

4140
To run tests against a cluster that requires authentication, either include the
4241
credentials in the connection string (i.e. `MONGODB_URI`) or set the
@@ -66,12 +65,6 @@ The following environment variable is used for [stable API testing](https://gith
6665
which will then be specified as the `serverApi` driver option for clients
6766
created by the test suite.
6867

69-
The following environment variable is used for [serverless testing](https://github.com/mongodb/specifications/blob/master/source/serverless-testing/README.rst):
70-
71-
* `MONGODB_IS_SERVERLESS`: Specify a true boolean string
72-
(see: [`FILTER_VALIDATE_BOOLEAN`](https://www.php.net/manual/en/filter.filters.validate.php))
73-
if `MONGODB_URI` points to a serverless instance. Defaults to false.
74-
7568
The following environment variables are used for [load balancer testing](https://github.com/mongodb/specifications/blob/master/source/load-balancers/tests/README.rst):
7669

7770
* `MONGODB_SINGLE_MONGOS_LB_URI`: Connection string to a load balancer backed

tests/FunctionalTestCase.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
use function count;
2525
use function current;
2626
use function explode;
27-
use function filter_var;
2827
use function getenv;
2928
use function implode;
3029
use function in_array;
@@ -46,7 +45,6 @@
4645
use function version_compare;
4746

4847
use const DIRECTORY_SEPARATOR;
49-
use const FILTER_VALIDATE_BOOLEAN;
5048
use const INFO_MODULES;
5149
use const PATH_SEPARATOR;
5250

@@ -413,16 +411,6 @@ protected function isStandalone()
413411
return $this->getPrimaryServer()->getType() == Server::TYPE_STANDALONE;
414412
}
415413

416-
/**
417-
* Return whether serverless (i.e. proxy as mongos) is being utilized.
418-
*/
419-
protected static function isServerless(): bool
420-
{
421-
$isServerless = getenv('MONGODB_IS_SERVERLESS');
422-
423-
return $isServerless !== false ? filter_var($isServerless, FILTER_VALIDATE_BOOLEAN) : false;
424-
}
425-
426414
protected function isShardedCluster()
427415
{
428416
$type = $this->getPrimaryServer()->getType();

tests/SpecTests/ClientSideEncryption/Prose21_AutomaticDataEncryptionKeysTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
* @see https://github.com/mongodb/specifications/tree/master/source/client-side-encryption/tests#automatic-data-encryption-keys
2222
*/
2323
#[Group('csfle')]
24-
#[Group('serverless')]
2524
class Prose21_AutomaticDataEncryptionKeysTest extends FunctionalTestCase
2625
{
2726
public const SERVER_ERROR_TYPEMISMATCH = 14;

tests/SpecTests/ClientSideEncryption/Prose22_RangeExplicitEncryptionTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
* @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md#22-range-explicit-encryption
3131
*/
3232
#[Group('csfle')]
33-
#[Group('serverless')]
3433
class Prose22_RangeExplicitEncryptionTest extends FunctionalTestCase
3534
{
3635
private ?ClientEncryption $clientEncryption = null;

tests/SpecTests/ClientSideEncryptionSpecTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
* @see https://github.com/mongodb/specifications/tree/master/source/client-side-encryption
5454
*/
5555
#[Group('csfle')]
56-
#[Group('serverless')]
5756
class ClientSideEncryptionSpecTest extends FunctionalTestCase
5857
{
5958
public const LOCAL_MASTERKEY = 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk';

tests/SpecTests/Crud/Prose11_BulkWriteBatchSplitsWhenNamespaceExceedsMessageSizeTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ public function setUp(): void
2727
{
2828
parent::setUp();
2929

30-
if ($this->isServerless()) {
31-
$this->markTestSkipped('bulkWrite command is not supported');
32-
}
33-
3430
$this->skipIfServerVersion('<', '8.0', 'bulkWrite command is not supported');
3531

3632
$this->client = self::createTestClient();

tests/SpecTests/Crud/Prose12_BulkWriteExceedsMaxMessageSizeBytesTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ public function setUp(): void
1919
{
2020
parent::setUp();
2121

22-
if ($this->isServerless()) {
23-
$this->markTestSkipped('bulkWrite command is not supported');
24-
}
25-
2622
$this->skipIfServerVersion('<', '8.0', 'bulkWrite command is not supported');
2723
}
2824

tests/SpecTests/Crud/Prose13_BulkWriteUnsupportedForAutoEncryptionTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ class Prose13_BulkWriteUnsupportedForAutoEncryptionTest extends FunctionalTestCa
1515
{
1616
public function testErrorIfAutoEncryptionIsConfigured(): void
1717
{
18-
if ($this->isServerless()) {
19-
$this->markTestSkipped('bulkWrite command is not supported');
20-
}
21-
2218
$this->skipIfServerVersion('<', '8.0', 'bulkWrite command is not supported');
2319

2420
$this->skipIfClientSideEncryptionIsNotSupported();

tests/SpecTests/Crud/Prose15_BulkWriteUnacknowledgedWriteConcernTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ class Prose15_BulkWriteUnacknowledgedWriteConcernTest extends FunctionalTestCase
2121
{
2222
public function testUnacknowledgedWriteConcern(): void
2323
{
24-
if ($this->isServerless()) {
25-
$this->markTestSkipped('bulkWrite command is not supported');
26-
}
27-
2824
$this->skipIfServerVersion('<', '8.0', 'bulkWrite command is not supported');
2925

3026
$client = self::createTestClient();

tests/SpecTests/Crud/Prose3_BulkWriteSplitsOnMaxWriteBatchSizeTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ class Prose3_BulkWriteSplitsOnMaxWriteBatchSizeTest extends FunctionalTestCase
1818
{
1919
public function testSplitOnMaxWriteBatchSize(): void
2020
{
21-
if ($this->isServerless()) {
22-
$this->markTestSkipped('bulkWrite command is not supported');
23-
}
24-
2521
$this->skipIfServerVersion('<', '8.0', 'bulkWrite command is not supported');
2622

2723
$client = self::createTestClient();

tests/SpecTests/Crud/Prose4_BulkWriteSplitsOnMaxMessageSizeBytesTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ class Prose4_BulkWriteSplitsOnMaxMessageSizeBytesTest extends FunctionalTestCase
2020
{
2121
public function testSplitOnMaxWriteBatchSize(): void
2222
{
23-
if ($this->isServerless()) {
24-
$this->markTestSkipped('bulkWrite command is not supported');
25-
}
26-
2723
$this->skipIfServerVersion('<', '8.0', 'bulkWrite command is not supported');
2824

2925
$client = self::createTestClient();

tests/SpecTests/Crud/Prose5_BulkWriteCollectsWriteConcernErrorsAcrossBatchesTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ class Prose5_BulkWriteCollectsWriteConcernErrorsAcrossBatchesTest extends Functi
1919
{
2020
public function testCollectWriteConcernErrors(): void
2121
{
22-
if ($this->isServerless()) {
23-
$this->markTestSkipped('bulkWrite command is not supported');
24-
}
25-
2622
$this->skipIfServerVersion('<', '8.0', 'bulkWrite command is not supported');
2723

2824
$client = self::createTestClient(null, ['retryWrites' => false]);

0 commit comments

Comments
 (0)