Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7b6d574
chore: move oidcauth test from cmd to test directory
RafaelCenzano Jan 8, 2026
78b9a01
chore: update command to run test with go test
RafaelCenzano Jan 8, 2026
0d3e377
test: convert test to use go test framework
RafaelCenzano Jan 8, 2026
c456466
test: use test cleanup instead of defer
RafaelCenzano Jan 8, 2026
ccfada8
chore: reorder to match original ordering
RafaelCenzano Jan 8, 2026
f57e0dd
chore: revert some changes that differed from the original file
RafaelCenzano Jan 8, 2026
81f357e
chore: update path for oidc tests
RafaelCenzano Jan 9, 2026
80dcfaa
test: skip test on go test ./... calls
RafaelCenzano Jan 9, 2026
a652aa1
Merge branch 'master' into test/oidc-prose-test-as-go-test-godriver3517
RafaelCenzano Jan 9, 2026
6ee82ee
Merge branch 'master' into test/oidc-prose-test-as-go-test-godriver3517
RafaelCenzano Jan 9, 2026
6877a42
Merge branch 'master' into test/oidc-prose-test-as-go-test-godriver3517
RafaelCenzano Jan 14, 2026
8bfda66
test: use require of if blocks with fatal
RafaelCenzano Jan 14, 2026
4497464
test: correct accidental inverse
RafaelCenzano Jan 14, 2026
1050dc3
fix: require equal message for find
RafaelCenzano Jan 15, 2026
9cd3739
fix: require equal message for find
RafaelCenzano Jan 15, 2026
07fbc81
GODRIVER-3762: Bump golangci-lint to 2.8.0 (#2289)
RafaelCenzano Jan 15, 2026
acff7a8
GODRIVER-3759: Update CI windows tests to windows-2022-latest-small (…
RafaelCenzano Jan 15, 2026
0623607
fix: correct reversed require check
RafaelCenzano Jan 15, 2026
0fb24d4
Merge branch 'master' into test/oidc-prose-test-as-go-test-godriver3517
RafaelCenzano Jan 15, 2026
0bbd339
redirect test output to test.suite
RafaelCenzano Jan 21, 2026
18d7c49
Merge branch 'master' into test/oidc-prose-test-as-go-test-godriver3517
RafaelCenzano Jan 21, 2026
f02e325
test: ensure output of remote tests goes to test.suite
RafaelCenzano Jan 22, 2026
667c71d
fix: keep $1 for non external env test
RafaelCenzano Jan 22, 2026
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
6 changes: 3 additions & 3 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ tasks:
test-race:
- go test ${BUILD_TAGS} -timeout {{.TEST_TIMEOUT}}s -race -p 1 ./...
test-short: go test ${BUILD_TAGS} -timeout 60s -short -race ./...
test-oidc: bash etc/run-oidc-test.sh 'task --silent evg-test-oidc-auth'
test-oidc: bash etc/run-oidc-test.sh
test-oidc-remote: bash etc/run-oidc-remote-test.sh
test-atlas-connect:
- go test -v -run ^TestAtlas$ go.mongodb.org/mongo-driver/v2/internal/cmd/testatlas -tags atlastest >> test.suite
Expand All @@ -89,8 +89,8 @@ tasks:
evg-test-enterprise-auth:
- go run -tags gssapi ./internal/cmd/testentauth/main.go
evg-test-oidc-auth:
- go run ./internal/cmd/testoidcauth/main.go
- go run -race ./internal/cmd/testoidcauth/main.go
- go test -v ./internal/test/oidcauth/... >> test.suite
- go test -v -race ./internal/test/oidcauth/... >> test.suite
evg-test-kmip:
- go test -exec "env PKG_CONFIG_PATH=${PKG_CONFIG_PATH} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} DYLD_LIBRARY_PATH=${MACOS_LIBRARY_PATH}" ${BUILD_TAGS} -v -timeout {{.TEST_TIMEOUT}}s ./internal/integration -run TestClientSideEncryptionSpec/kmipKMS >> test.suite
- go test -exec "env PKG_CONFIG_PATH=${PKG_CONFIG_PATH} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} DYLD_LIBRARY_PATH=${MACOS_LIBRARY_PATH}" ${BUILD_TAGS} -v -timeout {{.TEST_TIMEOUT}}s ./internal/integration -run TestClientSideEncryptionProse/data_key_and_double_encryption >> test.suite
Expand Down
14 changes: 7 additions & 7 deletions etc/run-oidc-remote-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ echo "Running remote MONGODB-OIDC authentication tests on $OIDC_ENV"
DRIVERS_TAR_FILE=/tmp/mongo-go-driver.tar.gz
# we need to statically link libc to avoid the situation where the VM has a different
# version of libc
go build -tags osusergo,netgo -ldflags '-w -extldflags "-static -lgcc -lc"' -o test ./internal/cmd/testoidcauth/main.go
go test -c -tags osusergo,netgo -ldflags '-w -extldflags "-static -lgcc -lc"' -o test ./internal/test/oidcauth
rm "$DRIVERS_TAR_FILE" || true
tar -cf $DRIVERS_TAR_FILE ./test
tar -uf $DRIVERS_TAR_FILE ./etc
Expand All @@ -20,23 +20,23 @@ if [ $OIDC_ENV == "azure" ]; then
# Define the command to run on the azure VM.
# Ensure that we source the environment file created for us, set up any other variables we need,
# and then run our test suite on the vm.
export AZUREOIDC_TEST_CMD="PROJECT_DIRECTORY='.' OIDC_ENV=azure OIDC=oidc ./etc/run-oidc-test.sh ./test"
bash ${DRIVERS_TOOLS}/.evergreen/auth_oidc/azure/run-driver-test.sh
export AZUREOIDC_TEST_CMD="PROJECT_DIRECTORY='.' OIDC_ENV=azure OIDC=oidc ./etc/run-oidc-test.sh ./test -test.v"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[blocking] See #2283 (comment)

bash ${DRIVERS_TOOLS}/.evergreen/auth_oidc/azure/run-driver-test.sh >> test.suite

elif [ $OIDC_ENV == "gcp" ]; then
export GCPOIDC_DRIVERS_TAR_FILE=$DRIVERS_TAR_FILE
# Define the command to run on the gcp VM.
# Ensure that we source the environment file created for us, set up any other variables we need,
# and then run our test suite on the vm.
export GCPOIDC_TEST_CMD="PROJECT_DIRECTORY='.' OIDC_ENV=gcp OIDC=oidc ./etc/run-oidc-test.sh ./test"
bash ${DRIVERS_TOOLS}/.evergreen/auth_oidc/gcp/run-driver-test.sh
export GCPOIDC_TEST_CMD="PROJECT_DIRECTORY='.' OIDC_ENV=gcp OIDC=oidc ./etc/run-oidc-test.sh ./test -test.v"
bash ${DRIVERS_TOOLS}/.evergreen/auth_oidc/gcp/run-driver-test.sh >> test.suite

elif [ $OIDC_ENV == "k8s" ]; then
export K8S_VARIANT=${VARIANT}
export K8S_DRIVERS_TAR_FILE=$DRIVERS_TAR_FILE
export K8S_TEST_CMD="PROJECT_DIRECTORY='.' OIDC_ENV=k8s OIDC=oidc ./etc/run-oidc-test.sh ./test"
export K8S_TEST_CMD="PROJECT_DIRECTORY='.' OIDC_ENV=k8s OIDC=oidc ./etc/run-oidc-test.sh ./test -test.v"
bash ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/setup-pod.sh
bash ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/run-driver-test.sh
bash ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/run-driver-test.sh >> test.suite
bash ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/teardown-pod.sh

else
Expand Down
12 changes: 11 additions & 1 deletion etc/run-oidc-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,14 @@ export TEST_AUTH_OIDC=1
export COVERAGE=1
export AUTH="auth"

$1
# In the test environment, run the tests directly
# In other environments, run whatever command was passed as arguments
if [ $OIDC_ENV == "test" ]; then
go test -v ./internal/test/oidcauth/... >> test.suite
go test -v -race ./internal/test/oidcauth/... >> test.suite
else
# For non-test environments (azure, gcp, k8s), execute passed command if provided
if [ $# -gt 0 ]; then
"$@"
fi
fi
Loading
Loading