Skip to content

Commit b5462cf

Browse files
authored
PHPLIB-1168: Run atlas tests on an Atlas cluster (#1150)
1 parent f6ce211 commit b5462cf

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

.evergreen/config.yml

+48
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,13 @@ tasks:
665665
client_side_encryption_aws_secret_access_key: ""
666666
TESTS: "csfle-without-aws-creds"
667667

668+
- name: "test-atlas"
669+
commands:
670+
- func: "start kms servers"
671+
- func: "run tests"
672+
vars:
673+
TESTS: "atlas"
674+
668675
# }}}
669676

670677

@@ -871,6 +878,41 @@ axes:
871878
variables:
872879
DEPENDENCIES: "lowest"
873880

881+
task_groups:
882+
- name: test_atlas_task_group
883+
setup_group:
884+
- func: "fetch source"
885+
- func: "prepare resources"
886+
- func: "fix absolute paths"
887+
- func: "make files executable"
888+
- func: "install dependencies"
889+
- command: subprocess.exec
890+
params:
891+
working_dir: src
892+
binary: bash
893+
add_expansions_to_env: true
894+
env:
895+
MONGODB_VERSION: '7.0'
896+
args:
897+
- ${DRIVERS_TOOLS}/.evergreen/atlas/setup-atlas-cluster.sh
898+
- command: expansions.update
899+
params:
900+
file: src/atlas-expansion.yml
901+
teardown_group:
902+
- command: subprocess.exec
903+
params:
904+
working_dir: src
905+
binary: bash
906+
add_expansions_to_env: true
907+
args:
908+
- ${DRIVERS_TOOLS}/.evergreen/atlas/teardown-atlas-cluster.sh
909+
- func: "upload test results"
910+
- func: "cleanup"
911+
setup_group_can_fail_task: true
912+
setup_group_timeout_secs: 1800
913+
tasks:
914+
- test-atlas
915+
874916
buildvariants:
875917
# Test all PHP versions with latest-stable MongoDB and PHPC on all platforms
876918
- matrix_name: "test-php-versions"
@@ -981,3 +1023,9 @@ buildvariants:
9811023
- { "os": "debian11", "mongodb-versions": ["3.6", "4.0", "4.2", "4.4", "5.0"], "php-edge-versions": "latest-stable", "driver-versions": "latest-stable" }
9821024
tasks:
9831025
- name: "test-without_aws_creds"
1026+
1027+
- matrix_name: rhel8-test-atlas
1028+
matrix_spec: { "os": ["rhel80"], "php-edge-versions": "latest-stable", "driver-versions": "latest-stable" }
1029+
display_name: Atlas Tests
1030+
tasks:
1031+
- test_atlas_task_group

.evergreen/run-tests.sh

+4
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ export MONGODB_MULTI_MONGOS_LB_URI="${MONGODB_MULTI_MONGOS_LB_URI}"
8282

8383
# Run the tests, and store the results in a junit result file
8484
case "$TESTS" in
85+
atlas*)
86+
php vendor/bin/simple-phpunit $PHPUNIT_OPTS --group atlas
87+
;;
88+
8589
atlas-data-lake*)
8690
php vendor/bin/simple-phpunit $PHPUNIT_OPTS --testsuite "Atlas Data Lake Test Suite"
8791
;;

0 commit comments

Comments
 (0)