Commit Graph

101 Commits (933a14e16f0232c5ec883644b7363a59da7bcd90)

Author SHA1 Message Date
Brandon Farmer c2c864d611 feat(influxdb): Add test around CLI proxy path 2020-01-22 14:13:25 -08:00
Brandon Farmer fe517fd9ce feat(influxdb): Add proxy path to cli 2020-01-21 10:23:46 -08:00
Stuart Carnie 9d1a8c97d8 feat(influx): Add `-type` switch and implement decision tree
* `-type` reports error for invalid values
* Implemented decision tree such that appropriate message is printed
  when Flux version of command is executed
* all variations for invoking influx identified in #10407 work as
  expected
2018-10-25 11:12:14 -07:00
Jonathan A. Sternberg af23897940 Allow setting the node id in the influx cli program
The string `node <n>` can be used to specify which data node the data
should be retrieved from. This uses the `node_id=X` query parameter that
is supported, but wasn't exposed anywhere in the client library.

We use this feature enough internally when attempting to find
inconsistencies or network errors that it is easier if this is just
supported. Otherwise, I continue having to recompile the CLI program
every time I need to do this.

To clear a previously set node, you can use `node 0` or `node clear`.
2018-01-02 11:15:19 -06:00
Ben Johnson d8b1d208c0
rebase 2017-12-20 15:13:34 -07:00
Jonathan A. Sternberg 00ab411a6c Group the "strings" import with the other stdlib imports 2017-11-27 17:10:28 -06:00
e-wave 75e142c41a use of flag.Args instead of flag.NArg 2017-11-13 18:07:00 +02:00
e-wave 1c256e1441 shell shows error and usage when given extra parameters 2017-11-13 17:06:58 +02:00
Mark Rushakoff 6768c6ed3b Update godoc for the cmd package and subpackages 2016-12-30 11:58:43 -08:00
Edd Robinson a98ad483ee Refactor how CLI manages configuration options 2016-12-02 18:26:47 +00:00
oiooj 8ddb11cee2 support unix socket connect for influx CLI 2016-11-30 22:37:56 +08:00
Edd Robinson effcccdcaf Set default consistency to all 2016-05-19 18:54:07 +01:00
Philip O Toole ed7229fa2d Make it clear when CLI version is unknown
This mimics the behavior of the database binary.
2016-04-22 21:35:42 -07:00
Ben Johnson 5a0d1ab7c1 rename influxdb/influxdb to influxdata/influxdb
This commit changes all the import and URL references from:

    github.com/influxdb/influxdb

to:

    github.com/influxdata/influxdb
2016-02-10 10:26:18 -07:00
Jason Wilder d4ee1cb2b1 Merge pull request #5284 from mglazer/secure-cli
CLI Option to Connect without HTTPS Verifica…
2016-02-08 11:45:32 -07:00
Jonathan A. Sternberg 6b546cb766 Remove calls of os.Exit from influx cli Run method and fix influx tests
One of the first unit tests in the cli tests called the Run method.
Since the Run method called os.Exit, it reported the unit tests as
succeeded. When parallel is set to 1, this skips _all_ unit tests after
the first one. When parallel is set to a higher value, unit tests run by
other processes still get run.

This changes the Run method to return an error (if one occurred). This
error can then be printed out and a bad exit status can be used to exit
the program from the main program instead.  That causes the unit tests
to run correctly regardless of how many parallel processes are running.

Also added an additional option to the CLI called `IgnoreSignals`. If
this is set to true, then signals are not registered with the process.
Setting signals doesn't really work in unit tests so it's good to ensure
they don't get set in the first place.

In addition to fixing the influx cli tests, this adds a mock client to
the cli test for Use. PR #5183 added a validation for `use` to only be
able to select public databases so `_internal` couldn't be chosen. To
implement this, the `SHOW DATABASES` command was used by the internal
client.

Some of the unit tests in `cli_test.go` don't set the client to
anything. `TestParseCommand_Use` previously didn't, but now it needs to
have a client in the unit test with an empty test server.
2015-12-29 14:58:54 -05:00
Mike Glazer c049ebfa43 Support connecting to InfluxDB with the client without HTTPS Verification
The V2 client code supports this, however, the V1 client code didn't,
and the argument to support this just had to be added to the CLI
2015-12-29 09:03:16 -08:00
Paulo Pires aa6f807dfe Move CLI stuff out of main package for increased testability. Refs #2313 2015-11-10 16:27:13 +00:00
Paulo Pires 39f9e516c6 Improve CLI command parsing. Fixes #4544 2015-11-09 23:56:30 +00:00
Paulo Pires b41131643d Implement CLI history command. Fixes #4628 2015-11-06 22:20:28 -05:00
Philip O'Toole e6dffd12c7 Check for errors in response during token check
Fixes issue #4641.
2015-11-03 07:59:37 -08:00
Philip O'Toole a727a8dd3f Only display Enterprise hint on CLI mode
This change moves the logic to detect and display the Enterprise
registration hint into the same logic check as that which decides if the
successful-connection message should be displayed.

