Skip to content

Commit

Permalink
test: more test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
alespour committed Aug 31, 2023
1 parent 1e4b43a commit 28e3be4
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions influxdb3/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,24 @@ func TestNewFromEnv(t *testing.T) {
},
},
},
{
name: "invalid precision",
vars: map[string]string{
"INFLUX_HOST": "http://host:8086",
"INFLUX_TOKEN": "abc",
"INFLUX_PRECISION": "xs",
},
err: "unsupported precision",
},
{
name: "invalid gzip threshold",
vars: map[string]string{
"INFLUX_HOST": "http://host:8086",
"INFLUX_TOKEN": "abc",
"INFLUX_GZIP_THRESHOLD": "a0",
},
err: "invalid syntax",
},
}
clearEnv := func() {
os.Unsetenv(envInfluxHost)
Expand Down

0 comments on commit 28e3be4

Please sign in to comment.