Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
loser646
TDengine
提交
8e2d4811
T
TDengine
项目概览
loser646
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8e2d4811
编写于
4月 01, 2020
作者:
S
slguan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-16] add script for account
上级
4dac7f04
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
173 addition
and
3 deletion
+173
-3
src/client/src/tscSystem.c
src/client/src/tscSystem.c
+1
-1
tests/script/sh/deploy.sh
tests/script/sh/deploy.sh
+2
-2
tests/script/unique/account/paras.sim
tests/script/unique/account/paras.sim
+111
-0
tests/script/unique/account/usage.sim
tests/script/unique/account/usage.sim
+57
-0
tests/script/unique/testSuite.sim
tests/script/unique/testSuite.sim
+2
-0
未找到文件。
src/client/src/tscSystem.c
浏览文件 @
8e2d4811
...
...
@@ -93,7 +93,7 @@ int32_t tscInitRpc(const char *user, const char *secret) {
rpcInit
.
sessions
=
tsMaxMgmtConnections
;
rpcInit
.
connType
=
TAOS_CONN_CLIENT
;
rpcInit
.
idleTime
=
2000
;
rpcInit
.
user
=
"root"
;
rpcInit
.
user
=
(
char
*
)
user
;
rpcInit
.
ckey
=
"key"
;
rpcInit
.
secret
=
secretEncrypt
;
...
...
tests/script/sh/deploy.sh
浏览文件 @
8e2d4811
...
...
@@ -90,9 +90,9 @@ echo "logDir $LOG_DIR" >> $TAOS_CFG
echo
"publicIp
$NODE_IP
"
>>
$TAOS_CFG
echo
"internalIp
$NODE_IP
"
>>
$TAOS_CFG
echo
"privateIp
$NODE_IP
"
>>
$TAOS_CFG
echo
"dDebugFlag 1
99
"
>>
$TAOS_CFG
echo
"dDebugFlag 1
35
"
>>
$TAOS_CFG
echo
"mDebugFlag 199"
>>
$TAOS_CFG
echo
"sdbDebugFlag 1
99
"
>>
$TAOS_CFG
echo
"sdbDebugFlag 1
35
"
>>
$TAOS_CFG
echo
"rpcDebugFlag 135"
>>
$TAOS_CFG
echo
"tmrDebugFlag 131"
>>
$TAOS_CFG
echo
"cDebugFlag 135"
>>
$TAOS_CFG
...
...
tests/script/unique/account/paras.sim
0 → 100644
浏览文件 @
8e2d4811
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -m 192.168.0.1 -i 192.168.0.1
system sh/exec_up.sh -n dnode1 -s start
sql connect
print =============== show accounts
sql show accounts
if $rows != 1 then
return -1
endi
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
if $data00 != root then
return -1
endi
if $data02 != 3/10 then
return -1
endi
if $data03 != 0/64 then
return -1
endi
if $data04 != 0/2147483647 then
return -1
endi
if $data05 != 0/1000 then
return -1
endi
if $data06 != 0.000/unlimited then
return -1
endi
print =============== create account
sql create account hou pass "hou" tseries 80000 storage 10737418240 streams 10 qtime 3600 dbs 3 users 3 conns 10
sql show accounts
if $rows != 2 then
return -1
endi
print $data10 $data11 $data12 $data13 $data14 $data15 $data16
if $data10 != hou then
return -1
endi
if $data12 != 2/3 then
return -1
endi
if $data13 != 0/3 then
return -1
endi
if $data14 != 0/80000 then
return -1
endi
if $data15 != 0/10 then
return -1
endi
if $data16 != 0.000/10.000 then
return -1
endi
print =============== alter account
sql alter account hou pass "hou" tseries 8000 streams 10 dbs 5 users 5
sql show accounts
if $rows != 2 then
return -1
endi
print $data10 $data11 $data12 $data13 $data14 $data15 $data16
if $data10 != hou then
return -1
endi
if $data12 != 2/5 then
return -1
endi
if $data13 != 0/5 then
return -1
endi
if $data14 != 0/8000 then
return -1
endi
if $data15 != 0/10 then
return -1
endi
if $data16 != 0.000/10.000 then
return -1
endi
print =============== alter account
sql create account hou pass "hou" tseries 8000 streams 10 dbs 5 users 6
sql show accounts
if $rows != 2 then
return -1
endi
print $data10 $data11 $data12 $data13 $data14 $data15 $data16
if $data10 != hou then
return -1
endi
if $data12 != 2/6 then
return -1
endi
if $data13 != 0/5 then
return -1
endi
if $data14 != 0/8000 then
return -1
endi
if $data15 != 0/10 then
return -1
endi
if $data16 != 0.000/10.000 then
return -1
endi
tests/script/unique/account/usage.sim
0 → 100644
浏览文件 @
8e2d4811
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -m 192.168.0.1 -i 192.168.0.1
system sh/exec_up.sh -n dnode1 -s start
sql connect
print =============== show accounts
print =============== create account
sql alter account root pass "taosdata" tseries 8000 streams 10 dbs 5 users 5
sql show accounts
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
if $data00 != root then
return -1
endi
if $data02 != 3/5 then
return -1
endi
if $data03 != 0/5 then
return -1
endi
if $data04 != 0/8000 then
return -1
endi
if $data05 != 0/10 then
return -1
endi
print =============== check usage account
sql create database d1
sql create database d2
sql create database d3
sql create database d4
sql create database d5
sql create table d1.t1 (ts timestamp, i int);
sql create user u1 pass "u1"
sql show accounts
print $data10 $data11 $data12 $data13 $data14 $data15 $data16
if $data00 != root then
return -1
endi
if $data02 != 4/5 then
return -1
endi
if $data03 != 5/5 then
return -1
endi
if $data04 != 1/8000 then
return -1
endi
if $data05 != 0/10 then
return -1
endi
print =============== check grant
sql_error create database d6
\ No newline at end of file
tests/script/unique/testSuite.sim
浏览文件 @
8e2d4811
#################################
run unique/account/basic.sim
run unique/account/paras.sim
run unique/account/usage.sim
##################################
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录