Skip to content

Commit 4467433

Browse files
authored
Fix CI issues (#1215)
* Fix wrong exception class in no-aws-creds test * PHPLIB-1327: Sync Index Management Tests This syncs index management tests to mongodb/specifications@e54cb7c. This commit also includes a new spec test introduced that should've been copied over in PHPLIB-1307. * Don't use sh to invoke shell scripts Invoking shell scripts using sh instead of relying on the shebang causes problems now that drivers-evergreen-tools assumes bash for most of its scripts. * PHPLIB-1304: Pull mongohouse image from ECR repo * PHPLIB-1307: Skip listSearchIndexes test
1 parent 2de9e3d commit 4467433

File tree

10 files changed

+293
-20
lines changed

10 files changed

+293
-20
lines changed

.evergreen/config/functions.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ functions:
141141
params:
142142
script: |
143143
${PREPARE_SHELL}
144-
SKIP_CRYPT_SHARED=${SKIP_CRYPT_SHARED} SKIP_LEGACY_SHELL=true MONGODB_VERSION=${MONGODB_VERSION} ORCHESTRATION_FILE=${ORCHESTRATION_FILE} TOPOLOGY=${TOPOLOGY} AUTH=${AUTH} SSL=${SSL} STORAGE_ENGINE=${STORAGE_ENGINE} LOAD_BALANCER=${LOAD_BALANCER} REQUIRE_API_VERSION=${REQUIRE_API_VERSION} sh ${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh
144+
SKIP_CRYPT_SHARED=${SKIP_CRYPT_SHARED} SKIP_LEGACY_SHELL=true MONGODB_VERSION=${MONGODB_VERSION} ORCHESTRATION_FILE=${ORCHESTRATION_FILE} TOPOLOGY=${TOPOLOGY} AUTH=${AUTH} SSL=${SSL} STORAGE_ENGINE=${STORAGE_ENGINE} LOAD_BALANCER=${LOAD_BALANCER} REQUIRE_API_VERSION=${REQUIRE_API_VERSION} ${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh
145145
# run-orchestration generates expansion file with MONGODB_URI and CRYPT_SHARED_LIB_PATH
146146
- command: expansions.update
147147
params:
@@ -152,18 +152,23 @@ functions:
152152
params:
153153
script: |
154154
${PREPARE_SHELL}
155-
sh ${DRIVERS_TOOLS}/.evergreen/stop-orchestration.sh
155+
${DRIVERS_TOOLS}/.evergreen/stop-orchestration.sh
156156
157157
"bootstrap mongohoused":
158158
- command: shell.exec
159159
params:
160160
script: |
161-
VARIANT=${VARIANT} DRIVERS_TOOLS="${DRIVERS_TOOLS}" sh ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/build-mongohouse-local.sh
161+
cd ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake
162+
163+
DRIVERS_TOOLS="${DRIVERS_TOOLS}" \
164+
./pull-mongohouse-image.sh
162165
- command: shell.exec
163166
params:
164-
background: true
165167
script: |
166-
DRIVERS_TOOLS="${DRIVERS_TOOLS}" sh ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/run-mongohouse-local.sh
168+
cd ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake
169+
170+
DRIVERS_TOOLS="${DRIVERS_TOOLS}" \
171+
./run-mongohouse-image.sh
167172
168173
"create serverless instance":
169174
- command: shell.exec
@@ -272,7 +277,7 @@ functions:
272277
PHP_VERSION=${PHP_VERSION} \
273278
SSL=${SSL} \
274279
TESTS=${TESTS} \
275-
sh ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
280+
${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
276281
277282
"run atlas data lake test":
278283
- command: shell.exec
@@ -285,7 +290,7 @@ functions:
285290
286291
MONGODB_URI="mongodb://mhuser:pencil@127.0.0.1:27017" \
287292
TESTS="atlas-data-lake" \
288-
sh ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
293+
${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
289294
290295
"run serverless tests":
291296
- command: shell.exec
@@ -318,7 +323,7 @@ functions:
318323
CRYPT_SHARED_LIB_PATH=${CRYPT_SHARED_LIB_PATH} \
319324
MONGODB_URI="${SERVERLESS_URI}" \
320325
TESTS="serverless" \
321-
sh ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
326+
${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
322327
323328
"cleanup":
324329
- command: shell.exec

.evergreen/config/test-variants.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ buildvariants:
2121
- ".sharded .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0"
2222
- ".loadbalanced .local !.csfle !.3.6 !.4.0 !.4.2 !.4.4 !.5.0"
2323
- ".serverless"
24-
- "test-atlas-data-lake"
2524
- name: test-debian92-php82-local
2625
tags: ["test", "debian", "x64"]
2726
display_name: "Test: Debian 9.2, PHP 8.2"
@@ -156,3 +155,18 @@ buildvariants:
156155
name: "build-php-8.2"
157156
tasks:
158157
- "run-benchmark"
158+
159+
# Run Atlas Data Lake Tests on Ubuntu
160+
- name: test-ubuntu2204-php82-local
161+
tags: ["test", "ubuntu", "x64"]
162+
display_name: "Test: Ubuntu 22.04 x64, PHP 8.2"
163+
run_on: ubuntu2204-small
164+
expansions:
165+
FETCH_BUILD_VARIANT: "build-ubuntu2204"
166+
FETCH_BUILD_TASK: "build-php-8.2"
167+
PHP_VERSION: "8.2"
168+
depends_on:
169+
- variant: "build-ubuntu2204"
170+
name: "build-php-8.2"
171+
tasks:
172+
- "test-atlas-data-lake"

tests/SpecTests/ClientSideEncryptionSpecTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1762,7 +1762,7 @@ public function testOnDemandAwsCredentials(bool $shouldSucceed): void
17621762
];
17631763

17641764
if (! $shouldSucceed) {
1765-
$this->expectException(AuthenticationException::class);
1765+
$this->expectException(RuntimeException::class);
17661766
}
17671767

17681768
$dataKeyId = $clientEncryption->createDataKey('aws', $dataKeyOpts);

tests/UnifiedSpecTests/UnifiedSpecTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ class UnifiedSpecTest extends FunctionalTestCase
8383
'valid-pass/createEntities-operation: createEntities operation' => 'CSOT is not yet implemented (PHPC-1760)',
8484
'valid-pass/entity-cursor-iterateOnce: iterateOnce' => 'CSOT is not yet implemented (PHPC-1760)',
8585
'valid-pass/matches-lte-operator: special lte matching operator' => 'CSOT is not yet implemented (PHPC-1760)',
86+
// libmongoc always adds readConcern to aggregate command
87+
'index-management/search index operations ignore read and write concern: listSearchIndexes ignores read and write concern' => 'libmongoc appends readConcern to aggregate command',
8688
];
8789

8890
private static UnifiedTestRunner $runner;

tests/UnifiedSpecTests/index-management/createSearchIndex.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
},
5656
"expectError": {
5757
"isError": true,
58-
"errorContains": "Search index commands are only supported with Atlas"
58+
"errorContains": "Atlas"
5959
}
6060
}
6161
],
@@ -102,7 +102,7 @@
102102
},
103103
"expectError": {
104104
"isError": true,
105-
"errorContains": "Search index commands are only supported with Atlas"
105+
"errorContains": "Atlas"
106106
}
107107
}
108108
],

