diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 903e5b9267..f6a39c21b8 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -57,6 +57,7 @@ functions: handle-test-artifacts: - command: gotest.parse_files params: + optional_output: "true" files: - "src/go.mongodb.org/mongo-driver/*.suite" - command: ec2.assume_role @@ -1932,7 +1933,10 @@ task_groups: - name: testoidc_task_group setup_group_can_fail_task: true setup_group_timeout_secs: 1800 - teardown_task_can_fail_task: true + # TODO(DRIVERS-3141): Uncomment the following line once the teardown bug is + # fixed. See DRIVERS-3141 for more context. + # + # teardown_task_can_fail_task: true teardown_group_timeout_secs: 180 # 3 minutes (max allowed time) setup_group: - func: setup-system diff --git a/Taskfile.yml b/Taskfile.yml index 223c845ef4..3fcf7a9293 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -199,7 +199,7 @@ tasks: evg-test-deployed-lambda-aws: bash ${DRIVERS_TOOLS}/.evergreen/aws_lambda/run-deployed-lambda-aws-tests.sh - evg-gather-test-suites: find . -name \*.suite | xargs tar czf test_suite.tgz + evg-gather-test-suites: find . -name \*.suite | xargs --no-run-if-empty tar czf test_suite.tgz build-kms-test: go build ${BUILD_TAGS} ./internal/cmd/testkms diff --git a/internal/cmd/testoidcauth/main.go b/internal/cmd/testoidcauth/main.go index a795d43717..e2564e5f75 100644 --- a/internal/cmd/testoidcauth/main.go +++ b/internal/cmd/testoidcauth/main.go @@ -8,6 +8,7 @@ package main import ( "context" + "errors" "fmt" "log" "os" @@ -1781,14 +1782,16 @@ func machine51azureWithNoUsername() error { func machine52azureWithBadUsername() error { opts := options.Client().ApplyURI(uriSingle) - cred := options.Credential{ - AuthMechanism: "MONGODB-OIDC", - Username: "bad", - } - opts.SetAuth(cred) + if opts == nil { return fmt.Errorf("machine_5_2: failed parsing uri: %q", uriSingle) } + if opts.Auth == nil || opts.Auth.AuthMechanism != "MONGODB-OIDC" { + return errors.New("machine_5_2: expected URI to contain MONGODB-OIDC auth information") + } + + opts.Auth.Username = "bad" + client, err := mongo.Connect(opts) if err != nil { return fmt.Errorf("machine_5_2: failed connecting client: %v", err)