From c0204e325214b3944fd4e5c4c727b35b10f81d8f Mon Sep 17 00:00:00 2001 From: menshibin Date: Tue, 24 Sep 2024 15:48:08 +0800 Subject: [PATCH] add nodejs python ci examples --- docs/examples/node/package.json | 3 ++- tests/docs-examples-test/node.sh | 32 ++++++++---------------- tests/docs-examples-test/python.sh | 40 ++++++++++++++++++++++++++++++ tests/parallel_test/cases.task | 2 +- 4 files changed, 54 insertions(+), 23 deletions(-) diff --git a/docs/examples/node/package.json b/docs/examples/node/package.json index d00d71d99f..cf8f95b736 100644 --- a/docs/examples/node/package.json +++ b/docs/examples/node/package.json @@ -5,6 +5,7 @@ "license": "MIT", "dependencies": { "@tdengine/client": "^3.0.1", - "@tdengine/rest": "^3.0.0" + "@tdengine/rest": "^3.0.0", + "@tdengine/websocket": "^3.1.0" } } diff --git a/tests/docs-examples-test/node.sh b/tests/docs-examples-test/node.sh index 41acf7c7b4..9999c36ba7 100644 --- a/tests/docs-examples-test/node.sh +++ b/tests/docs-examples-test/node.sh @@ -8,35 +8,25 @@ pgrep taosadapter || taosadapter >> /dev/null 2>&1 & cd ../../docs/examples/node npm install -cd restexample; -node connect.js +cd websocketet -cd ../nativeexample +node all_type_query.js -node connect.js +node all_type_stmt.js -taos -s "drop database if exists power" -node insert_example.js +node json_line_example.js -node query_example.js +node line_example.js -node async_query_example.js +node nodejsChecker.js -# node subscribe_demo.js +node sql_example.js -taos -s "drop topic if exists topic_name_example" -taos -s "drop database if exists power" -node param_bind_example.js +node stmt_example.js -taos -s "drop database if exists power" -node multi_bind_example.js +node telnet_line_example.js -taos -s "drop database if exists test" -node influxdb_line_example.js +node tmq_example.js -taos -s "drop database if exists test" -node opentsdb_telnet_example.js - -taos -s "drop database if exists test" -node opentsdb_json_example.js +node tmq_seek_example.js \ No newline at end of file diff --git a/tests/docs-examples-test/python.sh b/tests/docs-examples-test/python.sh index 84f0771ec5..8426beae36 100644 --- a/tests/docs-examples-test/python.sh +++ b/tests/docs-examples-test/python.sh @@ -91,3 +91,43 @@ python3 conn_websocket_pandas.py # 22 python3 connect_websocket_examples.py + +# 23 +python3 create_db_ws.py + +# 24 +python3 create_db_native.py + +# 25 +python3 create_db_rest.py + +python3 insert_native.py + +python3 insert_rest.py + +python3 insert_ws.py + +python3 query_native.py + +python3 query_rest.py + +python3 query_ws.py + +python3 reqid_native.py + +python3 reqid_rest.py + +python3 reqid_ws.py + +python3 schemaless_native.py + +python3 schemaless_ws.py + +python3 stmt_native.py + +python3 stmt_ws.py + +python3 tmq_native.py + +python3 tmq_websocket_example.py + diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 1a00787a6b..e2c2bb58e7 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -1553,7 +1553,7 @@ #docs-examples test ,,n,docs-examples-test,bash python.sh -#,,n,docs-examples-test,bash node.sh +,,n,docs-examples-test,bash node.sh ,,n,docs-examples-test,bash csharp.sh ,,n,docs-examples-test,bash jdbc.sh ,,n,docs-examples-test,bash go.sh