From a6a0c40862721dbb4c6fdb55992063a789095fa5 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Thu, 30 Jul 2020 12:00:40 +0800 Subject: [PATCH] [TD-894] update scripts since error code changed --- tests/script/general/http/grafana.sim | 4 ++-- tests/script/general/http/restful.sim | 2 +- tests/script/general/http/restful_full.sim | 12 ++++++------ tests/script/unique/http/admin.sim | 4 ++-- tests/script/unique/http/opentsdb.sim | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/script/general/http/grafana.sim b/tests/script/general/http/grafana.sim index bf2a3b3b58..d2c31a0e59 100644 --- a/tests/script/general/http/grafana.sim +++ b/tests/script/general/http/grafana.sim @@ -66,7 +66,7 @@ endi system_content curl 127.0.0.1:6020/grafana/login/xx/xx/ print 3-> $system_content -if $system_content != @{"status":"error","code":849,"desc":"mnode invalid user"}@ then +if $system_content != @{"status":"error","code":849,"desc":"Invalid user"}@ then return -1 endi @@ -78,7 +78,7 @@ endi system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d 'show databases' 127.0.0.1:6020/grafana/login/1/root/1/ print 5-> $system_content -if $system_content != @{"status":"error","code":849,"desc":"mnode invalid user"}@ then +if $system_content != @{"status":"error","code":849,"desc":"Invalid user"}@ then return -1 endi diff --git a/tests/script/general/http/restful.sim b/tests/script/general/http/restful.sim index 7f39a9c748..a647399758 100644 --- a/tests/script/general/http/restful.sim +++ b/tests/script/general/http/restful.sim @@ -77,7 +77,7 @@ endi system_content curl 127.0.0.1:6020/rest/login/u2/aabcd_1234 print curl 127.0.0.1:6020/rest/login/u2/abcd_1234 -----> $system_content -if $system_content != @{"status":"error","code":3,"desc":"auth failure"}@ then +if $system_content != @{"status":"error","code":3,"desc":"Authentication failure"}@ then return -1 endi diff --git a/tests/script/general/http/restful_full.sim b/tests/script/general/http/restful_full.sim index cb493c1456..43511b31d8 100644 --- a/tests/script/general/http/restful_full.sim +++ b/tests/script/general/http/restful_full.sim @@ -39,19 +39,19 @@ endi system_content curl 127.0.0.1:6020/rest/login/root/123 print 5-> $system_content -if $system_content != @{"status":"error","code":3,"desc":"auth failure"}@ then +if $system_content != @{"status":"error","code":3,"desc":"Authentication failure"}@ then return -1 endi system_content curl 127.0.0.1:6020/rest/login/root/123/1/1/3 print 6-> $system_content -if $system_content != @{"status":"error","code":3,"desc":"auth failure"}@ then +if $system_content != @{"status":"error","code":3,"desc":"Authentication failure"}@ then return -1 endi system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d 'show databases' 127.0.0.1:6020/rest/login/root/1 print 7-> $system_content -if $system_content != @{"status":"error","code":3,"desc":"auth failure"}@ then +if $system_content != @{"status":"error","code":3,"desc":"Authentication failure"}@ then return -1 endi @@ -93,7 +93,7 @@ endi system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d 'create database d1' 127.0.0.1:6020/rest/sql print 13-> $system_content -if $system_content != @{"status":"error","code":897,"desc":"mnode database aleady exist"}@ then +if $system_content != @{"status":"error","code":897,"desc":"Database already exists"}@ then return -1 endi @@ -126,7 +126,7 @@ endi #18 system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d ' show tables;' 127.0.0.1:6020/rest/sql print 18-> $system_content -if $system_content != @{"status":"error","code":896,"desc":"mnode db not selected"}@ then +if $system_content != @{"status":"error","code":896,"desc":"Database not specified or available"}@ then return -1 endi @@ -147,7 +147,7 @@ print =============== step3 - db system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d ' select * from d1.t1;' 127.0.0.1:6020/rest/sql print 21-> $system_content -if $system_content != @{"status":"error","code":866,"desc":"mnode invalid table name"}@ then +if $system_content != @{"status":"error","code":866,"desc":"Table does not exist"}@ then return -1 endi diff --git a/tests/script/unique/http/admin.sim b/tests/script/unique/http/admin.sim index 10fad091b5..aeead817c1 100644 --- a/tests/script/unique/http/admin.sim +++ b/tests/script/unique/http/admin.sim @@ -57,13 +57,13 @@ endi system_content curl 127.0.0.1:6020/admin/login/root/123 print 5-> $system_content -if $system_content != @{"status":"error","code":3,"desc":"auth failure"}@ then +if $system_content != @{"status":"error","code":3,"desc":"Authentication failure"}@ then return -1 endi system_content curl 127.0.0.1:6020/admin/login/root/123/1/1/3 print 6-> $system_content -if $system_content != @{"status":"error","code":3,"desc":"auth failure"}@ then +if $system_content != @{"status":"error","code":3,"desc":"Authentication failure"}@ then return -1 endi diff --git a/tests/script/unique/http/opentsdb.sim b/tests/script/unique/http/opentsdb.sim index 7e2400bb15..4c7803c3da 100644 --- a/tests/script/unique/http/opentsdb.sim +++ b/tests/script/unique/http/opentsdb.sim @@ -74,7 +74,7 @@ endi system_content curl -u root:taosdata -d '[{"metric": "ab1234567890123456789012345678ab1234567890123456789012345678","timestamp": 1346846400,"value": 18,"tags": {"host": "web01","group1": "1","dc": "lga"}}]' 127.0.0.1:6020/opentsdb/db/put print $system_content -if $system_content != @{"errors":[{"datapoint":{"metric":"ab1234567890123456789012345678ab1234567890123456789012345678","stable":"ab1234567890123456789012345678ab1234567890123456789012345678_d_bbb","table":"ab1234567890123456789012345678ab1234567890123456789012345678_d_bbb_lga_1_web01","timestamp":1346846400,"value":18.000000,"tags":{"dc":"lga","group1":"1","host":"web01"},"status":"error","code":1547,"desc":"tsdb timestamp is out of range"}}],"failed":1,"success":0,"affected_rows":0}@ then +if $system_content != @{"errors":[{"datapoint":{"metric":"ab1234567890123456789012345678ab1234567890123456789012345678","stable":"ab1234567890123456789012345678ab1234567890123456789012345678_d_bbb","table":"ab1234567890123456789012345678ab1234567890123456789012345678_d_bbb_lga_1_web01","timestamp":1346846400,"value":18.000000,"tags":{"dc":"lga","group1":"1","host":"web01"},"status":"error","code":1547,"desc":"Timestamp data out of range"}}],"failed":1,"success":0,"affected_rows":0}@ then return -1 endi -- GitLab