Skip to content

Commit 68b1434

Browse files
committed
PHPLIB-569: Run ADL tests on Evergreen
1 parent 5ab179c commit 68b1434

File tree

3 files changed

+50
-1
lines changed

3 files changed

+50
-1
lines changed

.evergreen/config.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,17 @@ functions:
187187
${PREPARE_SHELL}
188188
sh ${DRIVERS_TOOLS}/.evergreen/stop-orchestration.sh
189189
190+
"bootstrap mongohoused":
191+
- command: shell.exec
192+
params:
193+
script: |
194+
DRIVERS_TOOLS="${DRIVERS_TOOLS}" sh ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/build-mongohouse-local.sh
195+
- command: shell.exec
196+
params:
197+
background: true
198+
script: |
199+
DRIVERS_TOOLS="${DRIVERS_TOOLS}" sh ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/run-mongohouse-local.sh
200+
190201
"run tests":
191202
- command: shell.exec
192203
type: test
@@ -196,6 +207,15 @@ functions:
196207
${PREPARE_SHELL}
197208
PHP_VERSION=${PHP_VERSION} AUTH=${AUTH} SSL=${SSL} MONGODB_URI="${MONGODB_URI}" sh ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
198209
210+
"run atlas data lake test":
211+
- command: shell.exec
212+
type: test
213+
params:
214+
working_dir: "src"
215+
script: |
216+
${PREPARE_SHELL}
217+
PHP_VERSION=${PHP_VERSION} TESTS="atlas-data-lake" AUTH=${AUTH} SSL=${SSL} MONGODB_URI="${MONGODB_URI}" sh ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
218+
199219
"cleanup":
200220
- command: shell.exec
201221
params:
@@ -325,6 +345,12 @@ tasks:
325345
TOPOLOGY: "sharded_cluster"
326346
- func: "run tests"
327347

348+
- name: "test-atlas-data-lake"
349+
commands:
350+
- func: "bootstrap mongohoused"
351+
- func: "run atlas data lake test"
352+
353+
328354
# }}}
329355

330356

@@ -537,3 +563,10 @@ buildvariants:
537563
- name: "test-standalone"
538564
- name: "test-replica_set"
539565
- name: "test-sharded_cluster"
566+
567+
- matrix_name: "atlas-data-lake-test"
568+
matrix_spec: { "php-edge-versions": "latest-stable" }
569+
display_name: "Atlas Data Lake test"
570+
run_on: rhel70
571+
tasks:
572+
- name: "test-atlas-data-lake"

.evergreen/run-tests.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ set -o errexit # Exit the script with error if any of the commands fail
1212
AUTH=${AUTH:-noauth}
1313
SSL=${SSL:-nossl}
1414
MONGODB_URI=${MONGODB_URI:-}
15+
TESTS=${TESTS:-}
1516

1617
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
1718
[ -z "$MARCH" ] && MARCH=$(uname -m | tr '[:upper:]' '[:lower:]')
@@ -22,4 +23,13 @@ OLD_PATH=$PATH
2223
PATH=/opt/php/${PHP_VERSION}-64bit/bin:$OLD_PATH
2324

2425
# Run the tests, and store the results in a Evergreen compatible JSON results file
25-
php vendor/bin/phpunit
26+
case "$TESTS" in
27+
atlas-data-lake*)
28+
MONGODB_URI="mongodb://mhuser:pencil@127.0.0.1:27017"
29+
php vendor/bin/phpunit --testsuite "Atlas Data Lake Test Suite"
30+
;;
31+
32+
*)
33+
php vendor/bin/phpunit
34+
;;
35+
esac

phpunit.xml.dist

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
beStrictAboutChangesToGlobalState="true"
88
colors="true"
99
bootstrap="tests/bootstrap.php"
10+
defaultTestSuite="MongoDB CRUD Test Suite"
1011
>
1112

1213
<php>
@@ -18,6 +19,11 @@
1819
<testsuites>
1920
<testsuite name="MongoDB CRUD Test Suite">
2021
<directory>./tests/</directory>
22+
<exclude>tests/SpecTests/AtlasDataLakeSpecTest.php</exclude>
23+
</testsuite>
24+
25+
<testsuite name="Atlas Data Lake Test Suite">
26+
<file>tests/SpecTests/AtlasDataLakeSpecTest.php</file>
2127
</testsuite>
2228
</testsuites>
2329
</phpunit>

0 commit comments

Comments
 (0)