Skip to content

Commit e2a31a9

Browse files
committed
Move CSFLE tests to new format
1 parent 76bb0df commit e2a31a9

13 files changed

+353
-82
lines changed

.evergreen/config.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,10 @@ include:
6868
- filename: .evergreen/config/test/require-api-version-7.0.yml
6969
- filename: .evergreen/config/test/require-api-version-6.0.yml
7070
- filename: .evergreen/config/test/require-api-version-5.0.yml
71+
- filename: .evergreen/config/test/csfle-latest.yml
72+
- filename: .evergreen/config/test/csfle-rapid.yml
73+
- filename: .evergreen/config/test/csfle-7.0.yml
74+
- filename: .evergreen/config/test/csfle-6.0.yml
75+
- filename: .evergreen/config/test/csfle-5.0.yml
76+
- filename: .evergreen/config/test/csfle-4.4.yml
77+
- filename: .evergreen/config/test/csfle-4.2.yml

.evergreen/config/generate-config.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,15 @@
1919
// Load balanced supports MongoDB 5.0+
2020
fn (string $version): bool => in_array($version, ['latest', 'rapid']) || version_compare($version, '5.0', '>='),
2121
);
22-
$ocspServerVersions = array_filter(
23-
$supportedMongoDBVersions,
24-
// OCSP supports MongoDB 4.4+
25-
fn (string $version): bool => in_array($version, ['latest', 'rapid']) || version_compare($version, '4.4', '>='),
26-
);
2722
$requireApiServerVersions = array_filter(
2823
$supportedMongoDBVersions,
2924
// requireApiVersion supports MongoDB 5.0+
3025
fn (string $version): bool => in_array($version, ['latest', 'rapid']) || version_compare($version, '5.0', '>='),
3126
);
32-
$skipCryptSharedServerVersions = array_filter(
27+
$csfleServerVersions = array_filter(
3328
$supportedMongoDBVersions,
34-
// crypt_shared is available starting with MongoDB 6.0
35-
fn (string $version): bool => in_array($version, ['latest', 'rapid']) || version_compare($version, '6.0', '>='),
29+
// Test CSFLE on MongoDB 4.2+
30+
fn (string $version): bool => in_array($version, ['latest', 'rapid']) || version_compare($version, '4.2', '>='),
3631
);
3732

3833
$allFiles = [];
@@ -44,8 +39,7 @@
4439
$allFiles[] = generateConfigs('test', 'mongodbVersion', '_template-local.yml', 'local-%s', $localServerVersions);
4540
$allFiles[] = generateConfigs('test', 'mongodbVersion', '_template-load-balanced.yml', 'load-balanced-%s', $loadBalancedServerVersions);
4641
$allFiles[] = generateConfigs('test', 'mongodbVersion', '_template-require-api-version.yml', 'require-api-version-%s', $requireApiServerVersions);
47-
//$allFiles[] = generateConfigs('test', 'mongodbVersion', '_template-ocsp.yml', 'ocsp-%s', $ocspServerVersions);
48-
//$allFiles[] = generateConfigs('test', 'mongodbVersion', '_template-skip-crypt-shared.yml', 'skip-crypt-shared-%s', $skipCryptSharedServerVersions);
42+
$allFiles[] = generateConfigs('test', 'mongodbVersion', '_template-csfle.yml', 'csfle-%s', $csfleServerVersions);
4943

5044
echo "Generated config. Use the following list to import files:\n";
5145
echo implode("\n", array_map('getImportConfig', array_merge(...$allFiles))) . "\n";

.evergreen/config/legacy-tasks.yml

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,3 @@ tasks:
33
commands:
44
- func: "bootstrap mongohoused"
55
- func: "run atlas data lake test"
6-
7-
- name: "test-csfle-crypt_shared"
8-
commands:
9-
- func: "bootstrap mongo-orchestration"
10-
vars:
11-
TOPOLOGY: "replica_set"
12-
- func: "start kms servers"
13-
- func: "set aws temp creds"
14-
- func: "run tests"
15-
vars:
16-
TESTS: "csfle"
17-
18-
- name: "test-csfle-mongocryptd"
19-
commands:
20-
- func: "bootstrap mongo-orchestration"
21-
vars:
22-
TOPOLOGY: "replica_set"
23-
SKIP_CRYPT_SHARED: "yes"
24-
- func: "start kms servers"
25-
- func: "set aws temp creds"
26-
- func: "run tests"
27-
vars:
28-
TESTS: "csfle"
29-
30-
- name: "test-without_aws_creds"
31-
commands:
32-
- func: "bootstrap mongo-orchestration"
33-
vars:
34-
TOPOLOGY: "replica_set"
35-
- func: "start kms servers"
36-
- func: "run tests"
37-
vars:
38-
client_side_encryption_aws_access_key_id: ""
39-
client_side_encryption_aws_secret_access_key: ""
40-
TESTS: "csfle-without-aws-creds"

.evergreen/config/legacy-variants.yml

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -103,34 +103,3 @@ buildvariants:
103103
VARIANT: debian11 # Referenced by ADL build script for downloading MQLRun
104104
tasks:
105105
- name: "test-atlas-data-lake"
106-
107-
# CSFLE tests (crypt_shared and mongocryptd) are tested on RHEL 8 as it's the only version that supports
108-
# 4.2 AND 6.0 (which is required for crypt_shared), as well as a somewhat relevant PHP version.
109-
# Newer MongoDB version may require adding different operating systems here
110-
- matrix_name: "test-csfle-crypt_shared"
111-
matrix_spec: { "os": "rhel80", "mongodb-versions": "*", "php-versions": "8.0", "driver-versions": "latest-stable" }
112-
display_name: "CSFLE crypt_shared - ${mongodb-versions}"
113-
exclude_spec:
114-
# MongoDB < 4.2 does not need to be tested.
115-
- { "os": "rhel80", "mongodb-versions": ["3.6", "4.0"], "php-versions": "8.0", "driver-versions": "latest-stable" }
116-
tasks:
117-
- name: "test-csfle-crypt_shared"
118-
- matrix_name: "test-csfle-mongocryptd"
119-
matrix_spec: { "os": "rhel80", "mongodb-versions": "*", "php-versions": "8.0", "driver-versions": "latest-stable" }
120-
display_name: "CSFLE mongocryptd - ${mongodb-versions}"
121-
exclude_spec:
122-
# MongoDB < 4.2 does not need to be tested.
123-
- { "os": "rhel80", "mongodb-versions": ["3.6", "4.0"], "php-versions": "8.0", "driver-versions": "latest-stable" }
124-
tasks:
125-
- name: "test-csfle-mongocryptd"
126-
127-
# Run CSFLE tests without AWS credentials (for "On-demand AWS Credentials" prose test)
128-
- matrix_name: "test-csfle-without_aws_creds"
129-
matrix_spec: { "os": ["debian92", "debian11"], "mongodb-versions": "*", "php-edge-versions": "latest-stable", "driver-versions": "latest-stable" }
130-
display_name: "CSFLE without_aws_creds - ${mongodb-versions}"
131-
exclude_spec:
132-
# CSFLE is available from MongoDB 4.2+ and Debian 9.2 only supports up to MongoDB 5.0
133-
- { "os": "debian92", "mongodb-versions": ["3.6", "4.0", "6.0", "rapid", "latest"], "php-edge-versions": "latest-stable", "driver-versions": "latest-stable" }
134-
- { "os": "debian11", "mongodb-versions": ["3.6", "4.0", "4.2", "4.4", "5.0"], "php-edge-versions": "latest-stable", "driver-versions": "latest-stable" }
135-
tasks:
136-
- name: "test-without_aws_creds"

.evergreen/config/test-variants.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ buildvariants:
1616
name: "build-php-8.2"
1717
tasks:
1818
- ".standalone .local !.3.6 !.4.0 !.4.2 !.4.4 !.5.0"
19-
- ".replicaset .local !.3.6 !.4.0 !.4.2 !.4.4 !.5.0"
19+
- ".replicaset .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0"
2020
- ".sharded .local !.3.6 !.4.0 !.4.2 !.4.4 !.5.0"
2121
- ".serverless"
2222
- name: test-debian92-php82-local
@@ -33,7 +33,7 @@ buildvariants:
3333
tasks:
3434
# Remember to add new major versions here as they are released
3535
- ".standalone .local !.6.0 !.7.0 !.rapid !.latest"
36-
- ".replicaset .local !.6.0 !.7.0 !.rapid !.latest"
36+
- ".replicaset .local !.csfle !.6.0 !.7.0 !.rapid !.latest"
3737
- ".sharded .local !.6.0 !.7.0 !.rapid !.latest"
3838

3939
# Test remaining PHP versions with replica sets on Debian 11 with MongoDB 7.0
@@ -49,7 +49,7 @@ buildvariants:
4949
- variant: "build-debian11"
5050
name: "build-php-8.1"
5151
tasks:
52-
- ".replicaset .local .7.0"
52+
- ".replicaset .local .7.0 !.csfle"
5353
- name: test-debian11-php80-local
5454
tags: ["test", "debian", "x64"]
5555
display_name: "Test: Debian 11, PHP 8.0"
@@ -62,7 +62,7 @@ buildvariants:
6262
- variant: "build-debian11"
6363
name: "build-php-8.0"
6464
tasks:
65-
- ".replicaset .local .7.0"
65+
- ".replicaset .local .7.0 !.csfle"
6666
- name: test-debian11-php74-local
6767
tags: ["test", "debian", "x64"]
6868
display_name: "Test: Debian 11, PHP 7.4"
@@ -75,7 +75,7 @@ buildvariants:
7575
- variant: "build-debian11"
7676
name: "build-php-7.4"
7777
tasks:
78-
- ".replicaset .local .7.0"
78+
- ".replicaset .local .7.0 !.csfle"
7979

8080
# Test Atlas Tests on RHEL 8
8181
- name: test-rhel80-php82-atlas
@@ -90,4 +90,5 @@ buildvariants:
9090
- variant: "build-rhel80"
9191
name: "build-php-8.2"
9292
tasks:
93-
- test_atlas_task_group
93+
- "test_atlas_task_group"
94+
- ".csfle"
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
tasks:
2+
- name: "test-mongodb-%mongodbVersion%-crypt-shared"
3+
tags: ["replicaset", "local", "%mongodbVersion%", "csfle"]
4+
commands:
5+
- func: "bootstrap mongo-orchestration"
6+
vars:
7+
TOPOLOGY: "replica_set"
8+
MONGODB_VERSION: "%mongodbVersion%"
9+
- func: "start kms servers"
10+
- func: "set aws temp creds"
11+
- func: "run tests"
12+
vars:
13+
TESTS: "csfle"
14+
15+
- name: "test-mongodb-%mongodbVersion%-mongocryptd"
16+
tags: ["replicaset", "local", "%mongodbVersion%", "csfle"]
17+
commands:
18+
- func: "bootstrap mongo-orchestration"
19+
vars:
20+
TOPOLOGY: "replica_set"
21+
SKIP_CRYPT_SHARED: "yes"
22+
MONGODB_VERSION: "%mongodbVersion%"
23+
- func: "start kms servers"
24+
- func: "set aws temp creds"
25+
- func: "run tests"
26+
vars:
27+
TESTS: "csfle"
28+
29+
- name: "test-mongodb-%mongodbVersion%-replicaset-no-aws-creds"
30+
tags: ["replicaset", "local", "%mongodbVersion%"]
31+
commands:
32+
- func: "bootstrap mongo-orchestration"
33+
vars:
34+
TOPOLOGY: "replica_set"
35+
MONGODB_VERSION: "%mongodbVersion%"
36+
- func: "start kms servers"
37+
- func: "run tests"
38+
vars:
39+
client_side_encryption_aws_access_key_id: ""
40+
client_side_encryption_aws_secret_access_key: ""
41+
TESTS: "csfle-without-aws-creds"

.evergreen/config/test/csfle-4.2.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This file is generated automatically - please edit the corresponding template file!
2+
tasks:
3+
- name: "test-mongodb-4.2-crypt-shared"
4+
tags: ["replicaset", "local", "4.2", "csfle"]
5+
commands:
6+
- func: "bootstrap mongo-orchestration"
7+
vars:
8+
TOPOLOGY: "replica_set"
9+
MONGODB_VERSION: "4.2"
10+
- func: "start kms servers"
11+
- func: "set aws temp creds"
12+
- func: "run tests"
13+
vars:
14+
TESTS: "csfle"
15+
16+
- name: "test-mongodb-4.2-mongocryptd"
17+
tags: ["replicaset", "local", "4.2", "csfle"]
18+
commands:
19+
- func: "bootstrap mongo-orchestration"
20+
vars:
21+
TOPOLOGY: "replica_set"
22+
SKIP_CRYPT_SHARED: "yes"
23+
MONGODB_VERSION: "4.2"
24+
- func: "start kms servers"
25+
- func: "set aws temp creds"
26+
- func: "run tests"
27+
vars:
28+
TESTS: "csfle"
29+
30+
- name: "test-mongodb-4.2-replicaset-no-aws-creds"
31+
tags: ["replicaset", "local", "4.2"]
32+
commands:
33+
- func: "bootstrap mongo-orchestration"
34+
vars:
35+
TOPOLOGY: "replica_set"
36+
MONGODB_VERSION: "4.2"
37+
- func: "start kms servers"
38+
- func: "run tests"
39+
vars:
40+
client_side_encryption_aws_access_key_id: ""
41+
client_side_encryption_aws_secret_access_key: ""
42+
TESTS: "csfle-without-aws-creds"

.evergreen/config/test/csfle-4.4.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This file is generated automatically - please edit the corresponding template file!
2+
tasks:
3+
- name: "test-mongodb-4.4-crypt-shared"
4+
tags: ["replicaset", "local", "4.4", "csfle"]
5+
commands:
6+
- func: "bootstrap mongo-orchestration"
7+
vars:
8+
TOPOLOGY: "replica_set"
9+
MONGODB_VERSION: "4.4"
10+
- func: "start kms servers"
11+
- func: "set aws temp creds"
12+
- func: "run tests"
13+
vars:
14+
TESTS: "csfle"
15+
16+
- name: "test-mongodb-4.4-mongocryptd"
17+
tags: ["replicaset", "local", "4.4", "csfle"]
18+
commands:
19+
- func: "bootstrap mongo-orchestration"
20+
vars:
21+
TOPOLOGY: "replica_set"
22+
SKIP_CRYPT_SHARED: "yes"
23+
MONGODB_VERSION: "4.4"
24+
- func: "start kms servers"
25+
- func: "set aws temp creds"
26+
- func: "run tests"
27+
vars:
28+
TESTS: "csfle"
29+
30+
- name: "test-mongodb-4.4-replicaset-no-aws-creds"
31+
tags: ["replicaset", "local", "4.4"]
32+
commands:
33+
- func: "bootstrap mongo-orchestration"
34+
vars:
35+
TOPOLOGY: "replica_set"
36+
MONGODB_VERSION: "4.4"
37+
- func: "start kms servers"
38+
- func: "run tests"
39+
vars:
40+
client_side_encryption_aws_access_key_id: ""
41+
client_side_encryption_aws_secret_access_key: ""
42+
TESTS: "csfle-without-aws-creds"

.evergreen/config/test/csfle-5.0.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This file is generated automatically - please edit the corresponding template file!
2+
tasks:
3+
- name: "test-mongodb-5.0-crypt-shared"
4+
tags: ["replicaset", "local", "5.0", "csfle"]
5+
commands:
6+
- func: "bootstrap mongo-orchestration"
7+
vars:
8+
TOPOLOGY: "replica_set"
9+
MONGODB_VERSION: "5.0"
10+
- func: "start kms servers"
11+
- func: "set aws temp creds"
12+
- func: "run tests"
13+
vars:
14+
TESTS: "csfle"
15+
16+
- name: "test-mongodb-5.0-mongocryptd"
17+
tags: ["replicaset", "local", "5.0", "csfle"]
18+
commands:
19+
- func: "bootstrap mongo-orchestration"
20+
vars:
21+
TOPOLOGY: "replica_set"
22+
SKIP_CRYPT_SHARED: "yes"
23+
MONGODB_VERSION: "5.0"
24+
- func: "start kms servers"
25+
- func: "set aws temp creds"
26+
- func: "run tests"
27+
vars:
28+
TESTS: "csfle"
29+
30+
- name: "test-mongodb-5.0-replicaset-no-aws-creds"
31+
tags: ["replicaset", "local", "5.0"]
32+
commands:
33+
- func: "bootstrap mongo-orchestration"
34+
vars:
35+
TOPOLOGY: "replica_set"
36+
MONGODB_VERSION: "5.0"
37+
- func: "start kms servers"
38+
- func: "run tests"
39+
vars:
40+
client_side_encryption_aws_access_key_id: ""
41+
client_side_encryption_aws_secret_access_key: ""
42+
TESTS: "csfle-without-aws-creds"

.evergreen/config/test/csfle-6.0.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This file is generated automatically - please edit the corresponding template file!
2+
tasks:
3+
- name: "test-mongodb-6.0-crypt-shared"
4+
tags: ["replicaset", "local", "6.0", "csfle"]
5+
commands:
6+
- func: "bootstrap mongo-orchestration"
7+
vars:
8+
TOPOLOGY: "replica_set"
9+
MONGODB_VERSION: "6.0"
10+
- func: "start kms servers"
11+
- func: "set aws temp creds"
12+
- func: "run tests"
13+
vars:
14+
TESTS: "csfle"
15+
16+
- name: "test-mongodb-6.0-mongocryptd"
17+
tags: ["replicaset", "local", "6.0", "csfle"]
18+
commands:
19+
- func: "bootstrap mongo-orchestration"
20+
vars:
21+
TOPOLOGY: "replica_set"
22+
SKIP_CRYPT_SHARED: "yes"
23+
MONGODB_VERSION: "6.0"
24+
- func: "start kms servers"
25+
- func: "set aws temp creds"
26+
- func: "run tests"
27+
vars:
28+
TESTS: "csfle"
29+
30+
- name: "test-mongodb-6.0-replicaset-no-aws-creds"
31+
tags: ["replicaset", "local", "6.0"]
32+
commands:
33+
- func: "bootstrap mongo-orchestration"
34+
vars:
35+
TOPOLOGY: "replica_set"
36+
MONGODB_VERSION: "6.0"
37+
- func: "start kms servers"
38+
- func: "run tests"
39+
vars:
40+
client_side_encryption_aws_access_key_id: ""
41+
client_side_encryption_aws_secret_access_key: ""
42+
TESTS: "csfle-without-aws-creds"

0 commit comments

Comments
 (0)