提交 efccb8b0 编写于 作者: G Ganlin Zhao

[TD-10438]<fix>: fixed test cases.

上级 5e661edb
......@@ -189,29 +189,6 @@ class TDTestCase:
print("============= step3 : test tags ================")
### ID ###
payload = '''
{
"metric": "stb0_7",
"timestamp": 0,
"value": 123,
"tags": {
"ID": "tb0_7",
"t1": true,
"iD": "tb000",
"t2": false,
"t3": 10,
"t4": "123_abc_.!@#$%^&*:;,./?|+-=()[]{}<>",
"id": "tb555"
}
}
'''
code = self._conn.insert_json_payload(payload)
print("insert_json_payload result {}".format(code))
tdSql.query("select tbname from stb0_7")
tdSql.checkData(0, 0, "tb0_7")
### Default tag numeric types ###
payload = '''
{
......
......@@ -411,30 +411,6 @@ void verify_json_insert(TAOS* taos) {
free(payload_str);
cJSON_Delete(payload);
//ID
payload = cJSON_CreateObject();
cJSON_AddStringToObject(payload, "metric", "stb0_5");
cJSON_AddNumberToObject(payload, "timestamp", 0);
cJSON_AddNumberToObject(payload, "value", 123);
tags = cJSON_CreateObject();
cJSON_AddStringToObject(tags, "ID", "tb0_5");
cJSON_AddTrueToObject(tags, "t1");
cJSON_AddStringToObject(tags, "iD", "tb000");
cJSON_AddFalseToObject(tags, "t2");
cJSON_AddNumberToObject(tags, "t3", 10);
cJSON_AddStringToObject(tags, "t4", "123_abc_.!@#$%^&*:;,./?|+-=()[]{}<>");
cJSON_AddStringToObject(tags, "id", "tb555");
cJSON_AddItemToObject(payload, "tags", tags);
payload_str = cJSON_Print(payload);
//printf("%s\n", payload_str);
code = taos_insert_json_payload(taos, payload_str);
if (code) {
printf("payload0_5 code: %d, %s.\n", code, tstrerror(code));
}
free(payload_str);
cJSON_Delete(payload);
/* Nested format */
//timestamp
cJSON *timestamp;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册