Skip to content

Commit b1d8768

Browse files
committed
fix kms logic
1 parent d8ecde9 commit b1d8768

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

.evergreen/run-azurekms-test.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,21 @@ export AZUREKMS_RESOURCEGROUP=${AZUREKMS_RESOURCEGROUP}
77
export AZUREKMS_VMNAME=${AZUREKMS_VMNAME}
88
export AZUREKMS_PRIVATEKEYPATH=/tmp/testazurekms_privatekey
99
LIBMONGOCRYPT_URL=https://s3.amazonaws.com/mciuploads/libmongocrypt/debian11/master/latest/libmongocrypt.tar.gz
10-
SUCCESS=true TEST_FLE_AZURE_AUTO=1 LIBMONGOCRYPT_URL=$LIBMONGOCRYPT_URL bash $HERE/scripts/setup-tests.sh
1110
# Set up the remote files to test.
1211
git add .
1312
git commit -m "add files" || true
14-
git archive -o /tmp/mongo-python-driver.tar --add-file $HERE/scripts/test-env.sh HEAD
15-
tar -rf /tmp/mongo-python-driver.tar libmongocrypt
16-
tar -rf /tmp/mongo-python-driver.tar
17-
gzip -f /tmp/mongo-python-driver.tar
13+
git archive -o /tmp/mongo-python-driver.tgz HEAD
1814
# shellcheck disable=SC2088
19-
AZUREKMS_SRC="/tmp/mongo-python-driver.tar.gz" AZUREKMS_DST="~/" \
15+
AZUREKMS_SRC="/tmp/mongo-python-driver.tgz" AZUREKMS_DST="~/" \
2016
$DRIVERS_TOOLS/.evergreen/csfle/azurekms/copy-file.sh
2117
echo "Copying files ... end"
2218
echo "Untarring file ... begin"
23-
AZUREKMS_CMD="tar xf mongo-python-driver.tar.gz" \
19+
AZUREKMS_CMD="tar xf mongo-python-driver.tgz" \
2420
$DRIVERS_TOOLS/.evergreen/csfle/azurekms/run-command.sh
2521
echo "Untarring file ... end"
2622
echo "Running test ... begin"
23+
AZUREKMS_CMD="SUCCESS=true TEST_FLE_AZURE_AUTO=1 LIBMONGOCRYPT_URL=$LIBMONGOCRYPT_URL bash .evergreen/just.sh setup-test" \
24+
$DRIVERS_TOOLS/.evergreen/csfle/azurekms/run-command.sh
2725
AZUREKMS_CMD="KEY_NAME=\"$AZUREKMS_KEYNAME\" KEY_VAULT_ENDPOINT=\"$AZUREKMS_KEYVAULTENDPOINT\" bash ./.evergreen/just.sh test-eg" \
2826
$DRIVERS_TOOLS/.evergreen/csfle/azurekms/run-command.sh
2927
echo "Running test ... end"

.evergreen/run-gcpkms-test.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,17 @@ export GCPKMS_PROJECT=${GCPKMS_PROJECT}
99
export GCPKMS_ZONE=${GCPKMS_ZONE}
1010
export GCPKMS_INSTANCENAME=${GCPKMS_INSTANCENAME}
1111
LIBMONGOCRYPT_URL=https://s3.amazonaws.com/mciuploads/libmongocrypt/debian11/master/latest/libmongocrypt.tar.gz
12-
SUCCESS=true TEST_FLE_GCP_AUTO=1 LIBMONGOCRYPT_URL=$LIBMONGOCRYPT_URL bash $HERE/scripts/setup-tests.sh
1312
# Set up the remote files to test.
1413
git add .
1514
git commit -m "add files" || true
16-
git archive -o /tmp/mongo-python-driver.tar --add-file $HERE/scripts/test-env.sh HEAD
17-
tar -rf /tmp/mongo-python-driver.tar libmongocrypt
18-
tar -rf /tmp/mongo-python-driver.tar
19-
gzip -f /tmp/mongo-python-driver.tar
15+
git archive -o /tmp/mongo-python-driver.tgz HEAD
2016
GCPKMS_SRC=/tmp/mongo-python-driver.tar.gz GCPKMS_DST=$GCPKMS_INSTANCENAME: $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/copy-file.sh
2117
echo "Copying files ... end"
2218
echo "Untarring file ... begin"
2319
GCPKMS_CMD="tar xf mongo-python-driver.tar.gz" $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/run-command.sh
2420
echo "Untarring file ... end"
2521
echo "Running test ... begin"
22+
GCPKMS_CMD="SUCCESS=true TEST_FLE_GCP_AUTO=1 LIBMONGOCRYPT_URL=$LIBMONGOCRYPT_URL bash ./evergreen/just.sh setup-test" $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/run-command.sh
2623
GCPKMS_CMD="./.evergreen/just.sh test-eg" $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/run-command.sh
2724
echo "Running test ... end"
2825
bash $HERE/scripts/teardown-tests.sh
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#!/bin/bash
2+
set -eu
23
HERE=$(dirname ${BASH_SOURCE:-$0})
34
. $HERE/env.sh
45
export PYTHON_BINARY=/opt/mongodbtoolchain/v4/bin/python3
56
export LIBMONGOCRYPT_URL=https://s3.amazonaws.com/mciuploads/libmongocrypt/debian11/master/latest/libmongocrypt.tar.gz
6-
SUCCESS=false TEST_FLE_GCP_AUTO=1 bash $HERE/scripts/setup-tests.sh
7+
SUCCESS=false TEST_FLE_GCP_AUTO=1 bash $HERE/setup-tests.sh
78
bash ./.evergreen/just.sh test-eg

0 commit comments

Comments
 (0)