Skip to content

PHPLIB-1168: Run atlas tests on an Atlas cluster #1150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,13 @@ tasks:
client_side_encryption_aws_secret_access_key: ""
TESTS: "csfle-without-aws-creds"

- name: "test-atlas"
commands:
- func: "start kms servers"
- func: "run tests"
vars:
TESTS: "atlas"

# }}}


Expand Down Expand Up @@ -871,6 +878,41 @@ axes:
variables:
DEPENDENCIES: "lowest"

task_groups:
- name: test_atlas_task_group
setup_group:
- func: "fetch source"
- func: "prepare resources"
- func: "fix absolute paths"
- func: "make files executable"
- func: "install dependencies"
- command: subprocess.exec
params:
working_dir: src
binary: bash
add_expansions_to_env: true
env:
MONGODB_VERSION: '7.0'
args:
- ${DRIVERS_TOOLS}/.evergreen/atlas/setup-atlas-cluster.sh
- command: expansions.update
params:
file: src/atlas-expansion.yml
teardown_group:
- command: subprocess.exec
params:
working_dir: src
binary: bash
add_expansions_to_env: true
args:
- ${DRIVERS_TOOLS}/.evergreen/atlas/teardown-atlas-cluster.sh
- func: "upload test results"
- func: "cleanup"
setup_group_can_fail_task: true
setup_group_timeout_secs: 1800
tasks:
- test-atlas

buildvariants:
# Test all PHP versions with latest-stable MongoDB and PHPC on all platforms
- matrix_name: "test-php-versions"
Expand Down Expand Up @@ -981,3 +1023,9 @@ buildvariants:
- { "os": "debian11", "mongodb-versions": ["3.6", "4.0", "4.2", "4.4", "5.0"], "php-edge-versions": "latest-stable", "driver-versions": "latest-stable" }
tasks:
- name: "test-without_aws_creds"

- matrix_name: rhel8-test-atlas
matrix_spec: { "os": ["rhel80"], "php-edge-versions": "latest-stable", "driver-versions": "latest-stable" }
display_name: Atlas Tests
tasks:
- test_atlas_task_group
4 changes: 4 additions & 0 deletions .evergreen/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ export MONGODB_MULTI_MONGOS_LB_URI="${MONGODB_MULTI_MONGOS_LB_URI}"

# Run the tests, and store the results in a junit result file
case "$TESTS" in
atlas*)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't atlas* going to conflict with atlas-data-lake* below? Should we drop the asterisks? According to https://stackoverflow.com/a/4555979/162228, they do function as a wildcard for the pattern.

Just realized this while reviewing #1151.

php vendor/bin/simple-phpunit $PHPUNIT_OPTS --group atlas
;;

atlas-data-lake*)
php vendor/bin/simple-phpunit $PHPUNIT_OPTS --testsuite "Atlas Data Lake Test Suite"
;;
Expand Down