Skip to content

Commit

Permalink
Move /data directory to /testdata. (#1061)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewdale authored Sep 13, 2022
1 parent 467541a commit d2ec1fc
Show file tree
Hide file tree
Showing 1,781 changed files with 34 additions and 34 deletions.
16 changes: 8 additions & 8 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -481,8 +481,8 @@ functions:
export AWS_DEFAULT_REGION="us-east-1"
# Set client-side encryption credentials.
export CSFLE_TLS_CA_FILE="$PROJECT_DIRECTORY/data/kmip-certs/ca-ec.pem"
export CSFLE_TLS_CERTIFICATE_KEY_FILE="$PROJECT_DIRECTORY/data/kmip-certs/client-ec.pem"
export CSFLE_TLS_CA_FILE="$PROJECT_DIRECTORY/testdata/kmip-certs/ca-ec.pem"
export CSFLE_TLS_CERTIFICATE_KEY_FILE="$PROJECT_DIRECTORY/testdata/kmip-certs/client-ec.pem"
${PYTHON3_BINARY} -m venv ./venv
./venv/${VENV_BIN_DIR|bin}/pip3 install boto3
Expand Down Expand Up @@ -951,13 +951,13 @@ functions:
if [ "Windows_NT" = "$OS" ]; then
kmstlsvenv/Scripts/python.exe -u kms_kmip_server.py \
--port 5698 \
--ca_file "${PROJECT_DIRECTORY}/data/kmip-certs/ca-ec.pem" \
--cert_file "${PROJECT_DIRECTORY}/data/kmip-certs/server-ec.pem"
--ca_file "${PROJECT_DIRECTORY}/testdata/kmip-certs/ca-ec.pem" \
--cert_file "${PROJECT_DIRECTORY}/testdata/kmip-certs/server-ec.pem"
else
./kmstlsvenv/bin/python3 -u kms_kmip_server.py \
--port 5698 \
--ca_file "${PROJECT_DIRECTORY}/data/kmip-certs/ca-ec.pem" \
--cert_file "${PROJECT_DIRECTORY}/data/kmip-certs/server-ec.pem"
--ca_file "${PROJECT_DIRECTORY}/testdata/kmip-certs/ca-ec.pem" \
--cert_file "${PROJECT_DIRECTORY}/testdata/kmip-certs/server-ec.pem"
fi
run-kms-tls-test:
Expand Down Expand Up @@ -1010,8 +1010,8 @@ functions:
AZURE_CLIENT_SECRET="${cse_azure_client_secret}" \
GCP_EMAIL="${cse_gcp_email}" \
GCP_PRIVATE_KEY="${cse_gcp_private_key}" \
CSFLE_TLS_CA_FILE="$PROJECT_DIRECTORY/data/kmip-certs/ca-ec.pem"
CSFLE_TLS_CERTIFICATE_KEY_FILE="$PROJECT_DIRECTORY/data/kmip-certs/client-ec.pem"
CSFLE_TLS_CA_FILE="$PROJECT_DIRECTORY/testdata/kmip-certs/ca-ec.pem"
CSFLE_TLS_CERTIFICATE_KEY_FILE="$PROJECT_DIRECTORY/testdata/kmip-certs/client-ec.pem"
make evg-test-kmip \
PKG_CONFIG_PATH=$PKG_CONFIG_PATH \
LD_LIBRARY_PATH=$LD_LIBRARY_PATH
Expand Down
4 changes: 2 additions & 2 deletions .evergreen/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ else
echo "crypt_shared library will be loaded from path: $CRYPT_SHARED_LIB_PATH"
fi

CSFLE_TLS_CA_FILE="$(pwd)/data/kmip-certs/ca-ec.pem"
CSFLE_TLS_CERTIFICATE_KEY_FILE="$(pwd)/data/kmip-certs/client-ec.pem"
CSFLE_TLS_CA_FILE="$(pwd)/testdata/kmip-certs/ca-ec.pem"
CSFLE_TLS_CERTIFICATE_KEY_FILE="$(pwd)/testdata/kmip-certs/client-ec.pem"

if [ "Windows_NT" = "$OS" ]; then
CSFLE_TLS_CA_FILE=$(cygpath -m $CSFLE_TLS_CA_FILE)
Expand Down
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ issues:
skip-dirs:
- (^|/)vendor($|/)
- (^|/)testdata($|/)
- (^|/)data($|/)
- (^|/)etc($|/)
exclude-rules:
# Ignore some linters for example code that is intentionally simplified.
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ driver-benchmark:perf
@go run cmd/godriver-benchmark/main.go | tee perf.suite

perf:driver-test-data.tar.gz
tar -zxf $< $(if $(eq $(UNAME_S),Darwin),-s , --transform=s)/data/perf/
tar -zxf $< $(if $(eq $(UNAME_S),Darwin),-s , --transform=s)/testdata/perf/
@touch $@

driver-test-data.tar.gz:
curl --retry 5 "https://s3.amazonaws.com/boxes.10gen.com/build/driver-test-data.tar.gz" -o driver-test-data.tar.gz --silent --max-time 120
4 changes: 2 additions & 2 deletions bson/benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ var nestedInstance = nestedtest1{
},
}

