Skip to content

Commit a9b1c07

Browse files
committed
Fix modwsgi, aws auth
1 parent b10bd37 commit a9b1c07

File tree

5 files changed

+53
-62
lines changed

5 files changed

+53
-62
lines changed

.evergreen/config.yml

Lines changed: 43 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,11 @@ functions:
258258
- command: subprocess.exec
259259
type: test
260260
params:
261-
include_expansions_in_env: ["PROJECT_DIRECTORY"]
261+
include_expansions_in_env: ["PROJECT_DIRECTORY", "PYTHON_BINARY", "MOD_WSGI_VERSION", "MOD_WSGI_EMBEDDED"]
262262
working_dir: "src"
263263
binary: bash
264264
args:
265-
- .evergreen/scripts/run-modwsgi-tests.sh
265+
- .evergreen/scripts/run-mod-wsgi-tests.sh
266266

267267
"run mockupdb tests":
268268
- command: subprocess.exec
@@ -387,55 +387,66 @@ functions:
387387
- ${DRIVERS_TOOLS}/.evergreen/auth_aws/setup-secrets.sh
388388

389389
"run aws auth test with regular aws credentials":
390-
- command: shell.exec
390+
- command: subprocess.exec
391391
type: test
392392
params:
393-
shell: "bash"
393+
include_expansions_in_env: ["DRIVERS_TOOLS"]
394+
binary: bash
394395
working_dir: "src"
395-
script: |
396-
. .evergreen/scripts/env.sh
397-
.evergreen/run-mongodb-aws-test.sh regular
396+
args:
397+
- .evergreen/scripts/run-mongodb-aws-test.sh regular
398398

399399
"run aws auth test with assume role credentials":
400-
- command: shell.exec
400+
- command: subprocess.exec
401401
type: test
402402
params:
403-
shell: "bash"
403+
include_expansions_in_env: ["DRIVERS_TOOLS"]
404+
binary: bash
404405
working_dir: "src"
405-
script: |
406-
. .evergreen/scripts/env.sh
407-
.evergreen/run-mongodb-aws-test.sh assume-role
406+
args:
407+
- .evergreen/scripts/run-mongodb-aws-test.sh assume-role
408408

409409
"run aws auth test with aws EC2 credentials":
410-
- command: shell.exec
410+
- command: subprocess.exec
411411
type: test
412412
params:
413+
include_expansions_in_env: ["DRIVERS_TOOLS"]
414+
binary: bash
413415
working_dir: "src"
414-
shell: "bash"
415-
script: |
416-
if [ "${skip_EC2_auth_test}" = "true" ]; then
417-
echo "This platform does not support the EC2 auth test, skipping..."
418-
exit 0
419-
fi
420-
. .evergreen/scripts/env.sh
421-
.evergreen/run-mongodb-aws-test.sh ec2
416+
args:
417+
- .evergreen/scripts/run-mongodb-aws-test.sh ec2
422418

423419
"run aws auth test with aws web identity credentials":
424-
- command: shell.exec
420+
- command: subprocess.exec
425421
type: test
426422
params:
423+
include_expansions_in_env: ["DRIVERS_TOOLS"]
424+
binary: bash
427425
working_dir: "src"
428-
shell: "bash"
429-
script: |
430-
if [ "${skip_EC2_auth_test}" = "true" ]; then
431-
echo "This platform does not support the web identity auth test, skipping..."
432-
exit 0
433-
fi
434-
. .evergreen/scripts/env.sh
426+
args:
435427
# Test with and without AWS_ROLE_SESSION_NAME set.
436-
.evergreen/run-mongodb-aws-test.sh web-identity
437-
AWS_ROLE_SESSION_NAME="test" \
438-
.evergreen/run-mongodb-aws-test.sh web-identity
428+
- .evergreen/scripts/run-mongodb-aws-test.sh web-identity
429+
- AWS_ROLE_SESSION_NAME="test" .evergreen/scripts/run-mongodb-aws-test.sh web-identity
430+
431+
"run aws auth test with aws credentials as environment variables":
432+
- command: subprocess.exec
433+
type: test
434+
params:
435+
include_expansions_in_env: ["DRIVERS_TOOLS"]
436+
binary: bash
437+
working_dir: "src"
438+
args:
439+
- .evergreen/scripts/run-mongodb-aws-test.sh env-creds
440+
441+
"run aws auth test with aws credentials and session token as environment variables":
442+
- command: subprocess.exec
443+
type: test
444+
params:
445+
include_expansions_in_env: ["DRIVERS_TOOLS"]
446+
binary: bash
447+
working_dir: "src"
448+
args:
449+
- .evergreen/scripts/run-mongodb-aws-test.sh session-creds
439450

440451
"run oidc auth test with test credentials":
441452
- command: subprocess.exec
@@ -459,26 +470,6 @@ functions:
459470
args:
460471
- ${PROJECT_DIRECTORY}/.evergreen/run-mongodb-oidc-remote-test.sh
461472

462-
"run aws auth test with aws credentials as environment variables":
463-
- command: shell.exec
464-
type: test
465-
params:
466-
working_dir: "src"
467-
shell: bash
468-
script: |
469-
. .evergreen/scripts/env.sh
470-
.evergreen/run-mongodb-aws-test.sh env-creds
471-
472-
"run aws auth test with aws credentials and session token as environment variables":
473-
- command: shell.exec
474-
type: test
475-
params:
476-
working_dir: "src"
477-
shell: bash
478-
script: |
479-
. .evergreen/scripts/env.sh
480-
.evergreen/run-mongodb-aws-test.sh session-creds
481-
482473
"run aws ECS auth test":
483474
- command: subprocess.exec
484475
type: test

.evergreen/run-mod-wsgi-tests.sh renamed to .evergreen/scripts/run-mod-wsgi-tests.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
set -o xtrace
33
set -o errexit
44

5+
. .evergreen/scripts/env.sh
6+
57
APACHE=$(command -v apache2 || command -v /usr/lib/apache2/mpm-prefork/apache2) || true
68
if [ -n "$APACHE" ]; then
79
APACHE_CONFIG=apache24ubuntu161404.conf

.evergreen/scripts/run-modwsgi-tests.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

.evergreen/run-mongodb-aws-test.sh renamed to .evergreen/scripts/run-mongodb-aws-test.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ set -o errexit # Exit the script with error if any of the commands fail
1313
# mechanism.
1414
# PYTHON_BINARY The Python version to use.
1515

16+
# shellcheck disable=SC2154
17+
if [ "${skip_EC2_auth_test}" = "true" ] && { [ "$1" = "ec2" ] || [ "$1" = "web-identity" ]; }; then
18+
echo "This platform does not support the EC2 auth test, skipping..."
19+
exit 0
20+
fi
21+
22+
. .evergreen/scripts/env.sh
1623
echo "Running MONGODB-AWS authentication tests"
1724

1825
# Handle credentials and environment setup.

test/mod_wsgi_test/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,4 @@ Automation
107107
At MongoDB, Inc. we use a continuous integration job that tests each
108108
combination in the matrix. The job starts up Apache, starts a single server
109109
or replica set, and runs ``test_client.py`` with the proper arguments.
110-
See `run-mod-wsgi-tests.sh <https://github.com/mongodb/mongo-python-driver/blob/master/.evergreen/run-mod-wsgi-tests.sh>`_
110+
See `run-mod-wsgi-tests.sh <https://github.com/mongodb/mongo-python-driver/blob/master/.evergreen/scripts/run-mod-wsgi-tests.sh>`_

0 commit comments

Comments
 (0)