@@ -13,8 +13,7 @@ if [[ $1 == --help || $1 == help ]]; then
1313 [ARGVARS...] run [--help|help]
1414
1515 Argument variables:
16- QA_AUTOMATION_USERNAME=name QA automation (Opereto) username
17- QA_AUTOMATION_PASS=pass QA automation (Opereto) password
16+ QA_AUTOMATION_TOKEN=token QA automation (Opereto) token
1817 TEST=name Name of .json parameters file
1918 MODULE_VERSION=ver Module version to test. Default: master
2019 NOP=1 Do not execute automation command
@@ -32,12 +31,8 @@ export RS_MODULE=RedisAI
3231export RS_MODULE_LC=${RS_MODULE,,}
3332export RS_MODULE_FILE_PREFIX=redisai-cpu
3433
35- if [[ -z $QA_AUTOMATION_USERNAME && $NOP != 1 ]]; then
36- echo " Variable QA_AUTOMATION_USERNAME is undefined." >&2
37- exit 1
38- fi
39- if [[ -z $QA_AUTOMATION_PASS && $NOP != 1 ]]; then
40- echo " Variable QA_AUTOMATION_PASS is undefined." >&2
34+ if [[ -z $QA_AUTOMATION_TOKEN && $NOP != 1 ]]; then
35+ echo " Variable QA_AUTOMATION_TOKEN is undefined." >&2
4136 exit 1
4237fi
4338
@@ -72,18 +67,19 @@ run_test() {
7267 return 0
7368 fi
7469
70+ OPERETO3_URL=" opereto.qa.redislabs.com"
7571 JSON=$( curl -sk \
76- -u " $QA_AUTOMATION_USERNAME " : " $QA_AUTOMATION_PASS " \
77- -X POST - H " Content-Type: application/json " \
78- -d @$json_in \
79- https://qa-automation-center.redislabs.com /processes 2>&1 )
72+ -X POST -H " Content-Type: application/json " \
73+ -H " Authorization: Bearer $QA_AUTOMATION_TOKEN " \
74+ -d @$json_in \
75+ https://$OPERETO3_URL /processes 2>&1 )
8076 rc=$?
8177 rm $json_in
8278 status=$( results .status)
8379 if [[ $rc == 0 && $status == success ]]; then
8480 id=$( results .data[0])
8581 echo " Tests running on $MODULE_VERSION for RS $RS_VERSION "
86- echo " Results: https://qa-automation-center.redislabs.com /ui#dashboard/flow/$id "
82+ echo " Results: https://$OPERETO3_URL /ui#dashboard/flow/$id "
8783 return 0
8884 else
8985 err=$( results .message)
0 commit comments