diff --git a/Taskfile.yml b/Taskfile.yml index 4fb12f3704..d5aa730ff9 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -110,8 +110,8 @@ tasks: - 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 -p 1 ./... >> test.suite evg-test-atlas-data-lake: - - 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 + - ATLAS_DATA_LAKE_INTEGRATION_TEST=true go test -v ./mongo -run TestUnifiedSpecs/atlas-data-lake-testing >> spec_test.suite + - ATLAS_DATA_LAKE_INTEGRATION_TEST=true go test -v ./mongo -run TestAtlasDataLake >> spec_test.suite evg-test-enterprise-auth: - go run -tags gssapi ./internal/cmd/testentauth/main.go @@ -121,29 +121,29 @@ tasks: - go run -race ./internal/cmd/testoidcauth/main.go 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 - - 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/corpus >> 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/custom_endpoint >> 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/kms_tls_options_test >> 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 ./mongo -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 ./mongo -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} DYLD_LIBRARY_PATH=${MACOS_LIBRARY_PATH}" ${BUILD_TAGS} -v -timeout {{.TEST_TIMEOUT}}s ./mongo -run TestClientSideEncryptionProse/corpus >> 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 ./mongo -run TestClientSideEncryptionProse/custom_endpoint >> 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 ./mongo -run TestClientSideEncryptionProse/kms_tls_options_test >> test.suite 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 + - go test -exec "env PKG_CONFIG_PATH=${PKG_CONFIG_PATH} LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" ${BUILD_TAGS} -v -timeout {{.TEST_TIMEOUT}}s ./mongo -run TestClientSideEncryptionProse/kms_tls_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. - - 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 + - go test ${BUILD_TAGS} ./mongo -run TestUnifiedSpecs/retryable-reads -v -timeout {{.TEST_TIMEOUT}}s >> test.suite + - go test ${BUILD_TAGS} ./mongo -run TestRetryableWritesSpec -v -timeout {{.TEST_TIMEOUT}}s >> test.suite + - go test ${BUILD_TAGS} ./mongo -run TestChangeStreamSpec -v -timeout {{.TEST_TIMEOUT}}s >> test.suite + - go test ${BUILD_TAGS} ./mongo -run TestInitialDNSSeedlistDiscoverySpec/load_balanced -v -timeout {{.TEST_TIMEOUT}}s >> test.suite + - go test ${BUILD_TAGS} ./mongo -run TestLoadBalancerSupport -v -timeout {{.TEST_TIMEOUT}}s >> test.suite + - go test ${BUILD_TAGS} ./mongo -run TestLoadBalancedConnectionHandshake -v -timeout {{.TEST_TIMEOUT}}s >> test.suite + - go test ${BUILD_TAGS} ./mongo/unified -run TestUnifiedSpec -v -timeout {{.TEST_TIMEOUT}}s >> test.suite evg-test-search-index: # Use the long timeout to wait for the responses from the server. - - go test ./internal/integration -run TestSearchIndexProse -v -timeout {{.LONG_TEST_TIMEOUT}}s >> test.suite + - go test ./mongo -run TestSearchIndexProse -v -timeout {{.LONG_TEST_TIMEOUT}}s >> test.suite evg-test-ocsp: - go test -v ./mongo -run TestOCSP ${OCSP_TLS_SHOULD_SUCCEED} >> test.suite @@ -151,31 +151,31 @@ tasks: 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} ./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} DYLD_LIBRARY_PATH=${MACOS_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} DYLD_LIBRARY_PATH=${MACOS_LIBRARY_PATH}" ${BUILD_TAGS} -v -timeout {{.TEST_TIMEOUT}}s ./internal/integration -run TestClientSideEncryptionProse >> test.suite + - go test ${BUILD_TAGS} ./mongo -run TestCrudSpec -v -timeout {{.TEST_TIMEOUT}}s >> test.suite + - go test ${BUILD_TAGS} ./mongo -run TestWriteErrorsWithLabels -v -timeout {{.TEST_TIMEOUT}}s >> test.suite + - go test ${BUILD_TAGS} ./mongo -run TestWriteErrorsDetails -v -timeout {{.TEST_TIMEOUT}}s >> test.suite + - go test ${BUILD_TAGS} ./mongo -run TestHintErrors -v -timeout {{.TEST_TIMEOUT}}s >> test.suite + - go test ${BUILD_TAGS} ./mongo -run TestWriteConcernError -v -timeout {{.TEST_TIMEOUT}}s >> test.suite + - go test ${BUILD_TAGS} ./mongo -run TestErrorsCodeNamePropagated -v -timeout {{.TEST_TIMEOUT}}s >> test.suite + - go test ${BUILD_TAGS} ./mongo -run TestLoadBalancerSupport -v -timeout {{.TEST_TIMEOUT}}s >> test.suite + - go test ${BUILD_TAGS} ./mongo -run TestUnifiedSpecs/retryable-reads -v -timeout {{.TEST_TIMEOUT}}s >> test.suite + - go test ${BUILD_TAGS} ./mongo -run TestRetryableReadsProse -v -timeout {{.TEST_TIMEOUT}}s >> test.suite + - go test ${BUILD_TAGS} ./mongo -run TestRetryableWritesSpec -v -timeout {{.TEST_TIMEOUT}}s >> test.suite + - go test ${BUILD_TAGS} ./mongo -run TestRetryableWritesProse -v -timeout {{.TEST_TIMEOUT}}s >> test.suite + - go test ${BUILD_TAGS} ./mongo -run TestUnifiedSpecs/sessions -v -timeout {{.TEST_TIMEOUT}}s >> test.suite + - go test ${BUILD_TAGS} ./mongo -run TestSessionsProse -v -timeout {{.TEST_TIMEOUT}}s >> test.suite + - go test ${BUILD_TAGS} ./mongo -run TestUnifiedSpecs/transactions/legacy -v -timeout {{.TEST_TIMEOUT}}s >> test.suite + - go test ${BUILD_TAGS} ./mongo -run TestConvenientTransactions -v -timeout {{.TEST_TIMEOUT}}s >> test.suite + - go test ${BUILD_TAGS} ./mongo -run TestCursor -v -timeout {{.TEST_TIMEOUT}}s >> test.suite + - go test ${BUILD_TAGS} ./mongo/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} DYLD_LIBRARY_PATH=${MACOS_LIBRARY_PATH}" ${BUILD_TAGS} -v -timeout {{.TEST_TIMEOUT}}s ./mongo -run TestClientSideEncryptionSpec >> 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 ./mongo -run TestClientSideEncryptionProse >> test.suite 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} DYLD_LIBRARY_PATH=${MACOS_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} DYLD_LIBRARY_PATH=${MACOS_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} DYLD_LIBRARY_PATH=${MACOS_LIBRARY_PATH}" ${BUILD_TAGS} -v -timeout {{.TEST_TIMEOUT}}s ./internal/integration/unified >> 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 ./mongo >> 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 ./mongo/unified >> test.suite evg-test-aws: bash etc/run-mongodb-aws-test.sh {{.CLI_ARGS}} diff --git a/internal/integration/main.go b/internal/integration/main.go deleted file mode 100644 index 16e89d3263..0000000000 --- a/internal/integration/main.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// 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 integration - -// This file exists to allow the build scripts (and standard Go builds for some early Go versions) -// to succeed. Without it, the build may encounter an error like: -// -// go build go.mongodb.org/mongo-driver/mongo/integration: build constraints exclude all Go files in ./go.mongodb.org/mongo-driver/mongo/integration -// diff --git a/internal/integration/causal_consistency_test.go b/mongo/causal_consistency_integ_test.go similarity index 99% rename from internal/integration/causal_consistency_test.go rename to mongo/causal_consistency_integ_test.go index 2f997f956e..b185d375ab 100644 --- a/internal/integration/causal_consistency_test.go +++ b/mongo/causal_consistency_integ_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 integration +package mongo_test import ( "context" diff --git a/internal/integration/change_stream_test.go b/mongo/change_stream_integ_test.go similarity index 99% rename from internal/integration/change_stream_test.go rename to mongo/change_stream_integ_test.go index 4bacc746bd..ffd14fc0be 100644 --- a/internal/integration/change_stream_test.go +++ b/mongo/change_stream_integ_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 integration +package mongo_test import ( "context" diff --git a/internal/integration/clam_prose_test.go b/mongo/clam_prose_test.go similarity index 99% rename from internal/integration/clam_prose_test.go rename to mongo/clam_prose_test.go index f4aaf7eb7c..a13224bb35 100644 --- a/internal/integration/clam_prose_test.go +++ b/mongo/clam_prose_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 integration +package mongo_test import ( "context" diff --git a/internal/integration/client_test.go b/mongo/client_integ_test.go similarity index 99% rename from internal/integration/client_test.go rename to mongo/client_integ_test.go index d08792d74a..9b6b0402c7 100644 --- a/internal/integration/client_test.go +++ b/mongo/client_integ_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 integration +package mongo_test import ( "context" diff --git a/internal/integration/client_options_test.go b/mongo/client_options_integ_test.go similarity index 98% rename from internal/integration/client_options_test.go rename to mongo/client_options_integ_test.go index 5a771076a5..111b9ad5ce 100644 --- a/internal/integration/client_options_test.go +++ b/mongo/client_options_integ_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 integration +package mongo_test import ( "context" diff --git a/internal/integration/client_side_encryption_test.go b/mongo/client_side_encryption_integ_test.go similarity index 99% rename from internal/integration/client_side_encryption_test.go rename to mongo/client_side_encryption_integ_test.go index 1111a71021..230f46eca1 100644 --- a/internal/integration/client_side_encryption_test.go +++ b/mongo/client_side_encryption_integ_test.go @@ -7,7 +7,7 @@ //go:build cse // +build cse -package integration +package mongo_test import ( "context" diff --git a/internal/integration/client_side_encryption_prose_test.go b/mongo/client_side_encryption_prose_test.go similarity index 99% rename from internal/integration/client_side_encryption_prose_test.go rename to mongo/client_side_encryption_prose_test.go index 0620b9ff10..632d4bef94 100644 --- a/internal/integration/client_side_encryption_prose_test.go +++ b/mongo/client_side_encryption_prose_test.go @@ -7,7 +7,7 @@ //go:build cse // +build cse -package integration +package mongo_test import ( "bytes" @@ -43,7 +43,7 @@ var ( ) const ( - clientEncryptionProseDir = "../../testdata/client-side-encryption-prose" + clientEncryptionProseDir = "../testdata/client-side-encryption-prose" deterministicAlgorithm = "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" randomAlgorithm = "AEAD_AES_256_CBC_HMAC_SHA_512-Random" kvNamespace = "keyvault.datakeys" // default namespace for the key vault collection diff --git a/internal/integration/client_side_encryption_spec_test.go b/mongo/client_side_encryption_spec_test.go similarity index 98% rename from internal/integration/client_side_encryption_spec_test.go rename to mongo/client_side_encryption_spec_test.go index 6a591f5879..cbc88edc7e 100644 --- a/internal/integration/client_side_encryption_spec_test.go +++ b/mongo/client_side_encryption_spec_test.go @@ -7,7 +7,7 @@ //go:build cse // +build cse -package integration +package mongo_test import ( "os" diff --git a/internal/integration/cmd_monitoring_helpers_test.go b/mongo/cmd_monitoring_helpers_test.go similarity index 99% rename from internal/integration/cmd_monitoring_helpers_test.go rename to mongo/cmd_monitoring_helpers_test.go index e4afa1a08d..cb9a60b5ab 100644 --- a/internal/integration/cmd_monitoring_helpers_test.go +++ b/mongo/cmd_monitoring_helpers_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 integration +package mongo_test import ( "bytes" diff --git a/internal/integration/collection_test.go b/mongo/collection_integ_test.go similarity index 99% rename from internal/integration/collection_test.go rename to mongo/collection_integ_test.go index b370b09418..0357a51629 100644 --- a/internal/integration/collection_test.go +++ b/mongo/collection_integ_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 integration +package mongo_test import ( "context" diff --git a/internal/integration/crud_helpers_test.go b/mongo/crud_helpers_test.go similarity index 99% rename from internal/integration/crud_helpers_test.go rename to mongo/crud_helpers_test.go index 3d4e490ba2..98805c6152 100644 --- a/internal/integration/crud_helpers_test.go +++ b/mongo/crud_helpers_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 integration +package mongo_test import ( "bytes" diff --git a/internal/integration/crud_prose_test.go b/mongo/crud_prose_test.go similarity index 99% rename from internal/integration/crud_prose_test.go rename to mongo/crud_prose_test.go index e77f4b553c..b187530ba4 100644 --- a/internal/integration/crud_prose_test.go +++ b/mongo/crud_prose_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 integration +package mongo_test import ( "bytes" diff --git a/internal/integration/crud_spec_test.go b/mongo/crud_spec_test.go similarity index 99% rename from internal/integration/crud_spec_test.go rename to mongo/crud_spec_test.go index 859de77d6a..6db167611c 100644 --- a/internal/integration/crud_spec_test.go +++ b/mongo/crud_spec_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 integration +package mongo_test import ( "bytes" @@ -24,7 +24,7 @@ import ( ) const ( - crudTestsDir = "../../testdata/crud" + crudTestsDir = "../testdata/crud" crudReadDir = "v1/read" crudWriteDir = "v1/write" ) diff --git a/internal/integration/csot_cse_prose_test.go b/mongo/csot_cse_prose_test.go similarity index 99% rename from internal/integration/csot_cse_prose_test.go rename to mongo/csot_cse_prose_test.go index 3eb91369ad..e64b8ad103 100644 --- a/internal/integration/csot_cse_prose_test.go +++ b/mongo/csot_cse_prose_test.go @@ -7,7 +7,7 @@ //go:build cse // +build cse -package integration +package mongo_test import ( "context" diff --git a/internal/integration/csot_test.go b/mongo/csot_integ_test.go similarity index 99% rename from internal/integration/csot_test.go rename to mongo/csot_integ_test.go index 6808efb2a4..b42c1ba461 100644 --- a/internal/integration/csot_test.go +++ b/mongo/csot_integ_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 integration +package mongo_test import ( "context" diff --git a/internal/integration/csot_prose_test.go b/mongo/csot_prose_test.go similarity index 99% rename from internal/integration/csot_prose_test.go rename to mongo/csot_prose_test.go index 960891ee5c..b9b48435ba 100644 --- a/internal/integration/csot_prose_test.go +++ b/mongo/csot_prose_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 integration +package mongo_test import ( "bytes" diff --git a/internal/integration/cursor_test.go b/mongo/cursor_integ_test.go similarity index 99% rename from internal/integration/cursor_test.go rename to mongo/cursor_integ_test.go index 5ee9986ec2..c2e77acca0 100644 --- a/internal/integration/cursor_test.go +++ b/mongo/cursor_integ_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 integration +package mongo_test import ( "context" diff --git a/internal/integration/data_lake_test.go b/mongo/data_lake_integ_test.go similarity index 99% rename from internal/integration/data_lake_test.go rename to mongo/data_lake_integ_test.go index 6c10f9a9e6..0e4ccb1c6b 100644 --- a/internal/integration/data_lake_test.go +++ b/mongo/data_lake_integ_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 integration +package mongo_test import ( "context" diff --git a/internal/integration/database_test.go b/mongo/database_integ_test.go similarity index 99% rename from internal/integration/database_test.go rename to mongo/database_integ_test.go index c661b3b49b..aac4b6d1d0 100644 --- a/internal/integration/database_test.go +++ b/mongo/database_integ_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 integration +package mongo_test import ( "bytes" diff --git a/internal/integration/errors_test.go b/mongo/errors_integ_test.go similarity index 99% rename from internal/integration/errors_test.go rename to mongo/errors_integ_test.go index a33b8df93a..7133f90580 100644 --- a/internal/integration/errors_test.go +++ b/mongo/errors_integ_test.go @@ -7,7 +7,7 @@ //go:build go1.13 // +build go1.13 -package integration +package mongo_test import ( "context" diff --git a/internal/integration/gridfs_test.go b/mongo/gridfs_integ_test.go similarity index 99% rename from internal/integration/gridfs_test.go rename to mongo/gridfs_integ_test.go index 76b4cdf318..e8665b0c3c 100644 --- a/internal/integration/gridfs_test.go +++ b/mongo/gridfs_integ_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 integration +package mongo_test import ( "bytes" diff --git a/internal/integration/handshake_test.go b/mongo/handshake_integ_test.go similarity index 99% rename from internal/integration/handshake_test.go rename to mongo/handshake_integ_test.go index a11339981d..e04a438ec3 100644 --- a/internal/integration/handshake_test.go +++ b/mongo/handshake_integ_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 integration +package mongo_test import ( "context" diff --git a/internal/integration/index_view_test.go b/mongo/index_view_integ_test.go similarity index 99% rename from internal/integration/index_view_test.go rename to mongo/index_view_integ_test.go index 62625c777a..96666e8bc5 100644 --- a/internal/integration/index_view_test.go +++ b/mongo/index_view_integ_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 integration +package mongo_test import ( "context" diff --git a/internal/integration/initial_dns_seedlist_discovery_test.go b/mongo/initial_dns_seedlist_discovery_integ_test.go similarity index 98% rename from internal/integration/initial_dns_seedlist_discovery_test.go rename to mongo/initial_dns_seedlist_discovery_integ_test.go index de9d44a058..f32e5c3395 100644 --- a/internal/integration/initial_dns_seedlist_discovery_test.go +++ b/mongo/initial_dns_seedlist_discovery_integ_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 integration +package mongo_test import ( "bytes" @@ -30,7 +30,7 @@ import ( ) const ( - seedlistDiscoveryTestsBaseDir = "../../testdata/initial-dns-seedlist-discovery" + seedlistDiscoveryTestsBaseDir = "../testdata/initial-dns-seedlist-discovery" ) type seedlistTest struct { diff --git a/internal/integration/json_helpers_test.go b/mongo/json_helpers_test.go similarity index 99% rename from internal/integration/json_helpers_test.go rename to mongo/json_helpers_test.go index 51c46d546b..069654144b 100644 --- a/internal/integration/json_helpers_test.go +++ b/mongo/json_helpers_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 integration +package mongo_test import ( "crypto/tls" diff --git a/internal/integration/load_balancer_prose_test.go b/mongo/load_balancer_prose_test.go similarity index 99% rename from internal/integration/load_balancer_prose_test.go rename to mongo/load_balancer_prose_test.go index 274752d69b..0810a0c602 100644 --- a/internal/integration/load_balancer_prose_test.go +++ b/mongo/load_balancer_prose_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 integration +package mongo_test import ( "context" diff --git a/internal/integration/log_helpers_test.go b/mongo/log_helpers_test.go similarity index 99% rename from internal/integration/log_helpers_test.go rename to mongo/log_helpers_test.go index 20f4f34e34..bac9434c09 100644 --- a/internal/integration/log_helpers_test.go +++ b/mongo/log_helpers_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 integration +package mongo_test import ( "context" diff --git a/internal/integration/main_test.go b/mongo/main_integ_test.go similarity index 97% rename from internal/integration/main_test.go rename to mongo/main_integ_test.go index 8f0f5cb4ac..39cc8e3218 100644 --- a/internal/integration/main_test.go +++ b/mongo/main_integ_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 integration +package mongo_test import ( "flag" diff --git a/internal/integration/mock_find_test.go b/mongo/mock_find_integ_test.go similarity index 99% rename from internal/integration/mock_find_test.go rename to mongo/mock_find_integ_test.go index 0775d7443f..389a96351e 100644 --- a/internal/integration/mock_find_test.go +++ b/mongo/mock_find_integ_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 integration +package mongo_test import ( "context" diff --git a/internal/integration/mongos_pinning_test.go b/mongo/mongos_pinning_integ_test.go similarity index 99% rename from internal/integration/mongos_pinning_test.go rename to mongo/mongos_pinning_integ_test.go index 7fc5af9349..fef3a59be2 100644 --- a/internal/integration/mongos_pinning_test.go +++ b/mongo/mongos_pinning_integ_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 integration +package mongo_test import ( "context" diff --git a/internal/integration/primary_stepdown_test.go b/mongo/primary_stepdown_integ_test.go similarity index 99% rename from internal/integration/primary_stepdown_test.go rename to mongo/primary_stepdown_integ_test.go index ac7f7b4f21..06b70ffd6b 100644 --- a/internal/integration/primary_stepdown_test.go +++ b/mongo/primary_stepdown_integ_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 integration +package mongo_test import ( "context" diff --git a/internal/integration/retryable_reads_prose_test.go b/mongo/retryable_reads_prose_test.go similarity index 99% rename from internal/integration/retryable_reads_prose_test.go rename to mongo/retryable_reads_prose_test.go index 3b2b50f2c8..92b9d71e4c 100644 --- a/internal/integration/retryable_reads_prose_test.go +++ b/mongo/retryable_reads_prose_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 integration +package mongo_test import ( "context" diff --git a/internal/integration/retryable_writes_prose_test.go b/mongo/retryable_writes_prose_test.go similarity index 99% rename from internal/integration/retryable_writes_prose_test.go rename to mongo/retryable_writes_prose_test.go index 64f070ff7c..9a7e87a461 100644 --- a/internal/integration/retryable_writes_prose_test.go +++ b/mongo/retryable_writes_prose_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 integration +package mongo_test import ( "bytes" diff --git a/internal/integration/retryable_writes_spec_test.go b/mongo/retryable_writes_spec_test.go similarity index 96% rename from internal/integration/retryable_writes_spec_test.go rename to mongo/retryable_writes_spec_test.go index d4cc783554..6eaddc7d73 100644 --- a/internal/integration/retryable_writes_spec_test.go +++ b/mongo/retryable_writes_spec_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 integration +package mongo_test import ( "bytes" @@ -18,7 +18,7 @@ import ( "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" ) -const retryableWritesTestDir = "../../testdata/retryable-writes/legacy" +const retryableWritesTestDir = "../testdata/retryable-writes/legacy" type retryableWritesTestFile struct { RunOn []mtest.RunOnBlock `bson:"runOn"` diff --git a/internal/integration/sdam_error_handling_test.go b/mongo/sdam_error_handling_integ_test.go similarity index 99% rename from internal/integration/sdam_error_handling_test.go rename to mongo/sdam_error_handling_integ_test.go index ceaa5a59f8..e53a55376f 100644 --- a/internal/integration/sdam_error_handling_test.go +++ b/mongo/sdam_error_handling_integ_test.go @@ -7,7 +7,7 @@ //go:build go1.13 // +build go1.13 -package integration +package mongo_test import ( "context" diff --git a/internal/integration/sdam_prose_test.go b/mongo/sdam_prose_test.go similarity index 99% rename from internal/integration/sdam_prose_test.go rename to mongo/sdam_prose_test.go index 74e5d809fe..0864374207 100644 --- a/internal/integration/sdam_prose_test.go +++ b/mongo/sdam_prose_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 integration +package mongo_test import ( "context" diff --git a/internal/integration/search_index_prose_test.go b/mongo/search_index_prose_test.go similarity index 99% rename from internal/integration/search_index_prose_test.go rename to mongo/search_index_prose_test.go index a9fbfef4a4..8fd02b08c7 100644 --- a/internal/integration/search_index_prose_test.go +++ b/mongo/search_index_prose_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 integration +package mongo_test import ( "bytes" diff --git a/internal/integration/server_selection_prose_test.go b/mongo/server_selection_prose_test.go similarity index 99% rename from internal/integration/server_selection_prose_test.go rename to mongo/server_selection_prose_test.go index 05641dbf75..a3caeebe0c 100644 --- a/internal/integration/server_selection_prose_test.go +++ b/mongo/server_selection_prose_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 integration +package mongo_test import ( "context" diff --git a/internal/integration/sessions_test.go b/mongo/sessions_integ_test.go similarity index 99% rename from internal/integration/sessions_test.go rename to mongo/sessions_integ_test.go index 02a345fd38..9da7e69c32 100644 --- a/internal/integration/sessions_test.go +++ b/mongo/sessions_integ_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 integration +package mongo_test import ( "bytes" diff --git a/internal/integration/sessions_mongocryptd_prose_test.go b/mongo/sessions_mongocryptd_prose_test.go similarity index 99% rename from internal/integration/sessions_mongocryptd_prose_test.go rename to mongo/sessions_mongocryptd_prose_test.go index 5d088c26d5..65bd5bce1e 100644 --- a/internal/integration/sessions_mongocryptd_prose_test.go +++ b/mongo/sessions_mongocryptd_prose_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 integration +package mongo_test import ( "context" diff --git a/internal/integration/unified_runner_events_helper_test.go b/mongo/unified_runner_events_helper_test.go similarity index 99% rename from internal/integration/unified_runner_events_helper_test.go rename to mongo/unified_runner_events_helper_test.go index 5f27181aaa..7dec83d26e 100644 --- a/internal/integration/unified_runner_events_helper_test.go +++ b/mongo/unified_runner_events_helper_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 integration +package mongo_test import ( "context" diff --git a/internal/integration/unified_runner_thread_helpers_test.go b/mongo/unified_runner_thread_helpers_test.go similarity index 99% rename from internal/integration/unified_runner_thread_helpers_test.go rename to mongo/unified_runner_thread_helpers_test.go index 7dd284e2d5..c96400efda 100644 --- a/internal/integration/unified_runner_thread_helpers_test.go +++ b/mongo/unified_runner_thread_helpers_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 integration +package mongo_test import ( "bytes" diff --git a/internal/integration/unified_spec_test.go b/mongo/unified_spec_test.go similarity index 99% rename from internal/integration/unified_spec_test.go rename to mongo/unified_spec_test.go index 6b37dc254c..a998fb6772 100644 --- a/internal/integration/unified_spec_test.go +++ b/mongo/unified_spec_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 integration +package mongo_test import ( "bytes" @@ -173,7 +173,7 @@ type operationError struct { ErrorLabelsOmit []string `bson:"errorLabelsOmit"` } -const dataPath string = "../../testdata/" +const dataPath string = "../testdata/" var directories = []string{ "transactions/legacy",