Skip to content
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
87 changes: 53 additions & 34 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ timeout:
args: [ls, -la]

functions:
assume-test-secrets-ec2-role:
assume-test-secrets-ec2-role:
- command: ec2.assume_role
params:
role_arn: ${aws_test_secrets_role}
Expand Down Expand Up @@ -121,21 +121,21 @@ functions:
params:
binary: bash
add_expansions_to_env: true
args:
args:
- ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/pull-mongohouse-image.sh
- command: subprocess.exec
params:
binary: bash
args:
args:
- ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/run-mongohouse-image.sh

bootstrap-mongo-orchestration:
- command: subprocess.exec
params:
binary: bash
env:
env:
MONGODB_VERSION: ${VERSION}
include_expansions_in_env: [TOPOLOGY, AUTH, SSL, ORCHESTRATION_FILE,
include_expansions_in_env: [TOPOLOGY, AUTH, SSL, ORCHESTRATION_FILE,
REQUIRE_API_VERSION, LOAD_BALANCER]
args: ["${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh"]
- command: expansions.update
Expand All @@ -146,7 +146,7 @@ functions:
- command: subprocess.exec
params:
binary: bash
env:
env:
MONGODB_VERSION: ${VERSION}
include_expansions_in_env: [TOPOLOGY, AUTH, SSL, ORCHESTRATION_FILE]
args: ["${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh"]
Expand All @@ -158,23 +158,23 @@ functions:
- command: subprocess.exec
params:
binary: bash
args:
args:
# Ensure the instance profile is reassigned for aws tests.
- ${DRIVERS_TOOLS}/.evergreen/auth_aws/teardown.sh
- command: subprocess.exec
params:
binary: bash
args:
args:
- ${DRIVERS_TOOLS}/.evergreen/csfle/teardown.sh
- command: subprocess.exec
params:
binary: bash
args:
args:
- ${DRIVERS_TOOLS}/.evergreen/ocsp/teardown.sh
- command: subprocess.exec
params:
binary: bash
args:
args:
- ${DRIVERS_TOOLS}/.evergreen/teardown.sh

assume-test-secrets-ec2-role:
Expand Down Expand Up @@ -284,7 +284,7 @@ functions:
params:
binary: bash
include_expansions_in_env: [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
env:
env:
TEST_ENTERPRISE_AUTH: plain
args: [*task-runner, setup-test]
- command: subprocess.exec
Expand All @@ -302,7 +302,7 @@ functions:
params:
binary: bash
include_expansions_in_env: [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
env:
env:
TEST_ENTERPRISE_AUTH: gssapi
args: [*task-runner, setup-test]
- command: subprocess.exec
Expand Down Expand Up @@ -334,7 +334,7 @@ functions:
- command: subprocess.exec
params:
binary: bash
env:
env:
TOPOLOGY: server
AUTH: auth
SSL: ssl
Expand All @@ -352,9 +352,9 @@ functions:
- command: subprocess.exec
params:
binary: bash
env:
env:
GO_BUILD_TAGS: cse
include_expansions_in_env: [AUTH, SSL, MONGODB_URI, TOPOLOGY, MONGO_GO_DRIVER_COMPRESSOR,
include_expansions_in_env: [AUTH, SSL, MONGODB_URI, TOPOLOGY, MONGO_GO_DRIVER_COMPRESSOR,
REQUIRE_API_VERSION, SKIP_CRYPT_SHARED_LIB, CRYPT_SHARED_LIB_PATH]
args: [*task-runner, setup-test]
- command: subprocess.exec
Expand All @@ -369,7 +369,7 @@ functions:
params:
binary: bash
include_expansions_in_env: [SINGLE_MONGOS_LB_URI, MULTI_MONGOS_LB_URI, AUTH, SSL, MONGO_GO_DRIVER_COMPRESSOR]
env:
env:
LOAD_BALANCER: "true"
args: [*task-runner, setup-test]
- command: subprocess.exec
Expand All @@ -391,7 +391,7 @@ functions:
type: test
params:
binary: "bash"
env:
env:
TOPOLOGY: sharded_cluster
TASKFILE_TARGET: test-short
args: [*task-runner, run-docker]
Expand Down Expand Up @@ -451,7 +451,7 @@ functions:
params:
include_expansions_in_env: ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
binary: "bash"
args:
args:
- ${DRIVERS_TOOLS}/.evergreen/auth_aws/setup-secrets.sh

run-aws-auth-test-with-regular-aws-credentials:
Expand All @@ -476,7 +476,7 @@ functions:
- command: subprocess.exec
type: test
params:
binary: bash
binary: bash
include_expansions_in_env: [SKIP_EC2_AUTH_TEST]
env:
AWS_TEST: ec2
Expand Down Expand Up @@ -521,7 +521,7 @@ functions:
type: test
params:
binary: bash
env:
env:
AWS_ROLE_SESSION_NAME: test
AWS_TEST: web-identity
include_expansions_in_env: [SKIP_WEB_IDENTITY_AUTH_TEST]
Expand All @@ -548,9 +548,9 @@ functions:
- command: subprocess.exec
params:
binary: "bash"
env:
env:
GO_BUILD_TAGS: cse
include_expansions_in_env: [AUTH, SSL, MONGODB_URI, TOPOLOGY,
include_expansions_in_env: [AUTH, SSL, MONGODB_URI, TOPOLOGY,
MONGO_GO_DRIVER_COMPRESSOR]
args: [*task-runner, setup-test]
- command: subprocess.exec
Expand All @@ -565,9 +565,9 @@ functions:
- command: subprocess.exec
params:
binary: "bash"
env:
env:
GO_BUILD_TAGS: cse
include_expansions_in_env: [AUTH, SSL, MONGODB_URI, TOPOLOGY,
include_expansions_in_env: [AUTH, SSL, MONGODB_URI, TOPOLOGY,
MONGO_GO_DRIVER_COMPRESSOR]
args: [*task-runner, setup-test]
- command: subprocess.exec
Expand All @@ -583,9 +583,9 @@ functions:
- command: subprocess.exec
params:
binary: "bash"
env:
env:
GO_BUILD_TAGS: cse
include_expansions_in_env: [AUTH, SSL, MONGODB_URI, TOPOLOGY,
include_expansions_in_env: [AUTH, SSL, MONGODB_URI, TOPOLOGY,
MONGO_GO_DRIVER_COMPRESSOR]
args: [*task-runner, setup-test]
- command: subprocess.exec
Expand Down Expand Up @@ -639,7 +639,7 @@ tasks:
- name: backport-pr
allowed_requesters: ["commit"]
commands:
- func: "backport pr"
- func: "backport pr"

- name: perf
tags: ["performance"]
Expand Down Expand Up @@ -1150,6 +1150,15 @@ tasks:
- func: bootstrap-mongo-orchestration
- func: run-docker-test

- name: test-containerized
tags: ["pullrequest"]
commands:
- command: subprocess.exec
type: test
params:
binary: bash
args: [*task-runner, test-containerized]

- name: test-goroutine-leaks-replicaset
tags: ["goleak"]
commands:
Expand Down Expand Up @@ -1432,7 +1441,7 @@ tasks:
vars:
MONGO_GO_DRIVER_COMPRESSOR: "snappy"

# Build the compilecheck submodule with all supported versions of Go >=
# Build the compilecheck submodule with all supported versions of Go >=
# the minimum supported version.
- name: go-build
tags: ["compile-check"]
Expand Down Expand Up @@ -1623,7 +1632,7 @@ tasks:
params:
binary: "bash"
add_expansions_to_env: true
env:
env:
EXPECT_ERROR: 'status=400'
args: [*task-runner, test-awskms]

Expand Down Expand Up @@ -1875,13 +1884,13 @@ task_groups:
params:
binary: "bash"
add_expansions_to_env: true
args:
args:
- ${DRIVERS_TOOLS}/.evergreen/csfle/gcpkms/setup.sh
teardown_group:
- command: subprocess.exec
params:
binary: "bash"
args:
args:
- ${DRIVERS_TOOLS}/.evergreen/csfle/gcpkms/teardown.sh
- func: teardown
- func: handle-test-artifacts
Expand All @@ -1899,15 +1908,15 @@ task_groups:
params:
binary: bash
add_expansions_to_env: true
env:
env:
AZUREKMS_VMNAME_PREFIX: GODRIVER
args:
- ${DRIVERS_TOOLS}/.evergreen/csfle/azurekms/setup.sh
teardown_group:
- command: subprocess.exec
params:
binary: "bash"
args:
args:
- ${DRIVERS_TOOLS}/.evergreen/csfle/azurekms/teardown.sh
- func: teardown
- func: handle-test-artifacts
Expand Down Expand Up @@ -2133,7 +2142,7 @@ buildvariants:
- rhel8.7-small
expansions:
GO_DIST: "/opt/golang/go1.25"
tasks:
tasks:
- name: "backport-pr"

- name: atlas-test
Expand Down Expand Up @@ -2166,6 +2175,16 @@ buildvariants:
tasks:
- name: ".goleak"

- name: containerized-tests
tags: ["pullrequest"]
display_name: "Containerized Tests"
run_on:
- ubuntu2204-large
expansions:
GO_DIST: "/opt/golang/go1.25"
tasks:
- name: "test-containerized"

- matrix_name: "tests-rhel-44-plus-zlib-zstd-support"
tags: ["pullrequest"]
matrix_spec: { version: ["4.2", "4.4", "5.0", "6.0", "7.0", "8.0"], os-ssl-40: ["rhel87-64"] }
Expand Down
6 changes: 3 additions & 3 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# See https://taskfile.dev/usage/
version: '3'
version: "3"

env:
TEST_TIMEOUT: 1800
LONG_TEST_TIMEOUT: 3600

dotenv: ['.test.env']
dotenv: [".test.env"]

tasks:

### Utility tasks. ###
default:
deps: [build, check-license, check-fmt, check-modules, lint, test-short]
Expand Down Expand Up @@ -115,6 +114,7 @@ tasks:

test-goleak: bash etc/run-goleak-test.sh

test-containerized: bash etc/run-containerized-tests.sh
### Local FaaS tasks. ###
build-faas-awslambda:
requires:
Expand Down
26 changes: 26 additions & 0 deletions etc/run-containerized-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
# Run containerized tests
set -eux

echo "Running internal/test"

# Defaults so -u doesn't explode if these aren't provided
: "${TEST_TIMEOUT:=1800}" # seconds
: "${BUILD_TAGS:=}" # optional build tags
: "${PKG_CONFIG_PATH:=}"
: "${LD_LIBRARY_PATH:=}"
: "${MACOS_LIBRARY_PATH:=}"

# Only add -tags if BUILD_TAGS is non-empty
tags=()
if [ -n "$BUILD_TAGS" ]; then
tags=("$BUILD_TAGS")
fi

pushd internal/test
# Run tests with env on the go process so both build and run see it
env PKG_CONFIG_PATH="$PKG_CONFIG_PATH" \
LD_LIBRARY_PATH="$LD_LIBRARY_PATH" \
DYLD_LIBRARY_PATH="$MACOS_LIBRARY_PATH" \
go test ${tags[@]+"${tags[@]}"} -v -timeout "${TEST_TIMEOUT}s" -p 1 . >>../../test.suite
popd
1 change: 1 addition & 0 deletions go.work
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ use (
./internal/cmd/faas/awslambda/mongodb
./internal/test/compilecheck
./internal/test/goleak
./internal/test
)
2 changes: 1 addition & 1 deletion internal/test/compilecheck/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module go.mongodb.go/mongo-driver/v2/internal/test/compilecheck
module go.mongodb.org/mongo-driver/v2/internal/test/compilecheck

go 1.25.0

Expand Down
Loading
Loading