Fixes #4514.
2015-10-27 17:18:18 -07:00
Philip O'Toole bb80bf5211 Display Enterprise message if no token set 2015-10-20 12:59:22 -07:00
Philip O'Toole 81390db622 Actually check connection errors
Fix issue #4463
2015-10-15 15:07:18 -07:00
Cory LaNou c70b503f00 go fmt 2015-09-15 16:09:58 -05:00
Sébastien Bouchex Bellomié 5656ba167f Added precision support in cmd client 2015-09-11 10:04:18 +02:00
Sébastien Bouchex Bellomié 9831ab2cc8 Added precision support in cmd client 2015-09-11 09:20:02 +02:00
Sébastien Bouchex Bellomié f8a827d9d2 Added precision support in cmd client 2015-09-09 22:54:57 +02:00
Sébastien Bouchex Bellomié 23a606bafc Added precision support in cmd client 2015-09-09 22:17:48 +02:00
Jason Wilder 1d4ee6c3fa Add tests for influx consistency level parsing 2015-09-02 09:22:15 -06:00
Takayuki Usui 557f796566 Add an option to cmd/influx to set write consistency level
This patch introduces an option in influx allowing users to
select write consistency level, which has been implicitly
set to 'any' by default so far.
2015-09-02 11:00:06 +09:00
Cory LaNou ace4737228 throttle import 2015-08-21 15:07:01 -05:00
Cory LaNou 05fde32c2f silence output when connecting 2015-08-06 10:24:00 -05:00
Cory LaNou b29f9a4118 minor fix to help for influx 2015-08-06 09:19:56 -05:00
Cory LaNou 296f16d634 NewConfig should return a default config without needing params passed to it 2015-08-06 09:19:56 -05:00
Cory LaNou 76367d5161 refactoring based on feedback 2015-08-06 09:19:56 -05:00
Cory LaNou 30a0ca0130 start of a v8 data importer via the cli 2015-08-06 09:19:34 -05:00
gunnaraasen 32d3d70da9 Remove all dump code from CLI 2015-07-23 17:21:01 -07:00
Sean Beckett 7b6cbbe9b3 removing DUMP from CLI help 2015-07-23 17:19:58 -07:00
Alexander Morozov 675eacbf2c Fix style issues with else
In go it's better to just continue flow without "else", if it is return in
"if" statement.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-07-17 11:10:23 -07:00
Timothy Raymond 21582ad0d6 Allow semicolons to trail database names in "use"
Prior to this commit, the "use" command treated trailing semicolons as
significant parts of the database name. This lead to a confusing user
experience since other parts of influxql treat the trailing semicolon as
a statement separator, or appear to ignore it. A typical use case looks
something like:

> show databases;
-- snip --
> use foo;

This commit trims off trailing semicolons from database names in "use"
commands if present to match user expectations.

Fixes #2258
2015-07-17 10:54:07 -07:00
gunnaraasen f46e66ef37 Update link in CLI shell help command 2015-07-14 10:46:49 -07:00
David Lawrence 6a2707a313 Update main.go
Make the formatting of the flag info consistent.

Signed-off-by: David Lawrence <dclwrnc@gmail.com> (github: endophage)
2015-07-10 10:27:30 -07:00
JP 23728340d0 add ssl flag to convert scheme to https 2015-06-29 10:49:27 -05:00
gunnaraasen 9e59272b0b Change error message 2015-06-24 11:50:06 -07:00
gunnaraasen b01d63f148 Fix CLI panic on malformed INSERT. Fixes #3078 2015-06-23 23:11:11 -07:00
gunnaraasen 2d712733e9 Clean up INSERT INTO parsing and tests 2015-06-09 15:45:26 -07:00
gunnaraasen 030cb52602 Add INSERT INTO 2015-06-09 15:14:16 -07:00
gunnaraasen de389e6fc8 Add INSERT keyword to CLI for writing points via the line protocol 2015-06-09 15:14:16 -07:00
ben hockey 7ee92cf9b8 name the FlagSet for the shell and add a version flag 2015-05-21 09:25:56 -05:00