Commit Graph

88 Commits (98bcad1035a777bf2002af5339056d68fc310c89)

Author SHA1 Message Date
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
Cory LaNou 60729fdd77 cli usage corrections 2015-05-18 18:18:44 -06:00
Cory LaNou 8beda919d0 update usage 2015-05-18 18:18:44 -06:00
Cory LaNou 977b84d6a0 update cli flags: output -> format, +pretty 2015-05-18 18:18:44 -06:00
Cory LaNou e947fc41b8 clean up liner before an os exit (skips the defer) 2015-05-18 18:18:44 -06:00
Cory LaNou 33f976a340 lot of refactoring to create integration tests for cli 2015-04-13 15:56:49 -06:00
Cory LaNou 1ae5c09f61 let the client library handle setting auth 2015-04-13 15:56:29 -06:00
Dejan Golja c232e21ef1 improve exit code(s) for influx CLI 2015-04-11 20:45:08 +10:00
Dejan Golja 0f7e3d259b Added the option to influx CLI to execute single command and exit.
Helpful when scripting and automating installs
2015-04-10 00:27:57 +10:00
Jari Sukanen a56ea6f191 client: rename client.Results type to client.Response (issue: #2050)
Rename client.Results to client.Response as it already has Results
property itself. Renaming it to Response makes code look much less
ugly.
2015-04-04 11:43:53 +03:00
Todd Persen 8425c0c578 Final cleanups based on review feedback. 2015-03-18 23:02:11 -07:00
Joseph Rothrock 21fd2e2662 dump cmd
rename dump flag

put an error response body if json marshalling breaks.

detect and respond to http error codes in the client.
2015-03-18 14:10:36 -07:00
Joseph Rothrock 5df3e8c3aa suppress more client msgs 2015-03-17 14:44:15 -07:00
Joseph Rothrock 9b3f0399af oops, left in some cruft 2015-03-17 13:57:47 -07:00