Commit Graph

25 Commits (2ab79e75eb7d3449eebe67d234f60208e69da8f4)

Author SHA1 Message Date
Ross McDonald 51758cff25 Switched 0.9 references to 0.10. 2016-02-11 08:44:45 -06:00
Ben Johnson d9a6a7340f add canonical paths 2016-02-10 11:30:52 -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
Ben Johnson 08f823546d fix rebase issue 2016-02-10 09:40:29 -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
Edward Robinson b8e42cdd3a Ensure non-interactive mode returns appropriate exit code
Fixes #5475.
2016-02-02 15:23:16 +00:00
Adam Svoboda 40e04d89fc Prevent exponential growth in ~/.influx_history
The history file is cleared before WriteHistory is called after each
command/exit() to prevent exponential file growth.

This commit addresses issue #5436, please see PR for full explanation.
2016-01-26 20:53:41 -06:00
Edd Robinson c6d32bd1bb Fix #5127 2016-01-07 22:30:46 +00: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
Sebastian Borza 26bc778b40 adding quit and Ctrl-D support to influx cli
update comment based on feedback
2015-12-23 11:54:41 -05:00
Paulo Pires 3165c707fc Small improvements to USE command as per PR comments. 2015-12-22 08:55:32 +00:00
Paulo Pires 3f4949019d USE databasename will work only for existing databases. Fixes #5174 2015-12-21 09:34:40 +00:00
nick.grange 99f90770da Fixed code format using go fmt. 2015-12-18 00:28:58 +11:00
nick.grange 33de878956 Fixed #5078 to support Inserts in non-interactive mode.
Changed non-interactive mode to send everything through the CLI's parser the same way the interactive mode works.
Added multiline support for -execute flag.
2015-12-17 23:42:30 +11:00
Yin Jifeng 2f3fc70514 FIX #4279 CLI support multiline 2015-11-16 22:59:21 +08:00
Cory LaNou bb00645a84 Merge pull request #4768 from pires/4719-cli_history_refactor
CLI history skips blank lines.
2015-11-14 07:25:58 -06:00
Paulo Pires a8fa170f29 Removed bogus comment. 2015-11-14 11:12:31 +00:00
Paulo Pires aa6ec0cc6f Added more tests to increase coverage. Refs #2313 2015-11-13 11:38:35 +00:00
Anes Hasicic 95ced0bcc1 Changed help command output from inside the cli to
match the info provided by the influx --help output,
and added history command

Reverted description for pretty command

+ minor edits

Removed duplication of command names

Signed-off-by: Anes Hasicic <anes.hasicic@gmail.com>
2015-11-13 09:41:51 +01:00
Paulo Pires 81658de1be Exit gracefully on forced CLI termination. 2015-11-12 23:14:36 +00:00
Paulo Pires c812aaa36b Refactored command parsing tokenization. 2015-11-12 20:52:41 +00:00
Paulo Pires 194b2c4965 CLI history skips blank lines.
Fixes #4719
2015-11-12 20:50:23 +00:00
Pablo Miranda b908cbb866 fix lint errors for cmd/...
corrects the initialize package comment for lint

brings c.ServerVersion back
2015-11-10 23:13:01 -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