diff options
author | Alberto Sartori <alberto.sartori@huawei.com> | 2023-01-18 14:26:14 +0100 |
---|---|---|
committer | Alberto Sartori <alberto.sartori@huawei.com> | 2023-01-20 11:58:07 +0100 |
commit | 3d95b0adc81d155ad9020e9efbc50799c89953ff (patch) | |
tree | f7b391ff47439a4d09b1309326b9d6bbcef13654 /test/end-to-end/remote-execution/large-blobs.sh | |
parent | fe8983f3444ca0f287d54d673ddda3aa9fb1a17c (diff) | |
download | justbuild-3d95b0adc81d155ad9020e9efbc50799c89953ff.tar.gz |
tests: pass tls certificates and key
Diffstat (limited to 'test/end-to-end/remote-execution/large-blobs.sh')
-rw-r--r-- | test/end-to-end/remote-execution/large-blobs.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test/end-to-end/remote-execution/large-blobs.sh b/test/end-to-end/remote-execution/large-blobs.sh index 17839e86..a4d25ffa 100644 --- a/test/end-to-end/remote-execution/large-blobs.sh +++ b/test/end-to-end/remote-execution/large-blobs.sh @@ -17,6 +17,7 @@ set -eu readonly JUST="${PWD}/bin/tool-under-test" +readonly CREDENTIALS_DIR="${PWD}/credentials" # create a sufficiently large (>4MB) file for testing upload/download (16MB) dd if=/dev/zero of=large.file bs=1024 count=$((16*1024)) @@ -43,12 +44,22 @@ run_tests() { local TYPE="local" local REMOTE_ARGS="" local REMOTE_BUILD_ARGS="" + local AUTH_ARGS="" if [ -n "${1:-}" ] && [ -n "${2:-}" ]; then TYPE="remote" REMOTE_ARGS="-r $1" REMOTE_BUILD_ARGS="--remote-execution-property $2" + if [ -f "${CREDENTIALS_DIR}/ca.crt" ]; then + AUTH_ARGS=" --tls-ca-cert ${CREDENTIALS_DIR}/ca.crt " + if [ -f "${CREDENTIALS_DIR}/client.crt" ]; then + AUTH_ARGS=" --tls-client-cert ${CREDENTIALS_DIR}/client.crt "${AUTH_ARGS} + fi + if [ -f "${CREDENTIALS_DIR}/client.key" ]; then + AUTH_ARGS=" --tls-client-key ${CREDENTIALS_DIR}/client.key "${AUTH_ARGS} + fi + fi fi - ARGS="$COMMON_ARGS $REMOTE_ARGS" + ARGS="$COMMON_ARGS $REMOTE_ARGS ${AUTH_ARGS}" BUILD_ARGS="$ARGS $REMOTE_BUILD_ARGS" echo |