@@ -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
@@ -73,17 +68,17 @@ run_test() {
7368 fi
7469
7570 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 )
71+ -X POST -H " Content-Type: application/json " \
72+ -H " Authorization: Bearer $QA_AUTOMATION_TOKEN " \
73+ -d @$json_in \
74+ https://opereto.qa .redislabs.com/processes 2>&1 )
8075 rc=$?
8176 rm $json_in
8277 status=$( results .status)
8378 if [[ $rc == 0 && $status == success ]]; then
8479 id=$( results .data[0])
8580 echo " Tests running on $MODULE_VERSION for RS $RS_VERSION "
86- echo " Results: https://qa-automation-center .redislabs.com/ui#dashboard/flow/$id "
81+ echo " Results: https://opereto.qa .redislabs.com/ui#dashboard/flow/$id "
8782 return 0
8883 else
8984 err=$( results .message)
0 commit comments