Skip to content

Commit 287985e

Browse files
authored
RUST-2024 Fix serverless CSFLE tests (#1200)
1 parent ad9ca4d commit 287985e

14 files changed

+52
-46
lines changed

.evergreen/cargo-test.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@ cargo_test() {
2929
TAIL_PID=$!
3030
LOG_UNCAPTURED=${LOG_PATH} RUST_BACKTRACE=1 cargo nextest run --profile ci $(cargo_test_options $1)
3131
((CARGO_RESULT = ${CARGO_RESULT} || $?))
32-
mv target/nextest/ci/junit.xml $2
32+
if [[ -f "results.xml" ]]; then
33+
mv results.xml previous.xml
34+
merge-junit -o results.xml previous.xml target/nextest/ci/junit.xml
35+
else
36+
mv target/nextest/ci/junit.xml results.xml
37+
fi
3338
kill ${TAIL_PID}
3439
rm ${LOG_PATH}
3540
}

.evergreen/config.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,16 +1571,23 @@ functions:
15711571
params:
15721572
working_dir: src
15731573
shell: bash
1574-
add_expansions_to_env: true
1574+
include_expansions_in_env:
1575+
- DRIVERS_TOOLS
1576+
- PROJECT_DIRECTORY
1577+
- MONGODB_URI
1578+
- MONGOCRYPT_LIB_DIR
1579+
- OPENSSL
1580+
- OS
1581+
- LD_LIBRARY_PATH
1582+
- AWS_ACCESS_KEY_ID
1583+
- AWS_SECRET_ACCESS_KEY
1584+
- CSFLE_LOCAL_KEY
1585+
- CRYPT_SHARED_LIB_PATH
1586+
- DISABLE_CRYPT_SHARED
1587+
- AZURE_IMDS_MOCK_PORT
1588+
- SERVERLESS_ATLAS_USER
1589+
- SERVERLESS_ATLAS_PASSWORD
15751590
script: |
1576-
${PREPARE_SHELL}
1577-
1578-
# Exported without xtrace to avoid leaking credentials
1579-
set +o xtrace
1580-
export SERVERLESS_ATLAS_USER=${SERVERLESS_ATLAS_USER}
1581-
export SERVERLESS_ATLAS_PASSWORD=${SERVERLESS_ATLAS_PASSWORD}
1582-
set -o xtrace
1583-
15841591
export SINGLE_MONGOS_LB_URI=${SERVERLESS_URI}
15851592
. .evergreen/generate-uri.sh
15861593
export SERVERLESS=serverless

.evergreen/run-atlas-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ source "${DRIVERS_TOOLS}/.evergreen/secrets_handling/setup-secrets.sh" drivers/a
1212

1313
set +o errexit
1414

15-
cargo_test atlas_connectivity results.xml
15+
cargo_test atlas_connectivity
1616

1717
exit $CARGO_RESULT

.evergreen/run-aws-tests.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,10 @@ FEATURE_FLAGS+=("aws-auth")
1818

1919
set +o errexit
2020

21-
cargo_test auth_aws auth_aws.xml
22-
cargo_test lambda_examples::auth::test_handler lambda_handler.xml
23-
cargo_test spec::auth spec.xml
24-
cargo_test uri_options uri_options.xml
25-
cargo_test connection_string connection_string.xml
26-
27-
merge-junit -o results.xml auth_aws.xml lambda_handler.xml spec.xml uri_options.xml connection_string.xml
21+
cargo_test auth_aws
22+
cargo_test lambda_examples::auth::test_handler
23+
cargo_test spec::auth
24+
cargo_test uri_options
25+
cargo_test connection_string
2826

2927
exit $CARGO_RESULT

.evergreen/run-connection-string-tests.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ FEATURE_FLAGS+=("aws-auth")
1111

1212
set +o errexit
1313

14-
cargo_test spec::auth spec.xml
15-
cargo_test uri_options uri_options.xml
16-
cargo_test connection_string connection_string.xml
17-
18-
merge-junit -o results.xml spec.xml uri_options.xml connection_string.xml
14+
cargo_test spec::auth
15+
cargo_test uri_options
16+
cargo_test connection_string
1917

2018
exit ${CARGO_RESULT}

.evergreen/run-csfle-tests.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,12 @@ fi
2626

2727
set +o errexit
2828

29-
cargo_test test::csfle prose.xml
30-
cargo_test test::spec::client_side_encryption spec.xml
29+
cargo_test test::csfle
30+
cargo_test test::spec::client_side_encryption
3131

3232
# Unset variables for on-demand credential failure tests.
3333
unset AWS_ACCESS_KEY_ID
3434
unset AWS_SECRET_ACCESS_KEY
35-
cargo_test test::csfle::on_demand_aws_failure failure.xml
36-
37-
merge-junit -o results.xml prose.xml spec.xml failure.xml
35+
cargo_test test::csfle::on_demand_aws_failure
3836

3937
exit ${CARGO_RESULT}

.evergreen/run-plain-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ source .evergreen/cargo-test.sh
88

99
set +o errexit
1010

11-
MONGO_PLAIN_AUTH_TEST=1 cargo_test plain results.xml
11+
MONGO_PLAIN_AUTH_TEST=1 cargo_test plain
1212

1313
exit $CARGO_RESULT

.evergreen/run-search-index-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ export INDEX_MANAGEMENT_TEST_PROSE=1
1313

1414
set +o errexit
1515

16-
cargo_test test::spec::index_management results.xml
16+
cargo_test test::spec::index_management
1717

1818
exit ${CARGO_RESULT}

.evergreen/run-serverless-tests.sh

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,15 @@ export SERVERLESS="serverless"
1010

1111
set +o errexit
1212

13-
cargo_test test::spec::crud crud.xml
14-
cargo_test test::spec::retryable_reads retryable_reads.xml
15-
cargo_test test::spec::retryable_writes retryable_writes.xml
16-
cargo_test test::spec::versioned_api versioned_api.xml
17-
cargo_test test::spec::sessions sessions.xml
18-
cargo_test test::spec::transactions transactions.xml
19-
cargo_test test::spec::load_balancers load_balancers.xml
20-
cargo_test test::cursor cursor.xml
21-
cargo_test test::spec::collection_management coll.xml
22-
cargo_test test::spec::command_monitoring_unified monitoring.xml
23-
24-
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
13+
cargo_test test::spec::crud
14+
cargo_test test::spec::retryable_reads
15+
cargo_test test::spec::retryable_writes
16+
cargo_test test::spec::versioned_api
17+
cargo_test test::spec::sessions
18+
cargo_test test::spec::transactions
19+
cargo_test test::spec::load_balancers
20+
cargo_test test::cursor
21+
cargo_test test::spec::collection_management
22+
cargo_test test::spec::command_monitoring_unified
2523

2624
exit $CARGO_RESULT

.evergreen/run-sync-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ echo "cargo test options: $(cargo_test_options)"
1212

1313
set +o errexit
1414

15-
cargo_test sync results.xml
15+
cargo_test sync
1616

1717
exit $CARGO_RESULT

0 commit comments

Comments
 (0)