TDengine/tests/docs-examples-test/go.sh

79 lines
1.6 KiB
Bash
Raw Normal View History

2022-08-06 13:56:47 +00:00
#!/bin/bash
set -e
taosd >>/dev/null 2>&1 &
taosadapter >>/dev/null 2>&1 &
2024-08-02 09:12:14 +00:00
sleep 1
2022-08-06 13:56:47 +00:00
cd ../../docs/examples/go
go mod tidy
go run ./connect/afconn/main.go
go run ./connect/cgoexample/main.go
go run ./connect/restexample/main.go
2024-08-02 09:12:14 +00:00
go run ./connect/connpool/main.go
go run ./connect/wsexample/main.go
taos -s "drop database if exists power"
go run ./sqlquery/main.go
taos -s "drop database if exists power"
sleep 1
go run ./queryreqid/main.go
taos -s "drop database if exists power"
sleep 1
go run ./stmt/native/main.go
taos -s "drop database if exists power"
sleep 1
go run ./stmt/ws/main.go
taos -s "drop database if exists power"
sleep 1
go run ./schemaless/native/main.go
taos -s "drop database if exists power"
sleep 1
go run ./schemaless/ws/main.go
taos -s "drop topic if exists topic_meters"
sleep 1
taos -s "drop database if exists power"
sleep 1
go run ./tmq/native/main.go
taos -s "drop topic if exists topic_meters"
sleep 1
taos -s "drop database if exists power"
sleep 1
go run ./tmq/ws/main.go
2022-08-06 13:56:47 +00:00
taos -s "drop database if exists test"
2024-08-02 09:12:14 +00:00
sleep 1
2022-08-06 13:56:47 +00:00
go run ./insert/json/main.go
taos -s "drop database if exists test"
2024-08-02 09:12:14 +00:00
sleep 1
2022-08-06 13:56:47 +00:00
go run ./insert/line/main.go
2024-08-02 09:12:14 +00:00
taos -s "drop topic if exists topic_meters"
sleep 1
2022-08-06 13:56:47 +00:00
taos -s "drop database if exists power"
2024-08-02 09:12:14 +00:00
sleep 1
2022-08-06 13:56:47 +00:00
go run ./insert/sql/main.go
taos -s "drop database if exists power"
2024-08-02 09:12:14 +00:00
sleep 1
2022-08-06 13:56:47 +00:00
go run ./insert/stmt/main.go
taos -s "drop database if exists test"
2024-08-02 09:12:14 +00:00
sleep 1
2022-08-06 13:56:47 +00:00
go run ./insert/telnet/main.go
go run ./query/sync/main.go
taos -s "drop topic if exists example_tmq_topic"
2024-08-02 09:12:14 +00:00
sleep 1
2022-08-06 13:56:47 +00:00
taos -s "drop database if exists example_tmq"
2024-08-02 09:12:14 +00:00
sleep 1
2022-08-06 13:56:47 +00:00
go run ./sub/main.go