Skip to content

Commit d4e33c5

Browse files
authored
CSHARP-5122: Rotate credentials in Atlas testing URIs (#1346)
1 parent 831573f commit d4e33c5

File tree

2 files changed

+12
-28
lines changed

2 files changed

+12
-28
lines changed

evergreen/evergreen.yml

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,7 @@ functions:
108108
script: |
109109
${PREPARE_SHELL}
110110
rm -rf $DRIVERS_TOOLS
111-
if [ "${project}" = "drivers-tools" ]; then
112-
# If this was a patch build, doing a fresh clone would not actually test the patch
113-
cp -R ${PROJECT_DIRECTORY}/ $DRIVERS_TOOLS
114-
else
115-
git clone https://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS
116-
fi
111+
git clone https://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS
117112
echo "{ \"releases\": { \"default\": \"$MONGODB_BINARIES\" }}" > $MONGO_ORCHESTRATION_HOME/orchestration.config
118113
119114
# Upload build artifacts that other tasks may depend on
@@ -463,22 +458,10 @@ functions:
463458
- command: shell.exec
464459
type: test
465460
params:
466-
silent: true
461+
shell: "bash"
467462
working_dir: mongo-csharp-driver
468-
include_expansions_in_env:
469-
- "ATLAS_FREE"
470-
- "ATLAS_FREE_SRV"
471-
- "ATLAS_REPLICA"
472-
- "ATLAS_REPLICA_SRV"
473-
- "ATLAS_SHARDED"
474-
- "ATLAS_SHARDED_SRV"
475-
- "ATLAS_TLS11"
476-
- "ATLAS_TLS11_SRV"
477-
- "ATLAS_TLS12"
478-
- "ATLAS_TLS12_SRV"
479-
- "ATLAS_SERVERLESS"
480-
- "ATLAS_SERVERLESS_SRV"
481463
script: |
464+
. ${DRIVERS_TOOLS}/.evergreen/secrets_handling/setup-secrets.sh drivers/atlas_connect
482465
. evergreen/run-atlas-connectivity-tests.sh
483466
484467
run-gssapi-auth-tests:
@@ -1282,6 +1265,7 @@ tasks:
12821265

12831266
- name: atlas-connectivity-tests
12841267
commands:
1268+
- func: assume-ec2-role
12851269
- func: run-atlas-connectivity-tests
12861270

12871271
- name: test-gssapi

tests/AtlasConnectivity.Tests/ConnectivityTests.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,18 @@ public ConnectivityTests(ITestOutputHelper testOutputHelper)
3434

3535
// public methods
3636
[Theory]
37+
[InlineData("ATLAS_REPL")]
38+
[InlineData("ATLAS_SHRD")]
3739
[InlineData("ATLAS_FREE")]
38-
[InlineData("ATLAS_FREE_SRV")]
39-
[InlineData("ATLAS_REPLICA")]
40-
[InlineData("ATLAS_REPLICA_SRV")]
41-
[InlineData("ATLAS_SHARDED")]
42-
[InlineData("ATLAS_SHARDED_SRV")]
4340
[InlineData("ATLAS_TLS11")]
44-
[InlineData("ATLAS_TLS11_SRV")]
4541
[InlineData("ATLAS_TLS12")]
46-
[InlineData("ATLAS_TLS12_SRV")]
4742
[InlineData("ATLAS_SERVERLESS")]
48-
[InlineData("ATLAS_SERVERLESS_SRV")]
43+
[InlineData("ATLAS_SRV_REPL")]
44+
[InlineData("ATLAS_SRV_SHRD")]
45+
[InlineData("ATLAS_SRV_FREE")]
46+
[InlineData("ATLAS_SRV_TLS11")]
47+
[InlineData("ATLAS_SRV_TLS12")]
48+
[InlineData("ATLAS_SRV_SERVERLESS")]
4949
public void Connection_to_Atlas_should_work(string environmentVariableName)
5050
{
5151
var connectionString = Environment.GetEnvironmentVariable(environmentVariableName);

0 commit comments

Comments
 (0)