Skip to content

Commit

Permalink
handle spaces in variables
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Sep 13, 2024
1 parent 3939570 commit 79c2b13
Show file tree
Hide file tree
Showing 19 changed files with 38 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .evergreen/run-deployed-lambda-aws-tests.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
set -eux

# Source .env file if it exists
test -f .env && export $(grep -v '^#' .env | xargs -0) || true
# Source .env file if it exists.
. ./etc/dotenv.sh

source ${DRIVERS_TOOLS}/.evergreen/atlas/secrets-export.sh

Expand Down
4 changes: 2 additions & 2 deletions .evergreen/run-fuzz.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
set -eux

# Source .env file if it exists
test -f .env && export $(grep -v '^#' .env | xargs -0) || true
# Source .env file if it exists.
. ./etc/dotenv.sh

FUZZTIME=10m

Expand Down
4 changes: 2 additions & 2 deletions .evergreen/run-mongodb-aws-ecs-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Script to set up encryption assets and servers.
set -eux

# Source .env file if it exists
test -f .env && export $(grep -v '^#' .env | xargs -0) || true
# Source .env file if it exists.
. ./etc/dotenv.sh

if [[ -z "$1" ]]; then
echo "usage: $0 <MONGODB_URI>"
Expand Down
4 changes: 2 additions & 2 deletions .evergreen/run-mongodb-aws-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Script to set up encryption assets and servers.
set -eux

# Source .env file if it exists
test -f .env && export $(grep -v '^#' .env | xargs -0) || true
# Source .env file if it exists.
. ./etc/dotenv.sh

# Supported/used environment variables:
# MONGODB_URI Set the URI, including an optional username/password to use
Expand Down
4 changes: 2 additions & 2 deletions .evergreen/run-tests.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
set -eux

# Source .env file if it exists
test -f .env && export $(grep -v '^#' .env | xargs -0) || true
# Source .env file if it exists.
. ./etc/dotenv.sh

export PKG_CONFIG_PATH=$(pwd)/install/libmongocrypt/lib64/pkgconfig
export LD_LIBRARY_PATH=$(pwd)/install/libmongocrypt/lib64
Expand Down
4 changes: 2 additions & 2 deletions etc/check_fmt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Runs go fmt on all packages in the repo and checks that *_example_test.go files have wrapped lines.
set -eu

# Source .env file if it exists
test -f .env && export $(grep -v '^#' .env | xargs -0) || true
# Source .env file if it exists.
. ./etc/dotenv.sh

gofmt_out="$(go fmt ./...)"

Expand Down
4 changes: 2 additions & 2 deletions etc/check_modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# tidy" and expect that no unrelated changes are made to the "go.mod" file.
set -eu

# Source .env file if it exists
test -f .env && export $(grep -v '^#' .env | xargs -0) || true
# Source .env file if it exists.
. ./etc/dotenv.sh

mods=$(find . -name go.mod)
exit_code=0
Expand Down
4 changes: 2 additions & 2 deletions etc/compile_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ GC=go
COMPILE_CHECK_DIR="internal/cmd/compilecheck"
DEV_MIN_VERSION=1.19

# Source .env file if it exists
test -f .env && export $(grep -v '^#' .env | xargs -0) || true
# Source .env file if it exists.
. ./etc/dotenv.sh

# version will flatten a version string of upto 4 components for inequality
# comparison.
Expand Down
4 changes: 2 additions & 2 deletions etc/install-libmongocrypt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# This script installs libmongocrypt into an "install" directory.
set -eux

# Source .env file if it exists
test -f .env && export $(grep -v '^#' .env | xargs -0) || true
# Source .env file if it exists.
. ./etc/dotenv.sh

LIBMONGOCRYPT_TAG="1.11.0"

Expand Down
4 changes: 2 additions & 2 deletions etc/run-atlas-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
set -eu
set +x

# Source .env file if it exists
test -f .env && export $(grep -v '^#' .env | xargs -0) || true
# Source .env file if it exists.
. ./etc/dotenv.sh

