Skip to content
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
7 changes: 6 additions & 1 deletion .evergreen/cargo-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ cargo_test() {
TAIL_PID=$!
LOG_UNCAPTURED=${LOG_PATH} RUST_BACKTRACE=1 cargo nextest run --profile ci $(cargo_test_options $1)
((CARGO_RESULT = ${CARGO_RESULT} || $?))
mv target/nextest/ci/junit.xml $2
if [[ -f "results.xml" ]]; then
mv results.xml previous.xml
merge-junit -o results.xml previous.xml target/nextest/ci/junit.xml
else
mv target/nextest/ci/junit.xml results.xml
fi
kill ${TAIL_PID}
rm ${LOG_PATH}
}
25 changes: 16 additions & 9 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1571,16 +1571,23 @@ functions:
params:
working_dir: src
shell: bash
add_expansions_to_env: true
include_expansions_in_env:
- DRIVERS_TOOLS
- PROJECT_DIRECTORY
- MONGODB_URI
- MONGOCRYPT_LIB_DIR
- OPENSSL
- OS
- LD_LIBRARY_PATH
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- CSFLE_LOCAL_KEY
- CRYPT_SHARED_LIB_PATH
- DISABLE_CRYPT_SHARED
- AZURE_IMDS_MOCK_PORT
- SERVERLESS_ATLAS_USER
- SERVERLESS_ATLAS_PASSWORD
script: |
${PREPARE_SHELL}

# Exported without xtrace to avoid leaking credentials
set +o xtrace
export SERVERLESS_ATLAS_USER=${SERVERLESS_ATLAS_USER}
export SERVERLESS_ATLAS_PASSWORD=${SERVERLESS_ATLAS_PASSWORD}
set -o xtrace

export SINGLE_MONGOS_LB_URI=${SERVERLESS_URI}
. .evergreen/generate-uri.sh
export SERVERLESS=serverless
Expand Down
2 changes: 1 addition & 1 deletion .evergreen/run-atlas-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ source "${DRIVERS_TOOLS}/.evergreen/secrets_handling/setup-secrets.sh" drivers/a

set +o errexit

cargo_test atlas_connectivity results.xml
cargo_test atlas_connectivity

exit $CARGO_RESULT
12 changes: 5 additions & 7 deletions .evergreen/run-aws-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ FEATURE_FLAGS+=("aws-auth")

set +o errexit

cargo_test auth_aws auth_aws.xml
cargo_test lambda_examples::auth::test_handler lambda_handler.xml
cargo_test spec::auth spec.xml
cargo_test uri_options uri_options.xml
cargo_test connection_string connection_string.xml

merge-junit -o results.xml auth_aws.xml lambda_handler.xml spec.xml uri_options.xml connection_string.xml
cargo_test auth_aws
cargo_test lambda_examples::auth::test_handler
cargo_test spec::auth
cargo_test uri_options
cargo_test connection_string

exit $CARGO_RESULT
8 changes: 3 additions & 5 deletions .evergreen/run-connection-string-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ FEATURE_FLAGS+=("aws-auth")

set +o errexit

cargo_test spec::auth spec.xml
cargo_test uri_options uri_options.xml
cargo_test connection_string connection_string.xml

merge-junit -o results.xml spec.xml uri_options.xml connection_string.xml
cargo_test spec::auth
cargo_test uri_options
cargo_test connection_string

exit ${CARGO_RESULT}
8 changes: 3 additions & 5 deletions .evergreen/run-csfle-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,12 @@ fi

set +o errexit

cargo_test test::csfle prose.xml
cargo_test test::spec::client_side_encryption spec.xml
cargo_test test::csfle
cargo_test test::spec::client_side_encryption

# Unset variables for on-demand credential failure tests.
unset AWS_ACCESS_KEY_ID
unset AWS_SECRET_ACCESS_KEY
cargo_test test::csfle::on_demand_aws_failure failure.xml

merge-junit -o results.xml prose.xml spec.xml failure.xml
cargo_test test::csfle::on_demand_aws_failure

exit ${CARGO_RESULT}
2 changes: 1 addition & 1 deletion .evergreen/run-plain-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ source .evergreen/cargo-test.sh

set +o errexit

MONGO_PLAIN_AUTH_TEST=1 cargo_test plain results.xml
MONGO_PLAIN_AUTH_TEST=1 cargo_test plain

exit $CARGO_RESULT
2 changes: 1 addition & 1 deletion .evergreen/run-search-index-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ export INDEX_MANAGEMENT_TEST_PROSE=1

set +o errexit

cargo_test test::spec::index_management results.xml
cargo_test test::spec::index_management

exit ${CARGO_RESULT}
22 changes: 10 additions & 12 deletions .evergreen/run-serverless-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,15 @@ export SERVERLESS="serverless"

set +o errexit

cargo_test test::spec::crud crud.xml
cargo_test test::spec::retryable_reads retryable_reads.xml
cargo_test test::spec::retryable_writes retryable_writes.xml
cargo_test test::spec::versioned_api versioned_api.xml
cargo_test test::spec::sessions sessions.xml
cargo_test test::spec::transactions transactions.xml
cargo_test test::spec::load_balancers load_balancers.xml
cargo_test test::cursor cursor.xml
cargo_test test::spec::collection_management coll.xml
cargo_test test::spec::command_monitoring_unified monitoring.xml

merge-junit -o results.xml crud.xml retryable_reads.xml retryable_writes.xml versioned_api.xml sessions.xml transactions.xml load_balancers.xml cursor.xml coll.xml monitoring.xml
cargo_test test::spec::crud
cargo_test test::spec::retryable_reads
cargo_test test::spec::retryable_writes
cargo_test test::spec::versioned_api
cargo_test test::spec::sessions
cargo_test test::spec::transactions
cargo_test test::spec::load_balancers
cargo_test test::cursor
cargo_test test::spec::collection_management
cargo_test test::spec::command_monitoring_unified

exit $CARGO_RESULT
2 changes: 1 addition & 1 deletion .evergreen/run-sync-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ echo "cargo test options: $(cargo_test_options)"

set +o errexit

cargo_test sync results.xml
cargo_test sync

exit $CARGO_RESULT
2 changes: 1 addition & 1 deletion .evergreen/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ echo "cargo test options: $(cargo_test_options)"

set +o errexit

cargo_test "" results.xml
cargo_test ""

# cargo-nextest doesn't support doc tests
RUST_BACKTRACE=1 cargo test --doc $(cargo_test_options)
Expand Down
2 changes: 1 addition & 1 deletion .evergreen/run-x509-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ export SUBJECT=$(echo "$SUBJECT" | awk '{$1=$1;print}')

set +o errexit

MONGO_X509_USER="$SUBJECT" cargo_test x509_auth results.xml
MONGO_X509_USER="$SUBJECT" cargo_test x509_auth

exit ${CARGO_RESULT}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"replicaset",
"sharded",
"load-balanced"
]
],
"serverless": "forbid"
}
],
"database_name": "default",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ runOn:
- minServerVersion: "8.0.0" # Require range v2 support on server.
# FLE 2 Encrypted collections are not supported on standalone.
topology: [ "replicaset", "sharded", "load-balanced" ]
serverless: forbid # Skip on serverless until CLOUDP-267864 is resolved.
database_name: "default"
collection_name: &collection_name "default"
data: []
Expand Down