DiamondMofeng / grafana-greptime-datasource

Grafana datasource plugin for GreptimeDB
Apache License 2.0
11 stars 1 forks source link

TODO: Setup integration test #6

Open DiamondMofeng opened 1 year ago

DiamondMofeng commented 1 year ago

It is quite annoying testing this plugin manually. Not only I have to see if the UI functions well, but also to check if the data representing from the plugin is same to the data in database. I also need to manually insert some new test data to database before test.

It's very necessary to setup integration test.

DiamondMofeng commented 1 year ago

I have added greptimedb into docker compose. Now we can assume that we have a grafana running on localhost:3000 and a greptimedb running on localhost:4000 in integration testing. Grafana can access greptime using http://greptimedb:4000.

DiamondMofeng commented 1 year ago

Feel very frustrated after fighting this for an entire day.

图片

图片

I have no idea why this could happen. As @swc/jest transformer does not have type checking.

DiamondMofeng commented 1 year ago

Feel very frustrated after fighting this for an entire day.

图片

图片

I have no idea why this could happen. As @swc/jest transformer does not have type checking.

Fixed after updating jest config https://github.com/DiamondMofeng/grafana-greptime-datasource/commit/01d92fd997bd4b0dd7ab8ffc1bcd2b8377f5b306