# Get the atlas secrets.
. ${DRIVERS_TOOLS}/.evergreen/secrets_handling/setup-secrets.sh drivers/atlas_connect
Expand Down
4 changes: 2 additions & 2 deletions etc/run-awskms-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Runs the awskms test.
set -eu

# Source .env file if it exists
test -f .env && export $(grep -v '^#' .env | xargs -0) || true
# Source .env file if it exists.
. ./etc/dotenv.sh

echo "Building build-kms-test ... begin"
BUILD_TAGS="-tags=cse" \
Expand Down
4 changes: 2 additions & 2 deletions etc/run-enterprise-gssapi-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Runs the enterprise auth tests with gssapi credentials.
set -eu

# Source .env file if it exists
test -f .env && export $(grep -v '^#' .env | xargs -0) || true
# Source .env file if it exists.
. ./etc/dotenv.sh

. ${DRIVERS_TOOLS}/.evergreen/secrets_handling/setup-secrets.sh drivers/enterprise_auth
if [ "Windows_NT" = "${OS:-}" ]; then
Expand Down
4 changes: 2 additions & 2 deletions etc/run-enterprise-plain-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Runs the enterprise auth tests with plain credentials.
set -eu

# Source .env file if it exists
test -f .env && export $(grep -v '^#' .env | xargs -0) || true
# Source .env file if it exists.
. ./etc/dotenv.sh

. ${DRIVERS_TOOLS}/.evergreen/secrets_handling/setup-secrets.sh drivers/enterprise_auth
export MONGODB_URI="mongodb://${SASL_USER}:${SASL_PASS}@${SASL_HOST}:${SASL_PORT}/ldap?authMechanism=PLAIN"
Expand Down
4 changes: 2 additions & 2 deletions etc/run-oidc-remote-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Runs oidc auth remote tests.
set -eu

# Source .env file if it exists
test -f .env && export $(grep -v '^#' .env | xargs -0) || true
# Source .env file if it exists.
. ./etc/dotenv.sh

OIDC_DRIVERS_TAR_FILE=/tmp/mongo-go-driver.tar.gz
# we need to statically link libc to avoid the situation where the VM has a different
Expand Down
4 changes: 2 additions & 2 deletions etc/run-oidc-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ echo "Running MONGODB-OIDC authentication tests"

OIDC_ENV="${OIDC_ENV:-"test"}"

# Source .env file if it exists
test -f .env && export $(grep -v '^#' .env | xargs -0) || true
# Source .env file if it exists.
. ./etc/dotenv.sh

if [ $OIDC_ENV == "test" ]; then
# Make sure DRIVERS_TOOLS is set.
Expand Down
4 changes: 2 additions & 2 deletions etc/run-serverless-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Runs the serverless tests.
set -eu

# Source .env file if it exists
test -f .env && export $(grep -v '^#' .env | xargs -0) || true
# Source .env file if it exists.
. ./etc/dotenv.sh

source ${DRIVERS_TOOLS}/.evergreen/serverless/secrets-export.sh
AUTH="auth" \
Expand Down
4 changes: 2 additions & 2 deletions etc/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Go Driver task runner
set -eu

# Source .env file if it exists
test -f .env && export $(grep -v '^#' .env | xargs -0) || true
# Source .env file if it exists.
. ./etc/dotenv.sh

TEST_TIMEOUT=1800

Expand Down
4 changes: 2 additions & 2 deletions etc/run_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Script to run a test suite in docker locally
set -eux

# Source .env file if it exists
test -f .env && export $(grep -v '^#' .env | xargs -0) || true
# Source .env file if it exists.
. ./etc/dotenv.sh

if [ -z "$DRIVERS_TOOLS" ]; then
echo "Please set DRIVERS_TOOLS env variable."
Expand Down
4 changes: 2 additions & 2 deletions etc/setup-encryption.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Script to set up encryption assets and servers.
set -eux

# Source .env file if it exists
test -f .env && export $(grep -v '^#' .env | xargs -0) || true
# Source .env file if it exists.
. ./etc/dotenv.sh

if [ -z "$DRIVERS_TOOLS" ]; then
echo "Please define DRIVERS_TOOLS variable"
Expand Down

0 comments on commit 79c2b13

Please sign in to comment.