Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
ca4ffac4
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22017
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ca4ffac4
编写于
9月 09, 2021
作者:
G
Ganlin Zhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-6560]<test>: Add unit test cases for parsing OpenTSDB HTTP JSON data import format
上级
0df9e2e1
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
37 addition
and
37 deletion
+37
-37
tests/examples/c/apitest.c
tests/examples/c/apitest.c
+37
-37
未找到文件。
tests/examples/c/apitest.c
浏览文件 @
ca4ffac4
...
...
@@ -1039,7 +1039,7 @@ void verify_telnet_insert(TAOS* taos) {
};
code
=
taos_insert_telnet_lines
(
taos
,
lines0
,
3
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
lines0
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
/* timestamp */
...
...
@@ -1053,7 +1053,7 @@ void verify_telnet_insert(TAOS* taos) {
};
code
=
taos_insert_telnet_lines
(
taos
,
lines1
,
6
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
lines1
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
/* metric value */
...
...
@@ -1064,7 +1064,7 @@ void verify_telnet_insert(TAOS* taos) {
};
code
=
taos_insert_telnet_lines
(
taos
,
lines2_0
,
2
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
lines2_0
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
//smallint
...
...
@@ -1074,7 +1074,7 @@ void verify_telnet_insert(TAOS* taos) {
};
code
=
taos_insert_telnet_lines
(
taos
,
lines2_1
,
2
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
lines2_1
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
//int
...
...
@@ -1084,7 +1084,7 @@ void verify_telnet_insert(TAOS* taos) {
};
code
=
taos_insert_telnet_lines
(
taos
,
lines2_2
,
2
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
lines2_2
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
//bigint
...
...
@@ -1094,7 +1094,7 @@ void verify_telnet_insert(TAOS* taos) {
};
code
=
taos_insert_telnet_lines
(
taos
,
lines2_3
,
2
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
lines2_3
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
//float
...
...
@@ -1113,7 +1113,7 @@ void verify_telnet_insert(TAOS* taos) {
};
code
=
taos_insert_telnet_lines
(
taos
,
lines2_4
,
11
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
lines2_4
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
//double
...
...
@@ -1131,7 +1131,7 @@ void verify_telnet_insert(TAOS* taos) {
};
code
=
taos_insert_telnet_lines
(
taos
,
lines2_5
,
10
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
lines2_5
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
//bool
...
...
@@ -1149,7 +1149,7 @@ void verify_telnet_insert(TAOS* taos) {
};
code
=
taos_insert_telnet_lines
(
taos
,
lines2_6
,
10
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
lines2_6
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
//binary
...
...
@@ -1160,7 +1160,7 @@ void verify_telnet_insert(TAOS* taos) {
};
code
=
taos_insert_telnet_lines
(
taos
,
lines2_7
,
3
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
lines2_7
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
//nchar
...
...
@@ -1170,7 +1170,7 @@ void verify_telnet_insert(TAOS* taos) {
};
code
=
taos_insert_telnet_lines
(
taos
,
lines2_8
,
2
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
lines2_8
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
/* tags */
...
...
@@ -1181,7 +1181,7 @@ void verify_telnet_insert(TAOS* taos) {
};
code
=
taos_insert_telnet_lines
(
taos
,
lines3_0
,
2
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
lines3_0
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
//tag ID as child table name
...
...
@@ -1192,7 +1192,7 @@ void verify_telnet_insert(TAOS* taos) {
};
code
=
taos_insert_telnet_lines
(
taos
,
lines3_1
,
3
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
lines3_1
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
return
;
...
...
@@ -1226,7 +1226,7 @@ void verify_json_insert(TAOS* taos) {
code
=
taos_insert_json_payload
(
taos
,
message
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
payload_0
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
char
*
message1
=
...
...
@@ -1257,7 +1257,7 @@ void verify_json_insert(TAOS* taos) {
code
=
taos_insert_json_payload
(
taos
,
message1
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
payload_1
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
char
*
message2
=
...
...
@@ -1308,7 +1308,7 @@ void verify_json_insert(TAOS* taos) {
]"
;
code
=
taos_insert_json_payload
(
taos
,
message2
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
payload_2
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
...
...
@@ -1332,7 +1332,7 @@ void verify_json_insert(TAOS* taos) {
code
=
taos_insert_json_payload
(
taos
,
payload_str
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
payload0_0
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
free
(
payload_str
);
cJSON_Delete
(
payload
);
...
...
@@ -1353,7 +1353,7 @@ void verify_json_insert(TAOS* taos) {
code
=
taos_insert_json_payload
(
taos
,
payload_str
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
payload0_1
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
free
(
payload_str
);
cJSON_Delete
(
payload
);
...
...
@@ -1374,7 +1374,7 @@ void verify_json_insert(TAOS* taos) {
code
=
taos_insert_json_payload
(
taos
,
payload_str
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
payload0_2
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
free
(
payload_str
);
cJSON_Delete
(
payload
);
...
...
@@ -1395,7 +1395,7 @@ void verify_json_insert(TAOS* taos) {
code
=
taos_insert_json_payload
(
taos
,
payload_str
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
payload0_3
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
free
(
payload_str
);
cJSON_Delete
(
payload
);
...
...
@@ -1416,7 +1416,7 @@ void verify_json_insert(TAOS* taos) {
code
=
taos_insert_json_payload
(
taos
,
payload_str
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
payload0_4
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
free
(
payload_str
);
cJSON_Delete
(
payload
);
...
...
@@ -1440,7 +1440,7 @@ void verify_json_insert(TAOS* taos) {
code
=
taos_insert_json_payload
(
taos
,
payload_str
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
payload0_5
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
free
(
payload_str
);
cJSON_Delete
(
payload
);
...
...
@@ -1469,7 +1469,7 @@ void verify_json_insert(TAOS* taos) {
code
=
taos_insert_json_payload
(
taos
,
payload_str
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
payload1_0
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
free
(
payload_str
);
cJSON_Delete
(
payload
);
...
...
@@ -1495,7 +1495,7 @@ void verify_json_insert(TAOS* taos) {
code
=
taos_insert_json_payload
(
taos
,
payload_str
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
payload1_1
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
free
(
payload_str
);
cJSON_Delete
(
payload
);
...
...
@@ -1521,7 +1521,7 @@ void verify_json_insert(TAOS* taos) {
code
=
taos_insert_json_payload
(
taos
,
payload_str
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
payload1_2
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
free
(
payload_str
);
cJSON_Delete
(
payload
);
...
...
@@ -1547,7 +1547,7 @@ void verify_json_insert(TAOS* taos) {
code
=
taos_insert_json_payload
(
taos
,
payload_str
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
payload1_3
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
free
(
payload_str
);
cJSON_Delete
(
payload
);
...
...
@@ -1573,7 +1573,7 @@ void verify_json_insert(TAOS* taos) {
code
=
taos_insert_json_payload
(
taos
,
payload_str
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
payload1_4
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
free
(
payload_str
);
cJSON_Delete
(
payload
);
...
...
@@ -1605,7 +1605,7 @@ void verify_json_insert(TAOS* taos) {
code
=
taos_insert_json_payload
(
taos
,
payload_str
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
payload2_0
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
free
(
payload_str
);
cJSON_Delete
(
payload
);
...
...
@@ -1635,7 +1635,7 @@ void verify_json_insert(TAOS* taos) {
code
=
taos_insert_json_payload
(
taos
,
payload_str
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
payload2_1
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
free
(
payload_str
);
cJSON_Delete
(
payload
);
...
...
@@ -1665,7 +1665,7 @@ void verify_json_insert(TAOS* taos) {
code
=
taos_insert_json_payload
(
taos
,
payload_str
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
payload2_2
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
free
(
payload_str
);
cJSON_Delete
(
payload
);
...
...
@@ -1695,7 +1695,7 @@ void verify_json_insert(TAOS* taos) {
code
=
taos_insert_json_payload
(
taos
,
payload_str
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
payload2_3
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
free
(
payload_str
);
cJSON_Delete
(
payload
);
...
...
@@ -1725,7 +1725,7 @@ void verify_json_insert(TAOS* taos) {
code
=
taos_insert_json_payload
(
taos
,
payload_str
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
payload2_4
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
free
(
payload_str
);
cJSON_Delete
(
payload
);
...
...
@@ -1755,7 +1755,7 @@ void verify_json_insert(TAOS* taos) {
code
=
taos_insert_json_payload
(
taos
,
payload_str
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
payload2_5
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
free
(
payload_str
);
cJSON_Delete
(
payload
);
...
...
@@ -1785,7 +1785,7 @@ void verify_json_insert(TAOS* taos) {
code
=
taos_insert_json_payload
(
taos
,
payload_str
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
payload2_6
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
free
(
payload_str
);
cJSON_Delete
(
payload
);
...
...
@@ -1815,7 +1815,7 @@ void verify_json_insert(TAOS* taos) {
code
=
taos_insert_json_payload
(
taos
,
payload_str
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
payload2_7
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
free
(
payload_str
);
cJSON_Delete
(
payload
);
...
...
@@ -1845,7 +1845,7 @@ void verify_json_insert(TAOS* taos) {
code
=
taos_insert_json_payload
(
taos
,
payload_str
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
payload2_8
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
free
(
payload_str
);
cJSON_Delete
(
payload
);
...
...
@@ -1925,7 +1925,7 @@ void verify_json_insert(TAOS* taos) {
code
=
taos_insert_json_payload
(
taos
,
payload_str
);
if
(
code
)
{
printf
(
"code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
printf
(
"
payload3_0
code: %d, %s.
\n
"
,
code
,
tstrerror
(
code
));
}
free
(
payload_str
);
cJSON_Delete
(
payload
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录