File tree Expand file tree Collapse file tree 8 files changed +80
-13
lines changed
Expand file tree Collapse file tree 8 files changed +80
-13
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,9 @@ SCRIPT_DIR=$(dirname ${BASH_SOURCE[0]})
88. $SCRIPT_DIR /../handle-paths.sh
99pushd $SCRIPT_DIR
1010REPO=" 904697982180.dkr.ecr.us-east-1.amazonaws.com/atlas-query-engine-test"
11- . ../secrets_handling/setup-secrets.sh drivers/adl
11+ if [ ! -f secrets-export.sh ]; then
12+ . ../secrets_handling/setup-secrets.sh drivers/adl
13+ fi
1214source secrets-export.sh
1315unset AWS_SESSION_TOKEN
1416aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $REPO
Original file line number Diff line number Diff line change @@ -11,4 +11,9 @@ SCRIPT_DIR=$(dirname ${BASH_SOURCE[0]})
1111IMAGE=904697982180.dkr.ecr.us-east-1.amazonaws.com/atlas-query-engine-test
1212USE_TTY=" "
1313test -t 1 && USE_TTY=" -t"
14- docker run -d -p 27017:27017 -v " $DRIVERS_TOOLS /.evergreen/atlas_data_lake:/src" -i $USE_TTY $IMAGE --config ./testdata/config/external/drivers/config.yaml
14+ if command -v podman & > /dev/null; then
15+ DOCKER=" podman --storage-opt ignore_chown_errors=true"
16+ else
17+ DOCKER=docker
18+ fi
19+ $DOCKER run -d -p 27017:27017 --platform linux/amd64 --name atlas-data-lake -v " $DRIVERS_TOOLS /.evergreen/atlas_data_lake:/src" -i $USE_TTY $IMAGE --config ./testdata/config/external/drivers/config.yaml
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ #
3+ # This script sets Atlas Data Lake tests.
4+ #
5+ set -eu
6+
7+ SCRIPT_DIR=$( dirname ${BASH_SOURCE[0]} )
8+ . $SCRIPT_DIR /../handle-paths.sh
9+
10+ bash $SCRIPT_DIR /pull-mongohouse-image.sh
11+ bash $SCRIPT_DIR /run-mongohouse-image.sh
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ #
3+ # This script tears down Atlas Data Lake tests.
4+ #
5+ set -eu
6+
7+ if command -v podman & > /dev/null; then
8+ DOCKER=" podman --storage-opt ignore_chown_errors=true"
9+ else
10+ DOCKER=docker
11+ fi
12+ $DOCKER kill atlas-data-lake || true
13+ $DOCKER rm atlas-data-lake
Original file line number Diff line number Diff line change @@ -520,6 +520,14 @@ functions:
520520 include_expansions_in_env : [AWS_SECRET_ACCESS_KEY, AWS_ACCESS_KEY_ID, AWS_SESSION_TOKEN]
521521 args : [src/.evergreen/tests/test-aws.sh]
522522
523+ " run data lake test " :
524+ - command : subprocess.exec
525+ type : test
526+ params :
527+ binary : bash
528+ include_expansions_in_env : [AWS_SECRET_ACCESS_KEY, AWS_ACCESS_KEY_ID, AWS_SESSION_TOKEN]
529+ args : [src/.evergreen/tests/test-data-lake.sh]
530+
523531 " run csfle test " :
524532 - command : ec2.assume_role
525533 params :
@@ -1037,12 +1045,18 @@ tasks:
10371045 commands :
10381046 - func : " run aws test"
10391047
1048+ - name : " test-atlas-data-lake"
1049+ tags : ["pr", "data_lake"]
1050+ commands :
1051+ - func : " run data lake test"
1052+
10401053 - name : " test-cli-full"
10411054 tags : ["pr"]
10421055 commands :
10431056 - func : " run cli test full"
10441057
10451058 - name : " test-ocsp"
1059+ tags : ["pr", "ocsp"]
10461060 commands :
10471061 - func : " run ocsp test"
10481062
@@ -1427,20 +1441,15 @@ buildvariants:
14271441 tasks :
14281442 - " .releng" # Run all tasks with the "releng" tag
14291443
1430- # Tests relating to docker images
1431- - name : tests-docker
1432- display_name : Docker
1433- run_on :
1434- - ubuntu2204-small
1435- tasks :
1436- - " .docker" # Run all tasks with the "docker" tag
1437-
1438- - name : tests-aws
1439- display_name : Auth AWS
1444+ - name : tests-misc
1445+ display_name : Other tests
14401446 run_on :
14411447 - ubuntu2204-small
14421448 tasks :
14431449 - " .aws"
1450+ - " .data_lake"
1451+ - " .ocsp"
1452+ - " .docker"
14441453
14451454- name : tests-oidc
14461455 display_name : Auth OIDC
Original file line number Diff line number Diff line change 3131pushd $DRIVERS_TOOLS
3232cp .gitignore .dockerignore
3333USER=" --build-arg USER_ID=$( id -u) --build-arg GROUP_ID=$( id -g) "
34- $DOCKER build $PLATFORM -t $NAME -f $SCRIPT_DIR /$IMAGE /Dockerfile $USER .
34+ ARGS=" $PLATFORM -t $NAME -f $SCRIPT_DIR /$IMAGE /Dockerfile $USER ."
35+ # Allow a single failure due to transient issues with apt-get.
36+ $DOCKER build $ARGS || $DOCKER build $ARGS
3537popd
3638
3739# Handle environment variables.
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # Test aws setup function for different inputs.
4+ set -eu
5+
6+ SCRIPT_DIR=$( dirname ${BASH_SOURCE[0]} )
7+ . $SCRIPT_DIR /../handle-paths.sh
8+
9+ pushd $SCRIPT_DIR /..
10+ DOWNLOAD_DIR=$SCRIPT_DIR /dl_test
11+ bash install-cli.sh .
12+ ./mongosh-dl --version 2.1.1 --out ${DOWNLOAD_DIR} /bin --strip-path-components 2 --retries 5
13+ popd
14+
15+ pushd $SCRIPT_DIR /../atlas_data_lake
16+ bash ./setup.sh
17+ source secrets-export.sh
18+ ${DOWNLOAD_DIR} /bin/mongosh " mongodb://$ADL_USERNAME :$ADL_PASSWORD @localhost:27017" --eval " db.runCommand({\" ping\" :1})"
19+ bash ./teardown.sh
20+ popd
21+
22+ rm -rf " ${SCRIPT_DIR:? } /${DOWNLOAD_DIR} "
23+
24+ make -C ${DRIVERS_TOOLS} test
Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ test-env.sh
9797# Temporary files created during operation.
9898/uri.txt
9999/results.json
100+ /test-results.json
100101/mongodb
101102node_index.tab
102103mongodb-binaries.tgz
You can’t perform that action at this time.
0 commit comments