diff --git a/.evergreen/run-mongodb-aws-test.sh b/.evergreen/run-mongodb-aws-test.sh index 9d5c71376d..a21b5c238f 100644 --- a/.evergreen/run-mongodb-aws-test.sh +++ b/.evergreen/run-mongodb-aws-test.sh @@ -21,4 +21,4 @@ set -x # For Go 1.16+, Go builds requires a go.mod file in the current working directory or a parent # directory. Spawn a new subshell, "cd" to the project directory, then run "go run". -(cd ${PROJECT_DIRECTORY} && go run "./cmd/testaws/main.go" | tee test.suite) +(cd ${PROJECT_DIRECTORY} && go run "./internal/cmd/testaws/main.go" | tee test.suite) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c13963a748..d1822ef78e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,7 +41,7 @@ repos: hooks: - id: codespell args: ["-L", "te,fo,fle,alo,nin,compres,wil,collone,asess,sav,ot,wll,dne,nulll,hellow"] - exclude: ^(vendor/|benchmark/operation_test.go) + exclude: ^(vendor/|internal/benchmark/operation_test.go) exclude_types: [json,yaml,pem] - repo: https://github.com/golangci/golangci-lint diff --git a/Makefile b/Makefile index 77df091002..344531a305 100644 --- a/Makefile +++ b/Makefile @@ -107,12 +107,12 @@ test-short: .PHONY: build-faas-awslambda build-faas-awslambda: $(if $(MONGODB_URI),,$(error MONGODB_URI is not set)) - $(MAKE) -C internal/test/faas/awslambda + $(MAKE) -C internal/cmd/faas/awslambda ### Evergreen specific targets. ### .PHONY: build-aws-ecs-test build-aws-ecs-test: - go build $(BUILD_TAGS) ./cmd/testaws/main.go + go build $(BUILD_TAGS) ./internal/cmd/testaws/main.go .PHONY: evg-test evg-test: @@ -120,40 +120,40 @@ evg-test: .PHONY: evg-test-atlas-data-lake evg-test-atlas-data-lake: - ATLAS_DATA_LAKE_INTEGRATION_TEST=true go test -v ./mongo/integration -run TestUnifiedSpecs/atlas-data-lake-testing >> spec_test.suite - ATLAS_DATA_LAKE_INTEGRATION_TEST=true go test -v ./mongo/integration -run TestAtlasDataLake >> spec_test.suite + ATLAS_DATA_LAKE_INTEGRATION_TEST=true go test -v ./internal/integration -run TestUnifiedSpecs/atlas-data-lake-testing >> spec_test.suite + ATLAS_DATA_LAKE_INTEGRATION_TEST=true go test -v ./internal/integration -run TestAtlasDataLake >> spec_test.suite .PHONY: evg-test-enterprise-auth evg-test-enterprise-auth: - go run -tags gssapi ./cmd/testentauth/main.go + go run -tags gssapi ./internal/cmd/testentauth/main.go .PHONY: evg-test-kmip evg-test-kmip: - go test -exec "env PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)" $(BUILD_TAGS) -v -timeout $(TEST_TIMEOUT)s ./mongo/integration -run TestClientSideEncryptionSpec/kmipKMS >> test.suite - go test -exec "env PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)" $(BUILD_TAGS) -v -timeout $(TEST_TIMEOUT)s ./mongo/integration -run TestClientSideEncryptionProse/data_key_and_double_encryption >> test.suite - go test -exec "env PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)" $(BUILD_TAGS) -v -timeout $(TEST_TIMEOUT)s ./mongo/integration -run TestClientSideEncryptionProse/corpus >> test.suite - go test -exec "env PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)" $(BUILD_TAGS) -v -timeout $(TEST_TIMEOUT)s ./mongo/integration -run TestClientSideEncryptionProse/custom_endpoint >> test.suite - go test -exec "env PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)" $(BUILD_TAGS) -v -timeout $(TEST_TIMEOUT)s ./mongo/integration -run TestClientSideEncryptionProse/kms_tls_options_test >> test.suite + 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 TestClientSideEncryptionSpec/kmipKMS >> test.suite + 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/data_key_and_double_encryption >> test.suite + 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/corpus >> test.suite + 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/custom_endpoint >> test.suite + 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_options_test >> test.suite .PHONY: evg-test-kms 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 ./mongo/integration -run TestClientSideEncryptionProse/kms_tls_tests >> test.suite + 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 .PHONY: evg-test-load-balancers 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. - go test $(BUILD_TAGS) ./mongo/integration -run TestUnifiedSpecs/retryable-reads -v -timeout $(TEST_TIMEOUT)s >> test.suite - go test $(BUILD_TAGS) ./mongo/integration -run TestRetryableWritesSpec -v -timeout $(TEST_TIMEOUT)s >> test.suite - go test $(BUILD_TAGS) ./mongo/integration -run TestChangeStreamSpec -v -timeout $(TEST_TIMEOUT)s >> test.suite - go test $(BUILD_TAGS) ./mongo/integration -run TestInitialDNSSeedlistDiscoverySpec/load_balanced -v -timeout $(TEST_TIMEOUT)s >> test.suite - go test $(BUILD_TAGS) ./mongo/integration -run TestLoadBalancerSupport -v -timeout $(TEST_TIMEOUT)s >> test.suite - go test $(BUILD_TAGS) ./mongo/integration -run TestLoadBalancedConnectionHandshake -v -timeout $(TEST_TIMEOUT)s >> test.suite - go test $(BUILD_TAGS) ./mongo/integration/unified -run TestUnifiedSpec -v -timeout $(TEST_TIMEOUT)s >> test.suite + go test $(BUILD_TAGS) ./internal/integration -run TestUnifiedSpecs/retryable-reads -v -timeout $(TEST_TIMEOUT)s >> test.suite + go test $(BUILD_TAGS) ./internal/integration -run TestRetryableWritesSpec -v -timeout $(TEST_TIMEOUT)s >> test.suite + go test $(BUILD_TAGS) ./internal/integration -run TestChangeStreamSpec -v -timeout $(TEST_TIMEOUT)s >> test.suite + go test $(BUILD_TAGS) ./internal/integration -run TestInitialDNSSeedlistDiscoverySpec/load_balanced -v -timeout $(TEST_TIMEOUT)s >> test.suite + go test $(BUILD_TAGS) ./internal/integration -run TestLoadBalancerSupport -v -timeout $(TEST_TIMEOUT)s >> test.suite + go test $(BUILD_TAGS) ./internal/integration -run TestLoadBalancedConnectionHandshake -v -timeout $(TEST_TIMEOUT)s >> test.suite + go test $(BUILD_TAGS) ./internal/integration/unified -run TestUnifiedSpec -v -timeout $(TEST_TIMEOUT)s >> test.suite .PHONY: evg-test-search-index evg-test-search-index: - go test ./mongo/integration -run TestSearchIndexProse -v -timeout $(TEST_TIMEOUT)s >> test.suite + go test ./internal/integration -run TestSearchIndexProse -v -timeout $(TEST_TIMEOUT)s >> test.suite .PHONY: evg-test-ocsp evg-test-ocsp: @@ -163,36 +163,36 @@ evg-test-ocsp: evg-test-serverless: # Serverless should be tested with all unified tests as well as tests in the following components: CRUD, load balancer, # retryable reads, retryable writes, sessions, transactions and cursor behavior. - go test $(BUILD_TAGS) ./mongo/integration -run TestCrudSpec -v -timeout $(TEST_TIMEOUT)s >> test.suite - go test $(BUILD_TAGS) ./mongo/integration -run TestWriteErrorsWithLabels -v -timeout $(TEST_TIMEOUT)s >> test.suite - go test $(BUILD_TAGS) ./mongo/integration -run TestWriteErrorsDetails -v -timeout $(TEST_TIMEOUT)s >> test.suite - go test $(BUILD_TAGS) ./mongo/integration -run TestHintErrors -v -timeout $(TEST_TIMEOUT)s >> test.suite - go test $(BUILD_TAGS) ./mongo/integration -run TestWriteConcernError -v -timeout $(TEST_TIMEOUT)s >> test.suite - go test $(BUILD_TAGS) ./mongo/integration -run TestErrorsCodeNamePropagated -v -timeout $(TEST_TIMEOUT)s >> test.suite - go test $(BUILD_TAGS) ./mongo/integration -run TestLoadBalancerSupport -v -timeout $(TEST_TIMEOUT)s >> test.suite - go test $(BUILD_TAGS) ./mongo/integration -run TestUnifiedSpecs/retryable-reads -v -timeout $(TEST_TIMEOUT)s >> test.suite - go test $(BUILD_TAGS) ./mongo/integration -run TestRetryableReadsProse -v -timeout $(TEST_TIMEOUT)s >> test.suite - go test $(BUILD_TAGS) ./mongo/integration -run TestRetryableWritesSpec -v -timeout $(TEST_TIMEOUT)s >> test.suite - go test $(BUILD_TAGS) ./mongo/integration -run TestRetryableWritesProse -v -timeout $(TEST_TIMEOUT)s >> test.suite - go test $(BUILD_TAGS) ./mongo/integration -run TestUnifiedSpecs/sessions -v -timeout $(TEST_TIMEOUT)s >> test.suite - go test $(BUILD_TAGS) ./mongo/integration -run TestSessionsProse -v -timeout $(TEST_TIMEOUT)s >> test.suite - go test $(BUILD_TAGS) ./mongo/integration -run TestUnifiedSpecs/transactions/legacy -v -timeout $(TEST_TIMEOUT)s >> test.suite - go test $(BUILD_TAGS) ./mongo/integration -run TestConvenientTransactions -v -timeout $(TEST_TIMEOUT)s >> test.suite - go test $(BUILD_TAGS) ./mongo/integration -run TestCursor -v -timeout $(TEST_TIMEOUT)s >> test.suite - go test $(BUILD_TAGS) ./mongo/integration/unified -run TestUnifiedSpec -v -timeout $(TEST_TIMEOUT)s >> test.suite - go test -exec "env PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)" $(BUILD_TAGS) -v -timeout $(TEST_TIMEOUT)s ./mongo/integration -run TestClientSideEncryptionSpec >> test.suite - go test -exec "env PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)" $(BUILD_TAGS) -v -timeout $(TEST_TIMEOUT)s ./mongo/integration -run TestClientSideEncryptionProse >> test.suite + go test $(BUILD_TAGS) ./internal/integration -run TestCrudSpec -v -timeout $(TEST_TIMEOUT)s >> test.suite + go test $(BUILD_TAGS) ./internal/integration -run TestWriteErrorsWithLabels -v -timeout $(TEST_TIMEOUT)s >> test.suite + go test $(BUILD_TAGS) ./internal/integration -run TestWriteErrorsDetails -v -timeout $(TEST_TIMEOUT)s >> test.suite + go test $(BUILD_TAGS) ./internal/integration -run TestHintErrors -v -timeout $(TEST_TIMEOUT)s >> test.suite + go test $(BUILD_TAGS) ./internal/integration -run TestWriteConcernError -v -timeout $(TEST_TIMEOUT)s >> test.suite + go test $(BUILD_TAGS) ./internal/integration -run TestErrorsCodeNamePropagated -v -timeout $(TEST_TIMEOUT)s >> test.suite + go test $(BUILD_TAGS) ./internal/integration -run TestLoadBalancerSupport -v -timeout $(TEST_TIMEOUT)s >> test.suite + go test $(BUILD_TAGS) ./internal/integration -run TestUnifiedSpecs/retryable-reads -v -timeout $(TEST_TIMEOUT)s >> test.suite + go test $(BUILD_TAGS) ./internal/integration -run TestRetryableReadsProse -v -timeout $(TEST_TIMEOUT)s >> test.suite + go test $(BUILD_TAGS) ./internal/integration -run TestRetryableWritesSpec -v -timeout $(TEST_TIMEOUT)s >> test.suite + go test $(BUILD_TAGS) ./internal/integration -run TestRetryableWritesProse -v -timeout $(TEST_TIMEOUT)s >> test.suite + go test $(BUILD_TAGS) ./internal/integration -run TestUnifiedSpecs/sessions -v -timeout $(TEST_TIMEOUT)s >> test.suite + go test $(BUILD_TAGS) ./internal/integration -run TestSessionsProse -v -timeout $(TEST_TIMEOUT)s >> test.suite + go test $(BUILD_TAGS) ./internal/integration -run TestUnifiedSpecs/transactions/legacy -v -timeout $(TEST_TIMEOUT)s >> test.suite + go test $(BUILD_TAGS) ./internal/integration -run TestConvenientTransactions -v -timeout $(TEST_TIMEOUT)s >> test.suite + go test $(BUILD_TAGS) ./internal/integration -run TestCursor -v -timeout $(TEST_TIMEOUT)s >> test.suite + go test $(BUILD_TAGS) ./internal/integration/unified -run TestUnifiedSpec -v -timeout $(TEST_TIMEOUT)s >> test.suite + 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 TestClientSideEncryptionSpec >> test.suite + 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 >> test.suite .PHONY: evg-test-versioned-api evg-test-versioned-api: # Versioned API related tests are in the mongo, integration and unified packages. go test -exec "env PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)" $(BUILD_TAGS) -v -timeout $(TEST_TIMEOUT)s ./mongo >> test.suite - go test -exec "env PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)" $(BUILD_TAGS) -v -timeout $(TEST_TIMEOUT)s ./mongo/integration >> test.suite - go test -exec "env PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)" $(BUILD_TAGS) -v -timeout $(TEST_TIMEOUT)s ./mongo/integration/unified >> test.suite + 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 >> test.suite + 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/unified >> test.suite .PHONY: build-kms-test build-kms-test: - go build $(BUILD_TAGS) ./cmd/testkms + go build $(BUILD_TAGS) ./internal/cmd/testkms ### Benchmark specific targets and support. ### .PHONY: benchmark @@ -201,7 +201,7 @@ benchmark:perf .PHONY: driver-benchmark driver-benchmark:perf - @go run cmd/godriver-benchmark/main.go | tee perf.suite + @go run internal/cmd/benchmark/main.go | tee perf.suite perf:driver-test-data.tar.gz tar -zxf $< $(if $(eq $(UNAME_S),Darwin),-s , --transform=s)/testdata/perf/ diff --git a/etc/api_report.sh b/etc/api_report.sh index 4c60f76b3f..8455eceb20 100755 --- a/etc/api_report.sh +++ b/etc/api_report.sh @@ -23,7 +23,7 @@ fi # Generate and parse the report. gorelease -base=$BASE_SHA > api-report.txt || true cat api-report.txt -go run ./cmd/parse-api-report/main.go +go run ./internal/cmd/parse-api-report/main.go rm api-report.txt # Make the PR comment. diff --git a/etc/compile_check.sh b/etc/compile_check.sh index 6e2d7b2c57..1f17248695 100755 --- a/etc/compile_check.sh +++ b/etc/compile_check.sh @@ -3,7 +3,7 @@ set -e # exit when any command fails set -x # show all commands being run GC=go -COMPILE_CHECK_DIR="internal/test/compilecheck" +COMPILE_CHECK_DIR="internal/cmd/compilecheck" DEV_MIN_VERSION=1.19 # version will flatten a version string of upto 4 components for inequality diff --git a/etc/run-atlas-test.sh b/etc/run-atlas-test.sh index 9a1839993f..6c17b33cf5 100644 --- a/etc/run-atlas-test.sh +++ b/etc/run-atlas-test.sh @@ -8,4 +8,4 @@ set +x . etc/get_aws_secrets.sh drivers/atlas_connect echo "Running cmd/testatlas/main.go" -go run ./cmd/testatlas/main.go "$ATLAS_REPL" "$ATLAS_SHRD" "$ATLAS_FREE" "$ATLAS_TLS11" "$ATLAS_TLS12" "$ATLAS_SERVERLESS" "$ATLAS_SRV_REPL" "$ATLAS_SRV_SHRD" "$ATLAS_SRV_FREE" "$ATLAS_SRV_TLS11" "$ATLAS_SRV_TLS12" "$ATLAS_SRV_SERVERLESS" | tee test.suite +go run ./internal/cmd/testatlas/main.go "$ATLAS_REPL" "$ATLAS_SHRD" "$ATLAS_FREE" "$ATLAS_TLS11" "$ATLAS_TLS12" "$ATLAS_SERVERLESS" "$ATLAS_SRV_REPL" "$ATLAS_SRV_SHRD" "$ATLAS_SRV_FREE" "$ATLAS_SRV_TLS11" "$ATLAS_SRV_TLS12" "$ATLAS_SRV_SERVERLESS" | tee test.suite diff --git a/benchmark/bson.go b/internal/benchmark/bson.go similarity index 100% rename from benchmark/bson.go rename to internal/benchmark/bson.go diff --git a/benchmark/bson_document.go b/internal/benchmark/bson_document.go similarity index 100% rename from benchmark/bson_document.go rename to internal/benchmark/bson_document.go diff --git a/benchmark/bson_map.go b/internal/benchmark/bson_map.go similarity index 100% rename from benchmark/bson_map.go rename to internal/benchmark/bson_map.go diff --git a/benchmark/bson_struct.go b/internal/benchmark/bson_struct.go similarity index 100% rename from benchmark/bson_struct.go rename to internal/benchmark/bson_struct.go diff --git a/benchmark/bson_test.go b/internal/benchmark/bson_test.go similarity index 100% rename from benchmark/bson_test.go rename to internal/benchmark/bson_test.go diff --git a/benchmark/bson_types.go b/internal/benchmark/bson_types.go similarity index 100% rename from benchmark/bson_types.go rename to internal/benchmark/bson_types.go diff --git a/benchmark/harness.go b/internal/benchmark/harness.go similarity index 100% rename from benchmark/harness.go rename to internal/benchmark/harness.go diff --git a/benchmark/harness_case.go b/internal/benchmark/harness_case.go similarity index 100% rename from benchmark/harness_case.go rename to internal/benchmark/harness_case.go diff --git a/benchmark/harness_main.go b/internal/benchmark/harness_main.go similarity index 100% rename from benchmark/harness_main.go rename to internal/benchmark/harness_main.go diff --git a/benchmark/harness_results.go b/internal/benchmark/harness_results.go similarity index 100% rename from benchmark/harness_results.go rename to internal/benchmark/harness_results.go diff --git a/benchmark/multi.go b/internal/benchmark/multi.go similarity index 100% rename from benchmark/multi.go rename to internal/benchmark/multi.go diff --git a/benchmark/multi_test.go b/internal/benchmark/multi_test.go similarity index 100% rename from benchmark/multi_test.go rename to internal/benchmark/multi_test.go diff --git a/benchmark/operation_test.go b/internal/benchmark/operation_test.go similarity index 100% rename from benchmark/operation_test.go rename to internal/benchmark/operation_test.go diff --git a/benchmark/single.go b/internal/benchmark/single.go similarity index 100% rename from benchmark/single.go rename to internal/benchmark/single.go diff --git a/benchmark/single_test.go b/internal/benchmark/single_test.go similarity index 100% rename from benchmark/single_test.go rename to internal/benchmark/single_test.go diff --git a/cmd/godriver-benchmark/main.go b/internal/cmd/benchmark/main.go similarity index 87% rename from cmd/godriver-benchmark/main.go rename to internal/cmd/benchmark/main.go index 312042a00a..d60356da88 100644 --- a/cmd/godriver-benchmark/main.go +++ b/internal/cmd/benchmark/main.go @@ -9,7 +9,7 @@ package main import ( "os" - "go.mongodb.org/mongo-driver/benchmark" + "go.mongodb.org/mongo-driver/internal/benchmark" ) func main() { diff --git a/cmd/build-oss-fuzz-corpus/main.go b/internal/cmd/build-oss-fuzz-corpus/main.go similarity index 100% rename from cmd/build-oss-fuzz-corpus/main.go rename to internal/cmd/build-oss-fuzz-corpus/main.go diff --git a/internal/test/compilecheck/go.mod b/internal/cmd/compilecheck/go.mod similarity index 100% rename from internal/test/compilecheck/go.mod rename to internal/cmd/compilecheck/go.mod diff --git a/internal/test/compilecheck/go.sum b/internal/cmd/compilecheck/go.sum similarity index 100% rename from internal/test/compilecheck/go.sum rename to internal/cmd/compilecheck/go.sum diff --git a/internal/test/compilecheck/main.go b/internal/cmd/compilecheck/main.go similarity index 100% rename from internal/test/compilecheck/main.go rename to internal/cmd/compilecheck/main.go diff --git a/internal/test/faas/awslambda/Makefile b/internal/cmd/faas/awslambda/Makefile similarity index 100% rename from internal/test/faas/awslambda/Makefile rename to internal/cmd/faas/awslambda/Makefile diff --git a/internal/test/faas/awslambda/mongodb/go.mod b/internal/cmd/faas/awslambda/mongodb/go.mod similarity index 100% rename from internal/test/faas/awslambda/mongodb/go.mod rename to internal/cmd/faas/awslambda/mongodb/go.mod diff --git a/internal/test/faas/awslambda/mongodb/go.sum b/internal/cmd/faas/awslambda/mongodb/go.sum similarity index 100% rename from internal/test/faas/awslambda/mongodb/go.sum rename to internal/cmd/faas/awslambda/mongodb/go.sum diff --git a/internal/test/faas/awslambda/mongodb/main.go b/internal/cmd/faas/awslambda/mongodb/main.go similarity index 100% rename from internal/test/faas/awslambda/mongodb/main.go rename to internal/cmd/faas/awslambda/mongodb/main.go diff --git a/internal/test/faas/awslambda/template.yaml b/internal/cmd/faas/awslambda/template.yaml similarity index 100% rename from internal/test/faas/awslambda/template.yaml rename to internal/cmd/faas/awslambda/template.yaml diff --git a/cmd/parse-api-report/main.go b/internal/cmd/parse-api-report/main.go similarity index 99% rename from cmd/parse-api-report/main.go rename to internal/cmd/parse-api-report/main.go index 5d4d4e0743..cd372e7498 100644 --- a/cmd/parse-api-report/main.go +++ b/internal/cmd/parse-api-report/main.go @@ -80,5 +80,4 @@ func main() { if err := scanner.Err(); err != nil { log.Fatal(err) } - } diff --git a/cmd/testatlas/main.go b/internal/cmd/testatlas/main.go similarity index 100% rename from cmd/testatlas/main.go rename to internal/cmd/testatlas/main.go diff --git a/cmd/testaws/main.go b/internal/cmd/testaws/main.go similarity index 100% rename from cmd/testaws/main.go rename to internal/cmd/testaws/main.go diff --git a/cmd/testentauth/main.go b/internal/cmd/testentauth/main.go similarity index 100% rename from cmd/testentauth/main.go rename to internal/cmd/testentauth/main.go diff --git a/cmd/testkms/main.go b/internal/cmd/testkms/main.go similarity index 100% rename from cmd/testkms/main.go rename to internal/cmd/testkms/main.go diff --git a/examples/documentation_examples/README b/internal/docexamples/README similarity index 100% rename from examples/documentation_examples/README rename to internal/docexamples/README diff --git a/examples/documentation_examples/examples.go b/internal/docexamples/examples.go similarity index 99% rename from examples/documentation_examples/examples.go rename to internal/docexamples/examples.go index eb0c4de066..3fbcab7bef 100644 --- a/examples/documentation_examples/examples.go +++ b/internal/docexamples/examples.go @@ -4,7 +4,7 @@ // not use this file except in compliance with the License. You may obtain // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -package documentation_examples +package docexamples import ( "context" @@ -20,8 +20,8 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" "go.mongodb.org/mongo-driver/mongo/readconcern" "go.mongodb.org/mongo-driver/mongo/readpref" diff --git a/examples/documentation_examples/examples_test.go b/internal/docexamples/examples_test.go similarity index 75% rename from examples/documentation_examples/examples_test.go rename to internal/docexamples/examples_test.go index 429a9db58e..5c3a68eef4 100644 --- a/examples/documentation_examples/examples_test.go +++ b/internal/docexamples/examples_test.go @@ -4,7 +4,7 @@ // not use this file except in compliance with the License. You may obtain // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -package documentation_examples_test +package docexamples_test import ( "context" @@ -14,10 +14,10 @@ import ( "testing" "time" - "go.mongodb.org/mongo-driver/examples/documentation_examples" "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/docexamples" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" ) @@ -48,43 +48,43 @@ func TestDocumentationExamples(t *testing.T) { assert.NoError(t, err) defer client.Disconnect(ctx) - db := client.Database("documentation_examples") + db := client.Database("docexamples") t.Run("InsertExamples", func(t *testing.T) { - documentation_examples.InsertExamples(t, db) + docexamples.InsertExamples(t, db) }) t.Run("QueryArraysExamples", func(t *testing.T) { - documentation_examples.QueryArraysExamples(t, db) + docexamples.QueryArraysExamples(t, db) }) t.Run("ProjectionExamples", func(t *testing.T) { - documentation_examples.ProjectionExamples(t, db) + docexamples.ProjectionExamples(t, db) }) t.Run("UpdateExamples", func(t *testing.T) { - documentation_examples.UpdateExamples(t, db) + docexamples.UpdateExamples(t, db) }) t.Run("DeleteExamples", func(t *testing.T) { - documentation_examples.DeleteExamples(t, db) + docexamples.DeleteExamples(t, db) }) t.Run("RunCommandExamples", func(t *testing.T) { - documentation_examples.RunCommandExamples(t, db) + docexamples.RunCommandExamples(t, db) }) t.Run("IndexExamples", func(t *testing.T) { - documentation_examples.IndexExamples(t, db) + docexamples.IndexExamples(t, db) }) - t.Run("StableAPExamples", func(t *testing.T) { - documentation_examples.StableAPIExamples() + t.Run("StableAPExamples", func(*testing.T) { + docexamples.StableAPIExamples() }) t.Run("QueryToplevelFieldsExamples", func(t *testing.T) { - documentation_examples.QueryToplevelFieldsExamples(t, db) + docexamples.QueryToplevelFieldsExamples(t, db) }) t.Run("QueryEmbeddedDocumentsExamples", func(t *testing.T) { - documentation_examples.QueryEmbeddedDocumentsExamples(t, db) + docexamples.QueryEmbeddedDocumentsExamples(t, db) }) t.Run("QueryArrayEmbeddedDocumentsExamples", func(t *testing.T) { - documentation_examples.QueryArrayEmbeddedDocumentsExamples(t, db) + docexamples.QueryArrayEmbeddedDocumentsExamples(t, db) }) t.Run("QueryNullMissingFieldsExamples", func(t *testing.T) { - documentation_examples.QueryNullMissingFieldsExamples(t, db) + docexamples.QueryNullMissingFieldsExamples(t, db) }) mt := mtest.New(t) @@ -95,13 +95,13 @@ func TestDocumentationExamples(t *testing.T) { // TODO(GODRIVER-2482): Unskip when this test is rewritten to work with Stable API v1. mt.Skip(`skipping because "count" is now part of Stable API v1; see GODRIVER-2482`) - documentation_examples.StableAPIStrictCountExample(mt.T) + docexamples.StableAPIStrictCountExample(mt.T) }) // Snapshot queries can only run on 5.0+ non-sharded and sharded replicasets. mtOpts = mtest.NewOptions().MinServerVersion("5.0").Topologies(mtest.ReplicaSet, mtest.Sharded) mt.RunOpts("SnapshotQueryExamples", mtOpts, func(mt *mtest.T) { - documentation_examples.SnapshotQueryExamples(mt) + docexamples.SnapshotQueryExamples(mt) }) // Only 3.6+ supports $lookup in aggregations as is used in aggregation examples. No @@ -109,18 +109,18 @@ func TestDocumentationExamples(t *testing.T) { // on sharded clusters. mtOpts = mtest.NewOptions().MinServerVersion("3.6").CreateCollection(false) mt.RunOpts("AggregationExamples", mtOpts, func(mt *mtest.T) { - documentation_examples.AggregationExamples(mt.T, db) + docexamples.AggregationExamples(mt.T, db) }) // Transaction examples can only run on replica sets on 4.0+. mtOpts = mtest.NewOptions().MinServerVersion("4.0").Topologies(mtest.ReplicaSet) mt.RunOpts("TransactionsExamples", mtOpts, func(mt *mtest.T) { mt.ResetClient(options.Client().ApplyURI(mtest.ClusterURI())) - documentation_examples.TransactionsExamples(ctx, mt.Client) + docexamples.TransactionsExamples(ctx, mt.Client) }) mt.RunOpts("WithTransactionExample", mtOpts, func(mt *mtest.T) { mt.ResetClient(options.Client().ApplyURI(mtest.ClusterURI())) - documentation_examples.WithTransactionExample(ctx) + docexamples.WithTransactionExample(ctx) }) // Change stream examples can only run on replica sets on 3.6+. @@ -128,17 +128,17 @@ func TestDocumentationExamples(t *testing.T) { mt.RunOpts("ChangeStreamExamples", mtOpts, func(mt *mtest.T) { mt.ResetClient(options.Client().ApplyURI(mtest.ClusterURI())) csdb := client.Database("changestream_examples") - documentation_examples.ChangeStreamExamples(mt.T, csdb) + docexamples.ChangeStreamExamples(mt.T, csdb) }) // Causal consistency examples cannot run on 4.0. // TODO(GODRIVER-2238): Remove version filtering once failures on 4.0 sharded clusters are fixed. mtOpts = mtest.NewOptions().MinServerVersion("4.2").Topologies(mtest.ReplicaSet) mt.RunOpts("CausalConsistencyExamples/post4.2", mtOpts, func(mt *mtest.T) { - documentation_examples.CausalConsistencyExamples(mt.Client) + docexamples.CausalConsistencyExamples(mt.Client) }) mtOpts = mtest.NewOptions().MaxServerVersion("4.0").Topologies(mtest.ReplicaSet) mt.RunOpts("CausalConsistencyExamples/pre4.0", mtOpts, func(mt *mtest.T) { - documentation_examples.CausalConsistencyExamples(mt.Client) + docexamples.CausalConsistencyExamples(mt.Client) }) } diff --git a/mongo/integration/causal_consistency_test.go b/internal/integration/causal_consistency_test.go similarity index 99% rename from mongo/integration/causal_consistency_test.go rename to internal/integration/causal_consistency_test.go index 8c59025399..33581c538a 100644 --- a/mongo/integration/causal_consistency_test.go +++ b/internal/integration/causal_consistency_test.go @@ -13,8 +13,8 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" "go.mongodb.org/mongo-driver/mongo/readconcern" ) diff --git a/mongo/integration/change_stream_test.go b/internal/integration/change_stream_test.go similarity index 99% rename from mongo/integration/change_stream_test.go rename to internal/integration/change_stream_test.go index b3d0469c36..ee5670e2bb 100644 --- a/mongo/integration/change_stream_test.go +++ b/internal/integration/change_stream_test.go @@ -18,9 +18,9 @@ import ( "go.mongodb.org/mongo-driver/event" "go.mongodb.org/mongo-driver/internal/assert" "go.mongodb.org/mongo-driver/internal/eventtest" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/internal/require" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" ) diff --git a/mongo/integration/clam_prose_test.go b/internal/integration/clam_prose_test.go similarity index 99% rename from mongo/integration/clam_prose_test.go rename to internal/integration/clam_prose_test.go index 52b2b85f1d..54d49df11b 100644 --- a/mongo/integration/clam_prose_test.go +++ b/internal/integration/clam_prose_test.go @@ -14,10 +14,10 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/internal/integtest" "go.mongodb.org/mongo-driver/internal/logger" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" ) diff --git a/mongo/integration/client_options_test.go b/internal/integration/client_options_test.go similarity index 100% rename from mongo/integration/client_options_test.go rename to internal/integration/client_options_test.go diff --git a/mongo/integration/client_side_encryption_prose_test.go b/internal/integration/client_side_encryption_prose_test.go similarity index 99% rename from mongo/integration/client_side_encryption_prose_test.go rename to internal/integration/client_side_encryption_prose_test.go index 46fceaab2c..f1596a591b 100644 --- a/mongo/integration/client_side_encryption_prose_test.go +++ b/internal/integration/client_side_encryption_prose_test.go @@ -29,9 +29,9 @@ import ( "go.mongodb.org/mongo-driver/event" "go.mongodb.org/mongo-driver/internal/assert" "go.mongodb.org/mongo-driver/internal/handshake" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/internal/integtest" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" "go.mongodb.org/mongo-driver/mongo/writeconcern" "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" diff --git a/mongo/integration/client_side_encryption_spec_test.go b/internal/integration/client_side_encryption_spec_test.go similarity index 100% rename from mongo/integration/client_side_encryption_spec_test.go rename to internal/integration/client_side_encryption_spec_test.go diff --git a/mongo/integration/client_side_encryption_test.go b/internal/integration/client_side_encryption_test.go similarity index 99% rename from mongo/integration/client_side_encryption_test.go rename to internal/integration/client_side_encryption_test.go index 5851080d32..49af404e08 100644 --- a/mongo/integration/client_side_encryption_test.go +++ b/internal/integration/client_side_encryption_test.go @@ -18,9 +18,9 @@ import ( "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/event" "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/internal/integtest" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" "go.mongodb.org/mongo-driver/x/mongo/driver" diff --git a/mongo/integration/client_test.go b/internal/integration/client_test.go similarity index 99% rename from mongo/integration/client_test.go rename to internal/integration/client_test.go index c8ba161644..e775982a1b 100644 --- a/mongo/integration/client_test.go +++ b/internal/integration/client_test.go @@ -24,10 +24,10 @@ import ( "go.mongodb.org/mongo-driver/internal/assert" "go.mongodb.org/mongo-driver/internal/eventtest" "go.mongodb.org/mongo-driver/internal/handshake" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/internal/integtest" "go.mongodb.org/mongo-driver/internal/require" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" "go.mongodb.org/mongo-driver/mongo/readpref" "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" diff --git a/mongo/integration/cmd_monitoring_helpers_test.go b/internal/integration/cmd_monitoring_helpers_test.go similarity index 99% rename from mongo/integration/cmd_monitoring_helpers_test.go rename to internal/integration/cmd_monitoring_helpers_test.go index 16218816c2..5deec645f1 100644 --- a/mongo/integration/cmd_monitoring_helpers_test.go +++ b/internal/integration/cmd_monitoring_helpers_test.go @@ -17,7 +17,7 @@ import ( "go.mongodb.org/mongo-driver/bson/bsontype" "go.mongodb.org/mongo-driver/event" "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) diff --git a/mongo/integration/collection_test.go b/internal/integration/collection_test.go similarity index 99% rename from mongo/integration/collection_test.go rename to internal/integration/collection_test.go index ba5b87c5ca..555ee67b3b 100644 --- a/mongo/integration/collection_test.go +++ b/internal/integration/collection_test.go @@ -16,8 +16,8 @@ import ( "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/event" "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" "go.mongodb.org/mongo-driver/mongo/writeconcern" "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" diff --git a/mongo/integration/crud_helpers_test.go b/internal/integration/crud_helpers_test.go similarity index 99% rename from mongo/integration/crud_helpers_test.go rename to internal/integration/crud_helpers_test.go index 5c5cc8c609..af2c1ffe4d 100644 --- a/mongo/integration/crud_helpers_test.go +++ b/internal/integration/crud_helpers_test.go @@ -20,11 +20,11 @@ import ( "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/internal/assert" "go.mongodb.org/mongo-driver/internal/bsonutil" + "go.mongodb.org/mongo-driver/internal/integration/mtest" + "go.mongodb.org/mongo-driver/internal/integration/unified" "go.mongodb.org/mongo-driver/internal/integtest" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/gridfs" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" - "go.mongodb.org/mongo-driver/mongo/integration/unified" "go.mongodb.org/mongo-driver/mongo/options" "go.mongodb.org/mongo-driver/mongo/readconcern" "go.mongodb.org/mongo-driver/mongo/readpref" diff --git a/mongo/integration/crud_prose_test.go b/internal/integration/crud_prose_test.go similarity index 99% rename from mongo/integration/crud_prose_test.go rename to internal/integration/crud_prose_test.go index 00a1f0ff36..c069844374 100644 --- a/mongo/integration/crud_prose_test.go +++ b/internal/integration/crud_prose_test.go @@ -14,8 +14,8 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) diff --git a/mongo/integration/crud_spec_test.go b/internal/integration/crud_spec_test.go similarity index 99% rename from mongo/integration/crud_spec_test.go rename to internal/integration/crud_spec_test.go index a80a9dd53c..9269d866c3 100644 --- a/mongo/integration/crud_spec_test.go +++ b/internal/integration/crud_spec_test.go @@ -19,8 +19,8 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/internal/assert" "go.mongodb.org/mongo-driver/internal/bsonutil" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" ) const ( diff --git a/mongo/integration/csot_cse_prose_test.go b/internal/integration/csot_cse_prose_test.go similarity index 98% rename from mongo/integration/csot_cse_prose_test.go rename to internal/integration/csot_cse_prose_test.go index f0102e70f2..c4b6b17a55 100644 --- a/mongo/integration/csot_cse_prose_test.go +++ b/internal/integration/csot_cse_prose_test.go @@ -16,9 +16,9 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/event" "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/internal/integtest" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" ) diff --git a/mongo/integration/csot_prose_test.go b/internal/integration/csot_prose_test.go similarity index 98% rename from mongo/integration/csot_prose_test.go rename to internal/integration/csot_prose_test.go index 7d0d387f52..c8de1f68ad 100644 --- a/mongo/integration/csot_prose_test.go +++ b/internal/integration/csot_prose_test.go @@ -15,9 +15,9 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/event" "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/internal/integtest" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" ) diff --git a/mongo/integration/cursor_test.go b/internal/integration/cursor_test.go similarity index 99% rename from mongo/integration/cursor_test.go rename to internal/integration/cursor_test.go index 8354bb3325..020de17285 100644 --- a/mongo/integration/cursor_test.go +++ b/internal/integration/cursor_test.go @@ -15,8 +15,8 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" ) diff --git a/mongo/integration/data_lake_test.go b/internal/integration/data_lake_test.go similarity index 98% rename from mongo/integration/data_lake_test.go rename to internal/integration/data_lake_test.go index e0add0299e..cc205ecf9c 100644 --- a/mongo/integration/data_lake_test.go +++ b/internal/integration/data_lake_test.go @@ -13,7 +13,7 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" ) diff --git a/mongo/integration/database_test.go b/internal/integration/database_test.go similarity index 99% rename from mongo/integration/database_test.go rename to internal/integration/database_test.go index 31aba79719..bf208b8aed 100644 --- a/mongo/integration/database_test.go +++ b/internal/integration/database_test.go @@ -18,8 +18,8 @@ import ( "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/internal/assert" "go.mongodb.org/mongo-driver/internal/handshake" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" "go.mongodb.org/mongo-driver/mongo/readpref" "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" diff --git a/mongo/integration/errors_test.go b/internal/integration/errors_test.go similarity index 99% rename from mongo/integration/errors_test.go rename to internal/integration/errors_test.go index 7e976b0ce5..8c6c0fb812 100644 --- a/mongo/integration/errors_test.go +++ b/internal/integration/errors_test.go @@ -20,9 +20,9 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/internal/integtest" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" "go.mongodb.org/mongo-driver/x/mongo/driver" "go.mongodb.org/mongo-driver/x/mongo/driver/topology" diff --git a/mongo/integration/gridfs_test.go b/internal/integration/gridfs_test.go similarity index 99% rename from mongo/integration/gridfs_test.go rename to internal/integration/gridfs_test.go index 3401796e11..ff83eb7e32 100644 --- a/mongo/integration/gridfs_test.go +++ b/internal/integration/gridfs_test.go @@ -19,10 +19,10 @@ import ( "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/event" "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/internal/israce" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/gridfs" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" ) diff --git a/mongo/integration/handshake_test.go b/internal/integration/handshake_test.go similarity index 99% rename from mongo/integration/handshake_test.go rename to internal/integration/handshake_test.go index 95de8536ab..74b4aecbb7 100644 --- a/mongo/integration/handshake_test.go +++ b/internal/integration/handshake_test.go @@ -16,8 +16,8 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/internal/assert" "go.mongodb.org/mongo-driver/internal/handshake" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/version" "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" "go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage" diff --git a/mongo/integration/index_view_test.go b/internal/integration/index_view_test.go similarity index 99% rename from mongo/integration/index_view_test.go rename to internal/integration/index_view_test.go index cc5680056b..f5d02cf2d1 100644 --- a/mongo/integration/index_view_test.go +++ b/internal/integration/index_view_test.go @@ -14,8 +14,8 @@ import ( "github.com/google/go-cmp/cmp" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" "go.mongodb.org/mongo-driver/mongo/writeconcern" "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" diff --git a/mongo/integration/initial_dns_seedlist_discovery_test.go b/internal/integration/initial_dns_seedlist_discovery_test.go similarity index 99% rename from mongo/integration/initial_dns_seedlist_discovery_test.go rename to internal/integration/initial_dns_seedlist_discovery_test.go index c17ee1e712..aab3df92e2 100644 --- a/mongo/integration/initial_dns_seedlist_discovery_test.go +++ b/internal/integration/initial_dns_seedlist_discovery_test.go @@ -19,9 +19,9 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/description" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" "go.mongodb.org/mongo-driver/mongo/readpref" "go.mongodb.org/mongo-driver/x/mongo/driver/connstring" diff --git a/mongo/integration/json_helpers_test.go b/internal/integration/json_helpers_test.go similarity index 100% rename from mongo/integration/json_helpers_test.go rename to internal/integration/json_helpers_test.go diff --git a/mongo/integration/load_balancer_prose_test.go b/internal/integration/load_balancer_prose_test.go similarity index 98% rename from mongo/integration/load_balancer_prose_test.go rename to internal/integration/load_balancer_prose_test.go index 430e063540..c40c052993 100644 --- a/mongo/integration/load_balancer_prose_test.go +++ b/internal/integration/load_balancer_prose_test.go @@ -15,9 +15,9 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/internal/require" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" ) diff --git a/mongo/integration/log_helpers_test.go b/internal/integration/log_helpers_test.go similarity index 97% rename from mongo/integration/log_helpers_test.go rename to internal/integration/log_helpers_test.go index 9b31c166de..80b78a6b2b 100644 --- a/mongo/integration/log_helpers_test.go +++ b/internal/integration/log_helpers_test.go @@ -10,8 +10,8 @@ import ( "context" "fmt" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/internal/logger" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" ) type testLogSink struct { diff --git a/mongo/integration/main.go b/internal/integration/main.go similarity index 100% rename from mongo/integration/main.go rename to internal/integration/main.go diff --git a/mongo/integration/main_test.go b/internal/integration/main_test.go similarity index 93% rename from mongo/integration/main_test.go rename to internal/integration/main_test.go index 394fd5be6c..b1401f7d14 100644 --- a/mongo/integration/main_test.go +++ b/internal/integration/main_test.go @@ -12,7 +12,7 @@ import ( "os" "testing" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/internal/integration/mtest" ) func TestMain(m *testing.M) { diff --git a/mongo/integration/mock_find_test.go b/internal/integration/mock_find_test.go similarity index 98% rename from mongo/integration/mock_find_test.go rename to internal/integration/mock_find_test.go index ad90c82fba..d246848778 100644 --- a/mongo/integration/mock_find_test.go +++ b/internal/integration/mock_find_test.go @@ -13,8 +13,8 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson/bsoncodec" "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" ) diff --git a/mongo/integration/mongos_pinning_test.go b/internal/integration/mongos_pinning_test.go similarity index 98% rename from mongo/integration/mongos_pinning_test.go rename to internal/integration/mongos_pinning_test.go index a436ca981c..06b31762c9 100644 --- a/mongo/integration/mongos_pinning_test.go +++ b/internal/integration/mongos_pinning_test.go @@ -14,8 +14,8 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" ) diff --git a/mongo/integration/mtest/csfle_enabled.go b/internal/integration/mtest/csfle_enabled.go similarity index 100% rename from mongo/integration/mtest/csfle_enabled.go rename to internal/integration/mtest/csfle_enabled.go diff --git a/mongo/integration/mtest/csfle_not_enabled.go b/internal/integration/mtest/csfle_not_enabled.go similarity index 100% rename from mongo/integration/mtest/csfle_not_enabled.go rename to internal/integration/mtest/csfle_not_enabled.go diff --git a/mongo/integration/mtest/deployment_helpers.go b/internal/integration/mtest/deployment_helpers.go similarity index 100% rename from mongo/integration/mtest/deployment_helpers.go rename to internal/integration/mtest/deployment_helpers.go diff --git a/mongo/integration/mtest/doc.go b/internal/integration/mtest/doc.go similarity index 100% rename from mongo/integration/mtest/doc.go rename to internal/integration/mtest/doc.go diff --git a/mongo/integration/mtest/global_state.go b/internal/integration/mtest/global_state.go similarity index 100% rename from mongo/integration/mtest/global_state.go rename to internal/integration/mtest/global_state.go diff --git a/mongo/integration/mtest/mongotest.go b/internal/integration/mtest/mongotest.go similarity index 100% rename from mongo/integration/mtest/mongotest.go rename to internal/integration/mtest/mongotest.go diff --git a/mongo/integration/mtest/opmsg_deployment.go b/internal/integration/mtest/opmsg_deployment.go similarity index 100% rename from mongo/integration/mtest/opmsg_deployment.go rename to internal/integration/mtest/opmsg_deployment.go diff --git a/mongo/integration/mtest/options.go b/internal/integration/mtest/options.go similarity index 100% rename from mongo/integration/mtest/options.go rename to internal/integration/mtest/options.go diff --git a/mongo/integration/mtest/proxy_dialer.go b/internal/integration/mtest/proxy_dialer.go similarity index 100% rename from mongo/integration/mtest/proxy_dialer.go rename to internal/integration/mtest/proxy_dialer.go diff --git a/mongo/integration/mtest/received_message.go b/internal/integration/mtest/received_message.go similarity index 100% rename from mongo/integration/mtest/received_message.go rename to internal/integration/mtest/received_message.go diff --git a/mongo/integration/mtest/sent_message.go b/internal/integration/mtest/sent_message.go similarity index 100% rename from mongo/integration/mtest/sent_message.go rename to internal/integration/mtest/sent_message.go diff --git a/mongo/integration/mtest/setup.go b/internal/integration/mtest/setup.go similarity index 100% rename from mongo/integration/mtest/setup.go rename to internal/integration/mtest/setup.go diff --git a/mongo/integration/mtest/setup_options.go b/internal/integration/mtest/setup_options.go similarity index 100% rename from mongo/integration/mtest/setup_options.go rename to internal/integration/mtest/setup_options.go diff --git a/mongo/integration/mtest/wiremessage_helpers.go b/internal/integration/mtest/wiremessage_helpers.go similarity index 100% rename from mongo/integration/mtest/wiremessage_helpers.go rename to internal/integration/mtest/wiremessage_helpers.go diff --git a/mongo/integration/primary_stepdown_test.go b/internal/integration/primary_stepdown_test.go similarity index 98% rename from mongo/integration/primary_stepdown_test.go rename to internal/integration/primary_stepdown_test.go index 4a51d83b02..3611b6e58b 100644 --- a/mongo/integration/primary_stepdown_test.go +++ b/internal/integration/primary_stepdown_test.go @@ -13,8 +13,8 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/internal/assert" "go.mongodb.org/mongo-driver/internal/eventtest" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" ) diff --git a/mongo/integration/retryable_reads_prose_test.go b/internal/integration/retryable_reads_prose_test.go similarity index 99% rename from mongo/integration/retryable_reads_prose_test.go rename to internal/integration/retryable_reads_prose_test.go index a55b61cf9f..6c9460481b 100644 --- a/mongo/integration/retryable_reads_prose_test.go +++ b/internal/integration/retryable_reads_prose_test.go @@ -16,8 +16,8 @@ import ( "go.mongodb.org/mongo-driver/event" "go.mongodb.org/mongo-driver/internal/assert" "go.mongodb.org/mongo-driver/internal/eventtest" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/internal/require" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" ) diff --git a/mongo/integration/retryable_writes_prose_test.go b/internal/integration/retryable_writes_prose_test.go similarity index 99% rename from mongo/integration/retryable_writes_prose_test.go rename to internal/integration/retryable_writes_prose_test.go index 8e09d2145e..f415a0daa6 100644 --- a/mongo/integration/retryable_writes_prose_test.go +++ b/internal/integration/retryable_writes_prose_test.go @@ -19,9 +19,9 @@ import ( "go.mongodb.org/mongo-driver/event" "go.mongodb.org/mongo-driver/internal/assert" "go.mongodb.org/mongo-driver/internal/eventtest" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/internal/require" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" "go.mongodb.org/mongo-driver/x/mongo/driver" ) diff --git a/mongo/integration/retryable_writes_spec_test.go b/internal/integration/retryable_writes_spec_test.go similarity index 97% rename from mongo/integration/retryable_writes_spec_test.go rename to internal/integration/retryable_writes_spec_test.go index c1e104ab80..9f08b52d4c 100644 --- a/mongo/integration/retryable_writes_spec_test.go +++ b/internal/integration/retryable_writes_spec_test.go @@ -13,7 +13,7 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/internal/integration/mtest" ) const retryableWritesTestDir = "../../testdata/retryable-writes/legacy" diff --git a/mongo/integration/sdam_error_handling_test.go b/internal/integration/sdam_error_handling_test.go similarity index 99% rename from mongo/integration/sdam_error_handling_test.go rename to internal/integration/sdam_error_handling_test.go index 58cac9ccdd..8b96069476 100644 --- a/mongo/integration/sdam_error_handling_test.go +++ b/internal/integration/sdam_error_handling_test.go @@ -19,8 +19,8 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/internal/assert" "go.mongodb.org/mongo-driver/internal/eventtest" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" ) diff --git a/mongo/integration/sdam_prose_test.go b/internal/integration/sdam_prose_test.go similarity index 99% rename from mongo/integration/sdam_prose_test.go rename to internal/integration/sdam_prose_test.go index 435bdc72da..a2691ddc81 100644 --- a/mongo/integration/sdam_prose_test.go +++ b/internal/integration/sdam_prose_test.go @@ -15,8 +15,8 @@ import ( "go.mongodb.org/mongo-driver/internal/assert" "go.mongodb.org/mongo-driver/internal/handshake" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/mongo/description" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" ) diff --git a/mongo/integration/search_index_prose_test.go b/internal/integration/search_index_prose_test.go similarity index 99% rename from mongo/integration/search_index_prose_test.go rename to internal/integration/search_index_prose_test.go index 002150c36e..7e3aa046f7 100644 --- a/mongo/integration/search_index_prose_test.go +++ b/internal/integration/search_index_prose_test.go @@ -15,10 +15,10 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/internal/require" "go.mongodb.org/mongo-driver/internal/uuid" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" ) diff --git a/mongo/integration/server_selection_prose_test.go b/internal/integration/server_selection_prose_test.go similarity index 99% rename from mongo/integration/server_selection_prose_test.go rename to internal/integration/server_selection_prose_test.go index e91814a397..9e66eadc75 100644 --- a/mongo/integration/server_selection_prose_test.go +++ b/internal/integration/server_selection_prose_test.go @@ -16,9 +16,9 @@ import ( "go.mongodb.org/mongo-driver/event" "go.mongodb.org/mongo-driver/internal/assert" "go.mongodb.org/mongo-driver/internal/eventtest" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/internal/require" "go.mongodb.org/mongo-driver/mongo/description" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" ) diff --git a/mongo/integration/sessions_mongocryptd_prose_test.go b/internal/integration/sessions_mongocryptd_prose_test.go similarity index 99% rename from mongo/integration/sessions_mongocryptd_prose_test.go rename to internal/integration/sessions_mongocryptd_prose_test.go index 891d08d81c..55fabc1061 100644 --- a/mongo/integration/sessions_mongocryptd_prose_test.go +++ b/internal/integration/sessions_mongocryptd_prose_test.go @@ -18,9 +18,9 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/event" "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/internal/require" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" ) diff --git a/mongo/integration/sessions_test.go b/internal/integration/sessions_test.go similarity index 99% rename from mongo/integration/sessions_test.go rename to internal/integration/sessions_test.go index 799d22e9d1..c68d40828a 100644 --- a/mongo/integration/sessions_test.go +++ b/internal/integration/sessions_test.go @@ -18,9 +18,9 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/internal/require" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" "go.mongodb.org/mongo-driver/mongo/readpref" "go.mongodb.org/mongo-driver/mongo/writeconcern" diff --git a/mongo/integration/unified/admin_helpers.go b/internal/integration/unified/admin_helpers.go similarity index 98% rename from mongo/integration/unified/admin_helpers.go rename to internal/integration/unified/admin_helpers.go index ba8eac8d7d..ed0c98e793 100644 --- a/mongo/integration/unified/admin_helpers.go +++ b/internal/integration/unified/admin_helpers.go @@ -12,9 +12,9 @@ import ( "strings" "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/internal/integtest" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" ) diff --git a/mongo/integration/unified/bsonutil.go b/internal/integration/unified/bsonutil.go similarity index 100% rename from mongo/integration/unified/bsonutil.go rename to internal/integration/unified/bsonutil.go diff --git a/mongo/integration/unified/bucket_options.go b/internal/integration/unified/bucket_options.go similarity index 100% rename from mongo/integration/unified/bucket_options.go rename to internal/integration/unified/bucket_options.go diff --git a/mongo/integration/unified/bulkwrite_helpers.go b/internal/integration/unified/bulkwrite_helpers.go similarity index 100% rename from mongo/integration/unified/bulkwrite_helpers.go rename to internal/integration/unified/bulkwrite_helpers.go diff --git a/mongo/integration/unified/client_encryption_operation_execution.go b/internal/integration/unified/client_encryption_operation_execution.go similarity index 100% rename from mongo/integration/unified/client_encryption_operation_execution.go rename to internal/integration/unified/client_encryption_operation_execution.go diff --git a/mongo/integration/unified/client_entity.go b/internal/integration/unified/client_entity.go similarity index 99% rename from mongo/integration/unified/client_entity.go rename to internal/integration/unified/client_entity.go index 513b0e41d8..e0b01610a7 100644 --- a/mongo/integration/unified/client_entity.go +++ b/internal/integration/unified/client_entity.go @@ -17,10 +17,10 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/event" "go.mongodb.org/mongo-driver/internal/handshake" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/internal/integtest" "go.mongodb.org/mongo-driver/internal/logger" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" "go.mongodb.org/mongo-driver/mongo/readconcern" "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" diff --git a/mongo/integration/unified/client_operation_execution.go b/internal/integration/unified/client_operation_execution.go similarity index 100% rename from mongo/integration/unified/client_operation_execution.go rename to internal/integration/unified/client_operation_execution.go diff --git a/mongo/integration/unified/collection_data.go b/internal/integration/unified/collection_data.go similarity index 98% rename from mongo/integration/unified/collection_data.go rename to internal/integration/unified/collection_data.go index 979ecccf05..e14cedfd14 100644 --- a/mongo/integration/unified/collection_data.go +++ b/internal/integration/unified/collection_data.go @@ -13,7 +13,7 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/internal/bsonutil" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" "go.mongodb.org/mongo-driver/mongo/readconcern" "go.mongodb.org/mongo-driver/mongo/readpref" diff --git a/mongo/integration/unified/collection_operation_execution.go b/internal/integration/unified/collection_operation_execution.go similarity index 100% rename from mongo/integration/unified/collection_operation_execution.go rename to internal/integration/unified/collection_operation_execution.go diff --git a/mongo/integration/unified/common_options.go b/internal/integration/unified/common_options.go similarity index 100% rename from mongo/integration/unified/common_options.go rename to internal/integration/unified/common_options.go diff --git a/mongo/integration/unified/context.go b/internal/integration/unified/context.go similarity index 100% rename from mongo/integration/unified/context.go rename to internal/integration/unified/context.go diff --git a/mongo/integration/unified/crud_helpers.go b/internal/integration/unified/crud_helpers.go similarity index 100% rename from mongo/integration/unified/crud_helpers.go rename to internal/integration/unified/crud_helpers.go diff --git a/mongo/integration/unified/cursor_entity.go b/internal/integration/unified/cursor_entity.go similarity index 100% rename from mongo/integration/unified/cursor_entity.go rename to internal/integration/unified/cursor_entity.go diff --git a/mongo/integration/unified/cursor_operation_execution.go b/internal/integration/unified/cursor_operation_execution.go similarity index 100% rename from mongo/integration/unified/cursor_operation_execution.go rename to internal/integration/unified/cursor_operation_execution.go diff --git a/mongo/integration/unified/database_operation_execution.go b/internal/integration/unified/database_operation_execution.go similarity index 100% rename from mongo/integration/unified/database_operation_execution.go rename to internal/integration/unified/database_operation_execution.go diff --git a/mongo/integration/unified/db_collection_options.go b/internal/integration/unified/db_collection_options.go similarity index 100% rename from mongo/integration/unified/db_collection_options.go rename to internal/integration/unified/db_collection_options.go diff --git a/mongo/integration/unified/entity.go b/internal/integration/unified/entity.go similarity index 100% rename from mongo/integration/unified/entity.go rename to internal/integration/unified/entity.go diff --git a/mongo/integration/unified/entity_test.go b/internal/integration/unified/entity_test.go similarity index 100% rename from mongo/integration/unified/entity_test.go rename to internal/integration/unified/entity_test.go diff --git a/mongo/integration/unified/error.go b/internal/integration/unified/error.go similarity index 100% rename from mongo/integration/unified/error.go rename to internal/integration/unified/error.go diff --git a/mongo/integration/unified/event.go b/internal/integration/unified/event.go similarity index 100% rename from mongo/integration/unified/event.go rename to internal/integration/unified/event.go diff --git a/mongo/integration/unified/event_verification.go b/internal/integration/unified/event_verification.go similarity index 100% rename from mongo/integration/unified/event_verification.go rename to internal/integration/unified/event_verification.go diff --git a/mongo/integration/unified/gridfs_bucket_operation_execution.go b/internal/integration/unified/gridfs_bucket_operation_execution.go similarity index 100% rename from mongo/integration/unified/gridfs_bucket_operation_execution.go rename to internal/integration/unified/gridfs_bucket_operation_execution.go diff --git a/mongo/integration/unified/logger.go b/internal/integration/unified/logger.go similarity index 100% rename from mongo/integration/unified/logger.go rename to internal/integration/unified/logger.go diff --git a/mongo/integration/unified/logger_verification.go b/internal/integration/unified/logger_verification.go similarity index 100% rename from mongo/integration/unified/logger_verification.go rename to internal/integration/unified/logger_verification.go diff --git a/mongo/integration/unified/main_test.go b/internal/integration/unified/main_test.go similarity index 93% rename from mongo/integration/unified/main_test.go rename to internal/integration/unified/main_test.go index 3758b2856e..074cdc4b71 100644 --- a/mongo/integration/unified/main_test.go +++ b/internal/integration/unified/main_test.go @@ -12,7 +12,7 @@ import ( "os" "testing" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/internal/integration/mtest" ) func TestMain(m *testing.M) { diff --git a/mongo/integration/unified/matches.go b/internal/integration/unified/matches.go similarity index 100% rename from mongo/integration/unified/matches.go rename to internal/integration/unified/matches.go diff --git a/mongo/integration/unified/matches_test.go b/internal/integration/unified/matches_test.go similarity index 100% rename from mongo/integration/unified/matches_test.go rename to internal/integration/unified/matches_test.go diff --git a/mongo/integration/unified/operation.go b/internal/integration/unified/operation.go similarity index 100% rename from mongo/integration/unified/operation.go rename to internal/integration/unified/operation.go diff --git a/mongo/integration/unified/options.go b/internal/integration/unified/options.go similarity index 100% rename from mongo/integration/unified/options.go rename to internal/integration/unified/options.go diff --git a/mongo/integration/unified/result.go b/internal/integration/unified/result.go similarity index 100% rename from mongo/integration/unified/result.go rename to internal/integration/unified/result.go diff --git a/mongo/integration/unified/schema_version.go b/internal/integration/unified/schema_version.go similarity index 96% rename from mongo/integration/unified/schema_version.go rename to internal/integration/unified/schema_version.go index 9aec89a18d..eb1ed50889 100644 --- a/mongo/integration/unified/schema_version.go +++ b/internal/integration/unified/schema_version.go @@ -11,7 +11,7 @@ import ( "strconv" "strings" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/internal/integration/mtest" ) var ( diff --git a/mongo/integration/unified/server_api_options.go b/internal/integration/unified/server_api_options.go similarity index 100% rename from mongo/integration/unified/server_api_options.go rename to internal/integration/unified/server_api_options.go diff --git a/mongo/integration/unified/session_operation_execution.go b/internal/integration/unified/session_operation_execution.go similarity index 100% rename from mongo/integration/unified/session_operation_execution.go rename to internal/integration/unified/session_operation_execution.go diff --git a/mongo/integration/unified/session_options.go b/internal/integration/unified/session_options.go similarity index 100% rename from mongo/integration/unified/session_options.go rename to internal/integration/unified/session_options.go diff --git a/mongo/integration/unified/testrunner_operation.go b/internal/integration/unified/testrunner_operation.go similarity index 99% rename from mongo/integration/unified/testrunner_operation.go rename to internal/integration/unified/testrunner_operation.go index 411b312f6c..4efb5e95e2 100644 --- a/mongo/integration/unified/testrunner_operation.go +++ b/internal/integration/unified/testrunner_operation.go @@ -13,8 +13,8 @@ import ( "time" "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/x/bsonx/bsoncore" "go.mongodb.org/mongo-driver/x/mongo/driver/session" ) diff --git a/mongo/integration/unified/unified_spec_runner.go b/internal/integration/unified/unified_spec_runner.go similarity index 99% rename from mongo/integration/unified/unified_spec_runner.go rename to internal/integration/unified/unified_spec_runner.go index 2e9ad387eb..5a6a006c31 100644 --- a/mongo/integration/unified/unified_spec_runner.go +++ b/internal/integration/unified/unified_spec_runner.go @@ -17,9 +17,9 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/internal/spectest" "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" ) var ( diff --git a/mongo/integration/unified/unified_spec_test.go b/internal/integration/unified/unified_spec_test.go similarity index 100% rename from mongo/integration/unified/unified_spec_test.go rename to internal/integration/unified/unified_spec_test.go diff --git a/mongo/integration/unified_runner_events_helper_test.go b/internal/integration/unified_runner_events_helper_test.go similarity index 98% rename from mongo/integration/unified_runner_events_helper_test.go rename to internal/integration/unified_runner_events_helper_test.go index 44d5cf5c8b..bf9ce10c5e 100644 --- a/mongo/integration/unified_runner_events_helper_test.go +++ b/internal/integration/unified_runner_events_helper_test.go @@ -13,9 +13,9 @@ import ( "go.mongodb.org/mongo-driver/event" "go.mongodb.org/mongo-driver/internal/assert" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/mongo/address" "go.mongodb.org/mongo-driver/mongo/description" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/readpref" "go.mongodb.org/mongo-driver/x/mongo/driver/topology" ) diff --git a/mongo/integration/unified_runner_thread_helpers_test.go b/internal/integration/unified_runner_thread_helpers_test.go similarity index 98% rename from mongo/integration/unified_runner_thread_helpers_test.go rename to internal/integration/unified_runner_thread_helpers_test.go index 8ab2530b3d..b35871980d 100644 --- a/mongo/integration/unified_runner_thread_helpers_test.go +++ b/internal/integration/unified_runner_thread_helpers_test.go @@ -12,7 +12,7 @@ import ( "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/internal/assert" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" + "go.mongodb.org/mongo-driver/internal/integration/mtest" ) // Helper functions for the operations in the unified spec test runner that require creating and synchronizing diff --git a/mongo/integration/unified_spec_test.go b/internal/integration/unified_spec_test.go similarity index 99% rename from mongo/integration/unified_spec_test.go rename to internal/integration/unified_spec_test.go index 63563e98d5..65050add57 100644 --- a/mongo/integration/unified_spec_test.go +++ b/internal/integration/unified_spec_test.go @@ -26,11 +26,11 @@ import ( "go.mongodb.org/mongo-driver/event" "go.mongodb.org/mongo-driver/internal/assert" "go.mongodb.org/mongo-driver/internal/bsonutil" + "go.mongodb.org/mongo-driver/internal/integration/mtest" "go.mongodb.org/mongo-driver/internal/integtest" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/address" "go.mongodb.org/mongo-driver/mongo/gridfs" - "go.mongodb.org/mongo-driver/mongo/integration/mtest" "go.mongodb.org/mongo-driver/mongo/options" "go.mongodb.org/mongo-driver/mongo/readconcern" "go.mongodb.org/mongo-driver/mongo/readpref"