Skip to content

Commit abad47a

Browse files
authored
RUST-1634 Unskip the AWS auth tests (#865)
1 parent 73a6d72 commit abad47a

File tree

4 files changed

+101
-112
lines changed

4 files changed

+101
-112
lines changed

.evergreen/MSRV-Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.evergreen/config.yml

Lines changed: 94 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -934,24 +934,23 @@ tasks:
934934
TOPOLOGY: "sharded_cluster"
935935
- func: "run tests"
936936

937-
# TODO RUST-1634 Enable this when AWS auth on evergreen is fixed
938-
#- name: "test-4.4-aws-auth"
939-
# # "4.4" explicitly left off to keep this out of the generic matrix
940-
# tags: ["aws-auth"]
941-
# commands:
942-
# - func: "bootstrap mongo-orchestration"
943-
# vars:
944-
# ORCHESTRATION_FILE: "auth-aws.json"
945-
# MONGODB_VERSION: "4.4"
946-
# AUTH: "auth"
947-
# TOPOLOGY: "server"
948-
# - func: "add aws auth variables to file"
949-
# - func: "run aws auth test with regular aws credentials"
950-
# - func: "run aws auth test with assume role credentials"
951-
# - func: "run aws auth test with aws credentials as environment variables"
952-
# - func: "run aws auth test with aws credentials and session token as environment variables"
953-
# - func: "run aws auth test with aws EC2 credentials"
954-
# - func: "run aws ECS auth test"
937+
- name: "test-4.4-aws-auth"
938+
# "4.4" explicitly left off to keep this out of the generic matrix
939+
tags: ["aws-auth"]
940+
commands:
941+
- func: "bootstrap mongo-orchestration"
942+
vars:
943+
ORCHESTRATION_FILE: "auth-aws.json"
944+
MONGODB_VERSION: "4.4"
945+
AUTH: "auth"
946+
TOPOLOGY: "server"
947+
- func: "add aws auth variables to file"
948+
- func: "run aws auth test with regular aws credentials"
949+
- func: "run aws auth test with assume role credentials"
950+
- func: "run aws auth test with aws credentials as environment variables"
951+
- func: "run aws auth test with aws credentials and session token as environment variables"
952+
- func: "run aws auth test with aws EC2 credentials"
953+
- func: "run aws ECS auth test"
955954

956955
- name: "test-5.0-standalone"
957956
tags: ["5.0", "standalone"]
@@ -995,24 +994,23 @@ tasks:
995994
- func: "start load balancer"
996995
- func: "run tests"
997996

998-
# TODO RUST-1634 Enable this when AWS auth on evergreen is fixed
999-
#- name: "test-5.0-aws-auth"
1000-
# # "5.0" explicitly left off to keep this out of the generic matrix
1001-
# tags: ["aws-auth"]
1002-
# commands:
1003-
# - func: "bootstrap mongo-orchestration"
1004-
# vars:
1005-
# ORCHESTRATION_FILE: "auth-aws.json"
1006-
# MONGODB_VERSION: "5.0"
1007-
# AUTH: "auth"
1008-
# TOPOLOGY: "server"
1009-
# - func: "add aws auth variables to file"
1010-
# - func: "run aws auth test with regular aws credentials"
1011-
# - func: "run aws auth test with assume role credentials"
1012-
# - func: "run aws auth test with aws credentials as environment variables"
1013-
# - func: "run aws auth test with aws credentials and session token as environment variables"
1014-
# - func: "run aws auth test with aws EC2 credentials"
1015-
# - func: "run aws ECS auth test"
997+
- name: "test-5.0-aws-auth"
998+
# "5.0" explicitly left off to keep this out of the generic matrix
999+
tags: ["aws-auth"]
1000+
commands:
1001+
- func: "bootstrap mongo-orchestration"
1002+
vars:
1003+
ORCHESTRATION_FILE: "auth-aws.json"
1004+
MONGODB_VERSION: "5.0"
1005+
AUTH: "auth"
1006+
TOPOLOGY: "server"
1007+
- func: "add aws auth variables to file"
1008+
- func: "run aws auth test with regular aws credentials"
1009+
- func: "run aws auth test with assume role credentials"
1010+
- func: "run aws auth test with aws credentials as environment variables"
1011+
- func: "run aws auth test with aws credentials and session token as environment variables"
1012+
- func: "run aws auth test with aws EC2 credentials"
1013+
- func: "run aws ECS auth test"
10161014

10171015
- name: "test-6.0-standalone"
10181016
tags: ["6.0", "standalone"]
@@ -1056,24 +1054,23 @@ tasks:
10561054
- func: "start load balancer"
10571055
- func: "run tests"
10581056

1059-
# TODO RUST-1634 Enable this when AWS auth on evergreen is fixed
1060-
#- name: "test-6.0-aws-auth"
1061-
# # "6.0" explicitly left off to keep this out of the generic matrix
1062-
# tags: ["aws-auth"]
1063-
# commands:
1064-
# - func: "bootstrap mongo-orchestration"
1065-
# vars:
1066-
# ORCHESTRATION_FILE: "auth-aws.json"
1067-
# MONGODB_VERSION: "6.0"
1068-
# AUTH: "auth"
1069-
# TOPOLOGY: "server"
1070-
# - func: "add aws auth variables to file"
1071-
# - func: "run aws auth test with regular aws credentials"
1072-
# - func: "run aws auth test with assume role credentials"
1073-
# - func: "run aws auth test with aws credentials as environment variables"
1074-
# - func: "run aws auth test with aws credentials and session token as environment variables"
1075-
# - func: "run aws auth test with aws EC2 credentials"
1076-
# - func: "run aws ECS auth test"
1057+
- name: "test-6.0-aws-auth"
1058+
# "6.0" explicitly left off to keep this out of the generic matrix
1059+
tags: ["aws-auth"]
1060+
commands:
1061+
- func: "bootstrap mongo-orchestration"
1062+
vars:
1063+
ORCHESTRATION_FILE: "auth-aws.json"
1064+
MONGODB_VERSION: "6.0"
1065+
AUTH: "auth"
1066+
TOPOLOGY: "server"
1067+
- func: "add aws auth variables to file"
1068+
- func: "run aws auth test with regular aws credentials"
1069+
- func: "run aws auth test with assume role credentials"
1070+
- func: "run aws auth test with aws credentials as environment variables"
1071+
- func: "run aws auth test with aws credentials and session token as environment variables"
1072+
- func: "run aws auth test with aws EC2 credentials"
1073+
- func: "run aws ECS auth test"
10771074

10781075
- name: "test-rapid-standalone"
10791076
tags: ["rapid", "standalone"]
@@ -1117,24 +1114,23 @@ tasks:
11171114
- func: "start load balancer"
11181115
- func: "run tests"
11191116

1120-
# TODO RUST-1634 Enable this when AWS auth on evergreen is fixed
1121-
#- name: "test-rapid-aws-auth"
1122-
# # "rapid" explicitly left off to keep this out of the generic matrix
1123-
# tags: ["aws-auth"]
1124-
# commands:
1125-
# - func: "bootstrap mongo-orchestration"
1126-
# vars:
1127-
# ORCHESTRATION_FILE: "auth-aws.json"
1128-
# MONGODB_VERSION: "rapid"
1129-
# AUTH: "auth"
1130-
# TOPOLOGY: "server"
1131-
# - func: "add aws auth variables to file"
1132-
# - func: "run aws auth test with regular aws credentials"
1133-
# - func: "run aws auth test with assume role credentials"
1134-
# - func: "run aws auth test with aws credentials as environment variables"
1135-
# - func: "run aws auth test with aws credentials and session token as environment variables"
1136-
# - func: "run aws auth test with aws EC2 credentials"
1137-
# - func: "run aws ECS auth test"
1117+
- name: "test-rapid-aws-auth"
1118+
# "rapid" explicitly left off to keep this out of the generic matrix
1119+
tags: ["aws-auth"]
1120+
commands:
1121+
- func: "bootstrap mongo-orchestration"
1122+
vars:
1123+
ORCHESTRATION_FILE: "auth-aws.json"
1124+
MONGODB_VERSION: "rapid"
1125+
AUTH: "auth"
1126+
TOPOLOGY: "server"
1127+
- func: "add aws auth variables to file"
1128+
- func: "run aws auth test with regular aws credentials"
1129+
- func: "run aws auth test with assume role credentials"
1130+
- func: "run aws auth test with aws credentials as environment variables"
1131+
- func: "run aws auth test with aws credentials and session token as environment variables"
1132+
- func: "run aws auth test with aws EC2 credentials"
1133+
- func: "run aws ECS auth test"
11381134

11391135
- name: "test-latest-standalone"
11401136
tags: ["latest", "standalone"]
@@ -1179,24 +1175,23 @@ tasks:
11791175
- func: "run tests"
11801176

11811177

1182-
# TODO RUST-1634 Enable this when AWS auth on evergreen is fixed
1183-
#- name: "test-latest-aws-auth"
1184-
# # "latest" explicitly left off to keep this out of the generic matrix
1185-
# tags: ["aws-auth"]
1186-
# commands:
1187-
# - func: "bootstrap mongo-orchestration"
1188-
# vars:
1189-
# ORCHESTRATION_FILE: "auth-aws.json"
1190-
# MONGODB_VERSION: "latest"
1191-
# AUTH: "auth"
1192-
# TOPOLOGY: "server"
1193-
# - func: "add aws auth variables to file"
1194-
# - func: "run aws auth test with regular aws credentials"
1195-
# - func: "run aws auth test with assume role credentials"
1196-
# - func: "run aws auth test with aws credentials as environment variables"
1197-
# - func: "run aws auth test with aws credentials and session token as environment variables"
1198-
# - func: "run aws auth test with aws EC2 credentials"
1199-
# - func: "run aws ECS auth test"
1178+
- name: "test-latest-aws-auth"
1179+
# "latest" explicitly left off to keep this out of the generic matrix
1180+
tags: ["aws-auth"]
1181+
commands:
1182+
- func: "bootstrap mongo-orchestration"
1183+
vars:
1184+
ORCHESTRATION_FILE: "auth-aws.json"
1185+
MONGODB_VERSION: "latest"
1186+
AUTH: "auth"
1187+
TOPOLOGY: "server"
1188+
- func: "add aws auth variables to file"
1189+
- func: "run aws auth test with regular aws credentials"
1190+
- func: "run aws auth test with assume role credentials"
1191+
- func: "run aws auth test with aws credentials as environment variables"
1192+
- func: "run aws auth test with aws credentials and session token as environment variables"
1193+
- func: "run aws auth test with aws EC2 credentials"
1194+
- func: "run aws ECS auth test"
12001195

12011196
- name: "test-connection-string"
12021197
commands:
@@ -2080,16 +2075,15 @@ buildvariants:
20802075
tasks:
20812076
- ".atlas-connect"
20822077

2083-
# TODO RUST-1634 Enable this when AWS auth on evergreen is fixed
2084-
#- matrix_name: "aws-auth"
2085-
# matrix_spec:
2086-
# os:
2087-
# - ubuntu-18.04
2088-
# async-runtime: "tokio"
2089-
# display_name: "${os} AWS Auth with ${async-runtime}"
2090-
# tasks:
2091-
# - ".aws-auth"
2092-
# - "test-connection-string"
2078+
- matrix_name: "aws-auth"
2079+
matrix_spec:
2080+
os:
2081+
- ubuntu-18.04
2082+
async-runtime: "tokio"
2083+
display_name: "${os} AWS Auth with ${async-runtime}"
2084+
tasks:
2085+
- ".aws-auth"
2086+
- "test-connection-string"
20932087

20942088
# TODO: RUST-361 enable these tests once OCSP support is implemented
20952089
# - matrix_name: "ocsp"

.evergreen/run-csfle-tests.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,10 @@ cargo_test test::csfle > prose.xml
3939
cargo_test test::spec::client_side_encryption > spec.xml
4040

4141
# Unset variables for on-demand credential failure tests.
42-
# TODO RUST-1634 Enable this once AWS on evergreen is fixed
43-
# unset AWS_ACCESS_KEY_ID
44-
# unset AWS_SECRET_ACCESS_KEY
45-
# cargo_test test::csfle::on_demand_aws_failure > failure.xml
42+
unset AWS_ACCESS_KEY_ID
43+
unset AWS_SECRET_ACCESS_KEY
44+
cargo_test test::csfle::on_demand_aws_failure > failure.xml
4645

47-
junit-report-merger results.xml prose.xml spec.xml # failure.xml
46+
junit-report-merger results.xml prose.xml spec.xml failure.xml
4847

4948
exit ${CARGO_RESULT}

src/test/csfle.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2820,11 +2820,7 @@ async fn on_demand_aws_failure() -> Result<()> {
28202820
})
28212821
.run()
28222822
.await;
2823-
assert!(
2824-
result.as_ref().unwrap_err().is_auth_error(),
2825-
"Expected auth error, got {:?}",
2826-
result
2827-
);
2823+
assert!(result.is_err(), "Expected error, got {:?}", result);
28282824

28292825
Ok(())
28302826
}

0 commit comments

Comments
 (0)