Skip to content

Commit

Permalink
Yet another QA automation fix (#200)
Browse files Browse the repository at this point in the history
(cherry picked from commit efd2724)
  • Loading branch information
rafie committed Nov 11, 2020
1 parent 4ccf217 commit 1cf882c
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions tests/qa/run
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/bash

HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
ROOT=$HERE/../..
ROOT=$(cd $HERE/../..; pwd)

(( $VERBOSE > 1 )) && { set -x; PS4='$LINENO: '; }

if [[ $1 == --help || $1 == help ]]; then
cat <<-END
Expand All @@ -15,6 +17,8 @@ if [[ $1 == --help || $1 == help ]]; then
TEST=name Name of .json parameters file
MODULE_VERSION=ver Module version to test. Default: master
LIGHT=1 Test RediSearch Light
NOP=1 Do not execute automation command
VERBOSE=N Set verbosity level (N=1,2)
Other configuration:
RS_VERSION file includes Redis Enterprive version for release tests.
Expand All @@ -33,7 +37,7 @@ if [[ -z $QA_AUTOMATION_PASS ]]; then
fi

export TEST=${TEST:-release}
if [[ ! -f $TEST.json ]]; then
if [[ ! -f $HERE/$TEST.json ]]; then
echo "Invalid TEST name: $TEST" >&2
exit 1
fi
Expand All @@ -47,11 +51,11 @@ else
fi

if [[ $LIGHT == 1 ]]; then
RS_MODULE=RedisearchLight
RS_MODULE_FILE_PREFIX=redisearch-light
export RS_MODULE=RedisearchLight
export RS_MODULE_FILE_PREFIX=redisearch-light
else
RS_MODULE=RediSearchEnterprise
RS_MODULE_FILE_PREFIX=redisearch
export RS_MODULE=RediSearchEnterprise
export RS_MODULE_FILE_PREFIX=redisearch
fi

results() {
Expand All @@ -62,7 +66,9 @@ cd $HERE

json_in=$(mktemp /tmp/$TEST.json.XXXX)
$ROOT/deps/readies/bin/xtx -e RS_MODULE -e MODULE_VERSION -e RS_VERSION $TEST.json > $json_in
[[ $VERBOSE == 1 ]] && cat $json_in
(( $VERBOSE >= 1 )) && cat $json_in

[[ $NOP == 1 ]] && exit 0

JSON=$(curl -sk \
-u "$QA_AUTOMATION_USERNAME":"$QA_AUTOMATION_PASS" \
Expand Down

0 comments on commit 1cf882c

Please sign in to comment.