{"id":20784618,"url":"https://github.com/lindb/tsdb-tester","last_synced_at":"2025-08-26T19:20:36.128Z","repository":{"id":212088525,"uuid":"730657872","full_name":"lindb/tsdb-tester","owner":"lindb","description":"A Golang implementation of LinDB Test Framework","archived":false,"fork":false,"pushed_at":"2023-12-14T02:02:07.000Z","size":17,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-02T11:50:22.249Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lindb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-12T11:55:33.000Z","updated_at":"2024-03-12T23:53:08.000Z","dependencies_parsed_at":"2023-12-14T03:04:01.541Z","dependency_job_id":null,"html_url":"https://github.com/lindb/tsdb-tester","commit_stats":null,"previous_names":["lindb/tsdb-tester"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lindb/tsdb-tester","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lindb%2Ftsdb-tester","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lindb%2Ftsdb-tester/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lindb%2Ftsdb-tester/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lindb%2Ftsdb-tester/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lindb","download_url":"https://codeload.github.com/lindb/tsdb-tester/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lindb%2Ftsdb-tester/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263370179,"owners_count":23456426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T14:31:32.205Z","updated_at":"2025-07-03T17:36:09.327Z","avatar_url":"https://github.com/lindb.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TSDB Tester\n\nThis is a golang implementation of `TSDB Test Framework`, ref to [TiDB MySQL Tester](https://github.com/pingcap/mysql-tester).\n\n## Requirements\n\n- All the tests should be put in [`t`](./t), take [t/metric_meta.test](./t/metric_meta.test) as an example.\n- All the expected test results should be put in the same path/file name with the corresponding test file, but with a `.result` file suffix, take [t/metric_meta.result](./t/metric_meta.result) as an examle.\n\n## How to use\n\nBuild the `tsdb-tester` binary:\n```sh\nmake build\n```\n\nBasic usage:\n```\nUsage of ./tsdb-tester:\n  -url string\n        The api url of the LinDb broker. (default \"http://127.0.0.1:9000/api/v1/exec\")\n```\n\nBy default, it connects to the LinDB broker at `127.0.0.1:9000`:\n\n```sh\n./bin/tsdb-tester # run all the tests\n```\n\nTest file:\n\n```sql\n# setting test database name\n@use _internal;\n\n# test tag key not found(test case desc)\nselect * from cpu group by host;\n```\n\nResult:\n\n```sh\n=== RUN   group/group\n=== RUN   group/group/test tag key not found\n--- PASS: group/group (0.00 sec)\n    --- PASS: group/group/test tag key not found (0.00 sec)\nok ./t/group/group.test \n=== RUN   metric_meta\n=== RUN   metric_meta/show metrics\n=== RUN   metric_meta/select * from cpu ...\n=== RUN   metric_meta/select * from cpu\n--- FAIL: metric_meta (0.01 sec)\n    --- FAIL: metric_meta/show metrics (0.00 sec)\n\tStatement: show metrics\n\tNot equal: \n\t   expected: \"{}\"\n\t   actual  : \"{\\\"type\\\":\\\"metric\\\",\\\"values\\\":[\\\"cpu\\\",\\\"lindb.broker.family.writete\\\",\\\"lindb.concurrent.limit\\\",\\\"lindb.concurrent.limitite\\\",\\\"lindb.concurrent.pool\\\",\\\"lindb.concurrent.pool.tasks_waiting_durationon\\\",\\\"lindb.coordinator.state_managerting_duration\\\",\\\"lindb.http.ingest_durationnager\\\",\\\"lindb.ingestion.flatration\\\",\\\"lindb.ingestion.infl\\\",\\\"lindb.ingestion.proto\\\",\\\"lindb.ingestion.protox\\\",\\\"lindb.kv.table\\\",\\\"lindb.kv.table.cacheion\\\",\\\"lindb.kv.table.reade\\\",\\\"lindb.kv.table.writ\\\",\\\"lindb.master.control\\\",\\\"lindb.master.shard.lead\\\",\\\"lindb.monitor.native_push\\\",\\\"lindb.monitor.system.cpu_st\\\",\\\"lindb.monitor.system.disk_ino\\\",\\\"lindb.monitor.system.disk_usage_statss\\\",\\\"lindb.monitor.system.mem_statge_stats\\\",\\\"lindb.monitor.system.net_stat\\\",\\\"lindb.query\\\",\\\"lindb.queryor.system.net_stat\\\",\\\"lindb.storage\\\",\\\"lindb.storage.que\\\",\\\"lindb.storage.repli\\\",\\\"lindb.storage.replicator.ru\\\",\\\"lindb.storage.wallicator.runner\\\",\\\"lindb.task.transp\\\",\\\"lindb.task.transport\\\",\\\"lindb.traffic.grpc_client.stream\\\",\\\"lindb.traffic.grpc_client.stream.sent_duration\\\",\\\"lindb.traffic.grpc_client.stream.sent_durationtion\\\",\\\"lindb.traffic.grpc_server\\\",\\\"lindb.traffic.grpc_server.stream\\\",\\\"lindb.traffic.grpc_server.stream.sent_durationtion\\\",\\\"lindb.traffic.tcp\\\",\\\"lindb.traffic.tcpc_server.stream.sent_duration\\\",\\\"lindb.tsdb.matabase\\\",\\\"lindb.tsdb.memdb\\\",\\\"lindb.tsdb.memdbase.metadb_flush_duration\\\",\\\"lindb.tsdb.shard\\\",\\\"lindb.tsdb.shard.memdb_flush_duration\\\",\\\"lindb.tsdb.shard.memdb_flush_durationon\\\"]}\"\n    --- PASS: metric_meta/select * from cpu ... (0.00 sec)\n    --- FAIL: metric_meta/select * from cpu (0.00 sec)\n\tStatement: select * from cpu\n\tNot equal: \n\t   expected: \"[\\\"ddd\\\"]\"\n\t   actual  : \"{\\\"metricName\\\":\\\"cpu\\\",\\\"startTime\\\":1702514340000,\\\"endTime\\\":1702517940000,\\\"interval\\\":10000}\"\nfail ./t/metric_meta.test \nSummary: total 4, success 2, fail 2\n```\n\n## License\n\nTSDB Tester is under the Apache 2.0 license. See the [LICENSE](./LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flindb%2Ftsdb-tester","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flindb%2Ftsdb-tester","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flindb%2Ftsdb-tester/lists"}