diff --git a/flux/stdlib/influxdata/influxdb/filter_test.flux b/flux/stdlib/influxdata/influxdb/filter_test.flux index 2f39f442323..626c8daa97f 100644 --- a/flux/stdlib/influxdata/influxdb/filter_test.flux +++ b/flux/stdlib/influxdata/influxdb/filter_test.flux @@ -33,7 +33,8 @@ testcase filter { ,,0,2018-05-22T19:53:36Z,system,host.local,load1,1.63 ") - got = testing.loadStorage(csv: input) + got = csv.from(csv: input) + |> testing.load() |> range(start: -100y) |> filter(fn: (r) => r._measurement == "system" and r._field == "load1") |> drop(columns: ["_start", "_stop"]) diff --git a/go.mod b/go.mod index 53f67d5e6e9..5fae02f7814 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/golang/mock v1.5.0 github.com/golang/snappy v0.0.4 github.com/google/go-cmp v0.5.7 - github.com/influxdata/flux v0.170.1 + github.com/influxdata/flux v0.171.0 github.com/influxdata/httprouter v1.3.1-0.20191122104820-ee83e2772f69 github.com/influxdata/influxql v1.1.1-0.20211004132434-7e7d61973256 github.com/influxdata/pkg-config v0.2.11 @@ -133,7 +133,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/procfs v0.0.11 // indirect github.com/segmentio/kafka-go v0.2.0 // indirect - github.com/sergi/go-diff v1.0.0 // indirect + github.com/sergi/go-diff v1.1.0 // indirect github.com/sirupsen/logrus v1.8.1 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/uber-go/tally v3.3.15+incompatible // indirect diff --git a/go.sum b/go.sum index c37c7d9a7f7..fea46a9899e 100644 --- a/go.sum +++ b/go.sum @@ -579,8 +579,8 @@ github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/flux v0.65.0/go.mod h1:BwN2XG2lMszOoquQaFdPET8FRQfrXiZsWmcMO9rkaVY= -github.com/influxdata/flux v0.170.1 h1:aP0boTO8WZ1yHVU9v01lVVdtLdFbwigeALIQPXTwbc0= -github.com/influxdata/flux v0.170.1/go.mod h1:fNtcZ8tqtVDjwWYcPRvCdlY5t3n+NYCc5xunKCmigQA= +github.com/influxdata/flux v0.171.0 h1:9s0MA0bGXPRmzeAvZPYl1412qYSdeTNQb1cgW83nu2M= +github.com/influxdata/flux v0.171.0/go.mod h1:fNtcZ8tqtVDjwWYcPRvCdlY5t3n+NYCc5xunKCmigQA= github.com/influxdata/gosnowflake v1.6.9 h1:BhE39Mmh8bC+Rvd4QQsP2gHypfeYIH1wqW1AjGWxxrE= github.com/influxdata/gosnowflake v1.6.9/go.mod h1:9W/BvCXOKx2gJtQ+jdi1Vudev9t9/UDOEHnlJZ/y1nU= github.com/influxdata/httprouter v1.3.1-0.20191122104820-ee83e2772f69 h1:WQsmW0fXO4ZE/lFGIE84G6rIV5SJN3P3sjIXAP1a8eU= @@ -853,8 +853,9 @@ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/segmentio/kafka-go v0.2.0 h1:HtCSf6B4gN/87yc5qTl7WsxPKQIIGXLPPM1bMCPOsoY= github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= -github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= diff --git a/internal/cmd/fluxtest-harness-influxdb/test.go b/internal/cmd/fluxtest-harness-influxdb/test.go index edca36a0ce0..7d713f6b1cb 100644 --- a/internal/cmd/fluxtest-harness-influxdb/test.go +++ b/internal/cmd/fluxtest-harness-influxdb/test.go @@ -198,8 +198,8 @@ const writeOptSource = ` import "testing" import c "csv" -option testing.loadStorage = (csv) => { - return c.from(csv: csv) |> to(bucket: bucket) +option testing.load = (tables=<-) => { + return tables |> to(bucket: bucket, org: org) } ` @@ -210,7 +210,7 @@ const readOptSource = ` import "testing" import c "csv" -option testing.loadStorage = (csv) => { +option testing.load = (tables=<-) => { return from(bucket: bucket) } ` diff --git a/test-flux.sh b/test-flux.sh index df13e454807..d7f1dd5cc01 100755 --- a/test-flux.sh +++ b/test-flux.sh @@ -31,15 +31,99 @@ build_test_harness() { "$GO" build -o fluxtest ./internal/cmd/fluxtest-harness-influxdb } -# Many tests targeting 3rd party databases are not yet supported in CI and should be filtered out. -DB_INTEGRATION_WRITE_TESTS=integration_mqtt_pub,integration_sqlite_write_to,integration_vertica_write_to,integration_mssql_write_to,integration_mysql_write_to,integration_mariadb_write_to,integration_pg_write_to,integration_hdb_write_to -DB_INTEGRATION_READ_TESTS=integration_sqlite_read_from_seed,integration_sqlite_read_from_nonseed,integration_vertica_read_from_seed,integration_vertica_read_from_nonseed,integration_mssql_read_from_seed,integration_mssql_read_from_nonseed,integration_mariadb_read_from_seed,integration_mariadb_read_from_nonseed,integration_mysql_read_from_seed,integration_mysql_read_from_nonseed,integration_pg_read_from_seed,integration_pg_read_from_nonseed,integration_hdb_read_from_seed,integration_hdb_read_from_nonseed -DB_INTEGRATION_INJECTION_TESTS="integration_sqlite_injection,integration_hdb_injection,integration_pg_injection,integration_mysql_injection,integration_mariadb_injection,integration_mssql_injection" -DB_TESTS="${DB_INTEGRATION_WRITE_TESTS},${DB_INTEGRATION_READ_TESTS},${DB_INTEGRATION_INJECTION_TESTS}" +skipped_tests() { + doc=$(cat <