tests/UnifiedSpecTests/index-management/createSearchIndexes.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
},
5050
"expectError": {
5151
"isError": true,
52-
"errorContains": "Search index commands are only supported with Atlas"
52+
"errorContains": "Atlas"
5353
}
5454
}
5555
],
@@ -89,7 +89,7 @@
8989
},
9090
"expectError": {
9191
"isError": true,
92-
"errorContains": "Search index commands are only supported with Atlas"
92+
"errorContains": "Atlas"
9393
}
9494
}
9595
],
@@ -138,7 +138,7 @@
138138
},
139139
"expectError": {
140140
"isError": true,
141-
"errorContains": "Search index commands are only supported with Atlas"
141+
"errorContains": "Atlas"
142142
}
143143
}
144144
],

tests/UnifiedSpecTests/index-management/dropSearchIndex.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
},
5050
"expectError": {
5151
"isError": true,
52-
"errorContains": "Search index commands are only supported with Atlas"
52+
"errorContains": "Atlas"
5353
}
5454
}
5555
],

tests/UnifiedSpecTests/index-management/listSearchIndexes.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"object": "collection0",
4747
"expectError": {
4848
"isError": true,
49-
"errorContains": "Search index commands are only supported with Atlas"
49+
"errorContains": "Atlas"
5050
}
5151
}
5252
],
@@ -81,7 +81,7 @@
8181
},
8282
"expectError": {
8383
"isError": true,
84-
"errorContains": "Search index commands are only supported with Atlas"
84+
"errorContains": "Atlas"
8585
}
8686
}
8787
],
@@ -122,7 +122,7 @@
122122
},
123123
"expectError": {
124124
"isError": true,
125-
"errorContains": "Search index commands are only supported with Atlas"
125+
"errorContains": "Atlas"
126126
}
127127
}
128128
],

0 commit comments

Comments
 (0)