motleyagency / influxdb-incremental-restore

InfluxDB incremental restore script
MIT License
14 stars 0 forks source link

Convert to TypeScript #15

Open petetnt opened 4 years ago

petetnt commented 4 years ago

This PR converts the lib to TS from Flow and fixes few minor bugs caught by the compiler, plus makes some of the output more verbose and aligns the code a bit

Fixes MOT-8

linear[bot] commented 4 years ago
MOT-8 Convert influxdb-incremental-restore to TypeScript

It was done with flow, convert it to TS for future proofing

jaakkojokinen commented 4 years ago

Following the influxdata docs, tested inside the docker container like this:

Create container

Import dataset & create database

Tested running commands inside the container as the previous command ^ suggests. These could be in Dockerfile as well.

Inside the influx console

outputs:

name: measurements
------------------
name
average_temperature
h2o_feet
h2o_pH
h2o_quality
h2o_temperature

outputs:

name: h2o_feet
--------------
time                           count
1970-01-01T00:00:00Z     15258

Example test queries from https://docs.influxdata.com/influxdb/v1.8/query_language/sample-data/#download-and-write-the-data-to-influxdb

Seems to be okay, but I'm unsure if this test is covering enough (?) If not, add some use cases that has to be tested.