const extendedBSONDir = "../data/extended_bson"
const extendedBSONDir = "../testdata/extended_bson"

// readExtJSONFile reads the GZIP-compressed extended JSON document from the given filename in the
// "extended BSON" test data directory (../data/extended_bson) and returns it as a
// "extended BSON" test data directory (../testdata/extended_bson) and returns it as a
// map[string]interface{}. It panics on any errors.
func readExtJSONFile(filename string) map[string]interface{} {
filePath := path.Join(extendedBSONDir, filename)
Expand Down
2 changes: 1 addition & 1 deletion bson/bson_corpus_spec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ type parseErrorTestCase struct {
String string `json:"string"`
}

const dataDir = "../data/bson-corpus/"
const dataDir = "../testdata/bson-corpus/"

func findJSONFilesInDir(t *testing.T, dir string) []string {
files := make([]string, 0)
Expand Down
2 changes: 1 addition & 1 deletion mongo/description/max_staleness_spec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"go.mongodb.org/mongo-driver/internal/testutil/helpers"
)

const maxStalenessTestsDir = "../../data/max-staleness"
const maxStalenessTestsDir = "../../testdata/max-staleness"

// Test case for all max staleness spec tests.
func TestMaxStalenessSpec(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion mongo/description/selector_spec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"go.mongodb.org/mongo-driver/internal/testutil/helpers"
)

const selectorTestsDir = "../../data/server-selection/server_selection"
const selectorTestsDir = "../../testdata/server-selection/server_selection"

// Test case for all SDAM spec tests.
func TestServerSelectionSpec(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion mongo/integration/client_side_encryption_prose_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var (
)

const (
clientEncryptionProseDir = "../../data/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
Expand Down
2 changes: 1 addition & 1 deletion mongo/integration/command_monitoring_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
)

const (
monitoringTestDir = "../../data/command-monitoring/legacy"
monitoringTestDir = "../../testdata/command-monitoring/legacy"
)

type monitoringTestFile struct {
Expand Down
2 changes: 1 addition & 1 deletion mongo/integration/crud_spec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
)

const (
crudTestsDir = "../../data/crud"
crudTestsDir = "../../testdata/crud"
crudReadDir = "v1/read"
crudWriteDir = "v1/write"
)
Expand Down
2 changes: 1 addition & 1 deletion mongo/integration/gridfs_spec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ type gridfsAssert struct {
}

const (
gridfsTestsDir = "../../data/gridfs"
gridfsTestsDir = "../../testdata/gridfs"
gridfsFiles = "fs.files"
gridfsChunks = "fs.chunks"
gridfsExpectedFiles = "expected.files"
Expand Down
2 changes: 1 addition & 1 deletion mongo/integration/initial_dns_seedlist_discovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
)

const (
seedlistDiscoveryTestsBaseDir = "../../data/initial-dns-seedlist-discovery"
seedlistDiscoveryTestsBaseDir = "../../testdata/initial-dns-seedlist-discovery"
)

type seedlistTest struct {
Expand Down
2 changes: 1 addition & 1 deletion mongo/integration/retryable_writes_spec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"go.mongodb.org/mongo-driver/mongo/integration/mtest"
)

const retryableWritesTestDir = "../../data/retryable-writes/legacy"
const retryableWritesTestDir = "../../testdata/retryable-writes/legacy"

type retryableWritesTestFile struct {
RunOn []mtest.RunOnBlock `bson:"runOn"`
Expand Down
2 changes: 1 addition & 1 deletion mongo/integration/unified/unified_spec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var (
)

const (
dataDirectory = "../../../data"
dataDirectory = "../../../testdata"
)

func TestUnifiedSpec(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion mongo/integration/unified_spec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ type operationError struct {
ErrorLabelsOmit []string `bson:"errorLabelsOmit"`
}

const dataPath string = "../../data/"
const dataPath string = "../../testdata/"

var directories = []string{
"transactions/legacy",
Expand Down
2 changes: 1 addition & 1 deletion mongo/read_write_concern_spec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
)

const (
readWriteConcernTestsDir = "../data/read-write-concern"
readWriteConcernTestsDir = "../testdata/read-write-concern"
connstringTestsDir = "connection-string"
documentTestsDir = "document"
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit d2ec1fc

Please sign in to comment.