Skip to content

Commit

Permalink
add task
Browse files Browse the repository at this point in the history
  • Loading branch information
qingyang-hu committed Nov 12, 2024
1 parent 02a60a5 commit 21e958f
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,31 @@ functions:
KMS_MOCK_SERVERS_RUNNING: "true"
args: [*task-runner, evg-test-kmip]

start-kms-failpoint-server:
- command: subprocess.exec
params:
binary: python3
background: true
args: ["-u", "${DRIVERS_TOOLS}/.evergreen/csfle/kms_failpoint_server.py", "--port", "9003"]

run-retry-kms-requests:
- command: subprocess.exec
type: test
params:
binary: "bash"
env:
GO_BUILD_TAGS: cse
include_expansions_in_env: [AUTH, SSL, MONGODB_URI, TOPOLOGY,
MONGO_GO_DRIVER_COMPRESSOR]
args: [*task-runner, setup-test]
- command: subprocess.exec
type: test
params:
binary: "bash"
env:
KMS_FAILPOINT_SERVERS_RUNNING: "true"
args: [*task-runner, evg-test-retry-kms-requests]

run-fuzz-tests:
- command: subprocess.exec
type: test
Expand Down Expand Up @@ -1486,6 +1511,21 @@ tasks:
AUTH: "noauth"
SSL: "nossl"

- name: "test-retry-kms-requests"
tags: ["retry-kms-requests"]
commands:
- func: bootstrap-mongo-orchestration
vars:
TOPOLOGY: "server"
AUTH: "noauth"
SSL: "nossl"
- func: start-kms-failpoint-server
- func: run-retry-kms-requests
vars:
TOPOLOGY: "server"
AUTH: "noauth"
SSL: "nossl"

- name: "test-serverless"
tags: ["serverless"]
commands:
Expand Down
3 changes: 3 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ tasks:
evg-test-kms:
- go test -exec "env PKG_CONFIG_PATH=${PKG_CONFIG_PATH} LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" ${BUILD_TAGS} -v -timeout {{.TEST_TIMEOUT}}s ./internal/integration -run TestClientSideEncryptionProse/kms_tls_tests >> test.suite

evg-test-retry-kms-requests:
- go test -exec "env PKG_CONFIG_PATH=${PKG_CONFIG_PATH} LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" ${BUILD_TAGS} -v -timeout {{.TEST_TIMEOUT}}s ./internal/integration -run TestClientSideEncryptionProse/kms_retry_tests >> test.suite

evg-test-load-balancers:
# Load balancer should be tested with all unified tests as well as tests in the following
# components: retryable reads, retryable writes, change streams, initial DNS seedlist discovery.
Expand Down
7 changes: 6 additions & 1 deletion internal/integration/client_side_encryption_prose_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2983,7 +2983,12 @@ func TestClientSideEncryptionProse(t *testing.T) {
})
})

mt.RunOpts("24. KMS Retry Tests", qeRunOpts22, func(mt *mtest.T) {
mt.RunOpts("24. kms retry tests", qeRunOpts22, func(mt *mtest.T) {
kmsTlsTestcase := os.Getenv("KMS_FAILPOINT_SERVERS_RUNNING")
if kmsTlsTestcase == "" {
mt.Skipf("Skipping test as KMS_FAILPOINT_SERVERS_RUNNING is not set")
}

setFailPoint := func(failure string, count int) error {
url := fmt.Sprintf("https://localhost:9003/set_failpoint/%s", failure)
var payloadBuf bytes.Buffer
Expand Down

0 comments on commit 21e958f

Please sign in to comment.