Skip to content

Commit 63c8785

Browse files
author
Oleksandr Poliakov
committed
ff
1 parent a0823d4 commit 63c8785

File tree

3 files changed

+2582
-14
lines changed

3 files changed

+2582
-14
lines changed

evergreen/evergreen.yml

Lines changed: 86 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ functions:
101101
params:
102102
script: |
103103
${PREPARE_SHELL}
104-
bash ${PROJECT_DIRECTORY}/evergreen/install-dotnet.sh
104+
OS=${OS} bash ${PROJECT_DIRECTORY}/evergreen/install-dotnet.sh
105105
106106
prepare-resources:
107107
- command: shell.exec
@@ -1255,11 +1255,27 @@ tasks:
12551255
commands:
12561256
- func: run-atlas-search-index-helpers-test
12571257

1258-
- name: test-oidc-auth-aws
1258+
- name: test-oidc-auth
12591259
commands:
1260-
- func: assume-ec2-role
12611260
- func: run-mongodb-oidc-tests
12621261

1262+
- name: test-oidc-azure
1263+
commands:
1264+
- command: shell.exec
1265+
params:
1266+
shell: bash
1267+
working_dir: mongo-csharp-driver
1268+
script: |-
1269+
set -o errexit
1270+
${PREPARE_SHELL}
1271+
1272+
dotnet build ./tests/MongoDB.Driver.Tests/MongoDB.Driver.Tests.csproj
1273+
tar czf /tmp/mongo-csharp-driver.tgz ./tests/MongoDB.Driver.Tests/bin/Debug/net6.0 ./evergreen/run-mongodb-oidc-azure-tests.sh
1274+
1275+
export AZUREOIDC_DRIVERS_TAR_FILE=/tmp/mongo-csharp-driver.tgz
1276+
export AZUREOIDC_TEST_CMD="./evergreen/run-mongodb-oidc-azure-tests.sh"
1277+
bash $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/run-driver-test.sh
1278+
12631279
- name: test-serverless
12641280
exec_timeout_secs: 2700 # 45 minutes: 15 for setup + 30 for tests
12651281
commands:
@@ -2124,6 +2140,61 @@ task_groups:
21242140
tasks:
21252141
- test-aws-lambda-deployed
21262142

2143+
- name: oidc-auth-test-task-group
2144+
setup_group_can_fail_task: true
2145+
setup_group_timeout_secs: 1800 # 30 minutes
2146+
setup_group:
2147+
- func: fetch-source
2148+
- func: prepare-resources
2149+
- func: fix-absolute-paths
2150+
- func: init-test-results
2151+
- func: make-files-executable
2152+
- func: assume-ec2-role
2153+
- command: subprocess.exec
2154+
params:
2155+
binary: bash
2156+
include_expansions_in_env:
2157+
- "AWS_ACCESS_KEY_ID"
2158+
- "AWS_SECRET_ACCESS_KEY"
2159+
- "AWS_SESSION_TOKEN"
2160+
args:
2161+
- ${DRIVERS_TOOLS}/.evergreen/auth_oidc/setup.sh
2162+
teardown_group:
2163+
- func: upload-test-results
2164+
- command: subprocess.exec
2165+
params:
2166+
binary: bash
2167+
args:
2168+
- ${DRIVERS_TOOLS}/.evergreen/auth_oidc/teardown.sh
2169+
tasks:
2170+
- test-oidc-auth
2171+
2172+
- name: oidc-auth-azure-task-group
2173+
setup_group_can_fail_task: true
2174+
setup_group_timeout_secs: 1800 # 30 minutes
2175+
setup_group:
2176+
- func: fetch-source
2177+
- func: prepare-resources
2178+
- func: fix-absolute-paths
2179+
- func: make-files-executable
2180+
- func: install-dotnet
2181+
- command: subprocess.exec
2182+
params:
2183+
binary: bash
2184+
env:
2185+
AZUREOIDC_VMNAME_PREFIX: "CSHARP_DRIVER"
2186+
args:
2187+
- ${DRIVERS_TOOLS}/.evergreen/auth_oidc/azure/create-and-setup-vm.sh
2188+
teardown_group:
2189+
- func: upload-test-results
2190+
- command: subprocess.exec
2191+
params:
2192+
binary: bash
2193+
args:
2194+
- ${DRIVERS_TOOLS}/.evergreen/auth_oidc/azure/delete-vm.sh
2195+
tasks:
2196+
- test-oidc-azure
2197+
21272198
buildvariants:
21282199
- matrix_name: stable-api-tests
21292200
matrix_spec: { version: ["5.0", "6.0", "7.0", "rapid", "latest"], topology: "standalone", auth: "auth", ssl: "nossl", os: "windows-64" }
@@ -2241,11 +2312,19 @@ buildvariants:
22412312
tasks:
22422313
- name: plain-auth-tests
22432314

2244-
- matrix_name: mongodb-oidc-tests
2245-
matrix_spec: { os: [ "windows-64", "ubuntu-2004", "macos-1100" ] }
2246-
display_name: "MongoDB-OIDC Auth tests - ${os}"
2315+
- matrix_name: mongodb-oidc-test-tests
2316+
matrix_spec: { os: [ "ubuntu-2004", "macos-1100" ] }
2317+
display_name: "MongoDB-OIDC Auth (test) - ${os}"
2318+
batchtime: 20160 # 14 days
2319+
tasks:
2320+
- name: oidc-auth-test-task-group
2321+
2322+
- matrix_name: mongodb-oidc-azure-tests
2323+
matrix_spec: { os: [ "ubuntu-2004" ] }
2324+
display_name: "MongoDB-OIDC Auth (azure) - ${os}"
2325+
batchtime: 20160 # 14 days
22472326
tasks:
2248-
- name: test-oidc-auth-aws
2327+
- name: oidc-auth-azure-task-group
22492328

22502329
- matrix_name: "ocsp-tests"
22512330
matrix_spec: { version: ["4.4", "5.0", "6.0", "7.0", "rapid", "latest"], auth: "noauth", ssl: "ssl", topology: "standalone", os: "windows-64" }

0 commit comments

Comments
 (0)