Michael Klishin
f85d4b4d56
Update one more test
...
Part of #274 .
2018-11-21 08:02:20 +08:00
Luke Bakken
8ab22299a8
Document --no-table-headers
...
Fixes #274
Switch no_table_headers to table_headers
update tests
Integrate --silent
2018-11-19 15:25:36 -08:00
Michael Klishin
3968f94934
A follow-up to 35114e5dd4
2018-11-15 16:56:34 +00:00
Michael Klishin
35114e5dd4
Update this test for 3.8
...
Now that there's a 3.8 tag the build system detects server
version as 3.8.x, so this test has to be updated.
2018-11-15 16:38:25 +00:00
Michael Klishin
6416d745ed
Update tests
...
[#161309687 ]
2018-11-01 23:46:32 +03:00
Michael Klishin
36ad6dfdb5
Merge pull request #269 from rabbitmq/rabbitmq-cli-267
...
rabbitmq-diagnostics: make cipher_suites default to --openssl-format
2018-10-30 07:06:57 +03:00
Michael Klishin
fc18b4cce7
Update test titles
2018-10-30 07:02:47 +03:00
Michael Klishin
b7d5fd4431
More warnings
2018-10-30 00:52:19 +03:00
Michael Klishin
875c7827f6
rabbitmq-diagnostics: make cipher_suites default to --openssl-format
...
And introduce --erlang-format. They are mutually exclusive.
Closes #267 .
[#161435591 ]
2018-10-28 23:31:39 +03:00
Michael Klishin
5e54354fdf
Make it possible to suppress table headers for list_* commands
...
Using --no-table-headers, per discussion with @dumbbell.
2018-10-24 16:43:58 +03:00
Daniil Fedotov
222e486ca7
Add headers to the table formatter.
...
There were headers in 3.6 CLI which were not implemented when moving
to the new one.
Fixes #264
[#161326468 ]
2018-10-22 10:55:16 +01:00
Michael Klishin
5ec71c18f3
Retrieve plugin directory and file information via Config
...
[#160792758 ]
2018-10-03 16:43:42 +03:00
Michael Klishin
769e3171df
Merge branch 'master' into rabbitmq-cli-261
2018-10-02 04:07:47 +03:00
Michael Klishin
ad69a2f2f7
Drive by cosmetic changes
2018-10-02 04:07:33 +03:00
Michael Klishin
1b56fc5957
New command: rabbitmq-plugins directories
...
Closes rabbitmq/rabbitmq-cli#261.
[#160792758 ]
2018-10-02 03:16:25 +03:00
Michael Klishin
ad10aff434
Expect rabbitmqctl add_vhost to be idempotent
...
Part of rabbitmq/rabbitmq-cli#260
[#160792770 ]
2018-09-27 06:22:55 +03:00
Ayanda Dube
c88cfd940d
Reduce code footprint on aliases
2018-07-23 06:06:18 +01:00
Michael Klishin
784ebfd55a
Ditto in close_all_connections_command_test
2018-07-14 02:06:01 +03:00
Michael Klishin
241aa9a3d2
An attempt to make this test more robust
...
This gives connection tracking a chance to update its state.
2018-07-14 00:42:57 +03:00
Michael Klishin
ee2b185db9
Introduce rabbitmqctl ping
...
See #253 for background.
[#158291890 ]
2018-06-12 16:47:54 +03:00
Michael Klishin
b06163bd32
More test stability improvements
...
Tests that trigger a timeout should specify a reachable node,
otherwise they'd get a {:badrpc, :nodedown} instead of {:badrpc, :timeout}.
2018-06-06 14:53:27 +03:00
Michael Klishin
52deb01d68
Less fragile diagnostics tests, squash a few warnings
...
Discovered as part of working on OTP 21 compatibility.
2018-06-06 14:11:41 +03:00
Michael Klishin
c97b0de364
Tests for await_online_nodes, drive by wording changes
...
[#156729133 ]
2018-05-30 03:04:49 +03:00
kjnilsson
da8fcc8b88
Test reliability
...
Make the vhost restart code a bit more reliable.
2018-05-01 14:51:55 +01:00
Michael Klishin
56991de0f3
Accept -t/--timeout before command name [again]
...
There are existing users (including RabbitMQ core tests) that
use that sequence because it was previously in the docs.
This relaxes command validation so that if a command-specific
flag overrides a global, we accept it as long as their types match.
Per discussion with @hairyhum.
2018-03-09 20:28:26 +03:00
Daniil Fedotov
aef04bef84
Show timeout in help messages only for commands supporting timeout.
...
Removed timeout from default parsing options. Now every command
has to specify timeout in it's own switches.
If a command has timeout in switches - there will be help displayed
for this option in usage output.
2018-03-07 18:28:21 +00:00
Daniil Fedotov
8840460e00
Missing test helper to lookup queues
2018-03-07 15:26:46 +00:00
Daniil Fedotov
8b33c646ed
Command to delete a queue.
2018-03-07 15:20:18 +00:00
Michael Klishin
f99245c5b6
Wording
2017-12-08 17:55:50 -08:00
Luke Bakken
81862adcab
Fixing SetParameterCommand and tests
...
Fix code to fix test suite
2017-12-08 11:49:20 -08:00
Daniil Fedotov
32cf46e5c8
Fix rabbitmq-plugins enable/disable/set behavior for --online flag.
...
If flag is set to `--online` the commands should fail if node is not
running.
If flag is not set, they should fallback to offline mode if the
node is not running.
This corresponds to the rabbitmq-plugins.8 manpage.
Made validation aware of online flag.
Define best_effort mode to fallback if node is not running.
Requires rabbitmq/rabbitmq-server#1433
Fixes #226
[#153184802 ]
2017-11-27 18:49:08 +00:00
Michael Klishin
725dd80ff2
Adapt to rabbitmq/rabbitmq-server#1413
2017-10-31 15:03:19 +03:00
Michael Klishin
bc32019d7c
Update expectations in force_boot_command_test
2017-08-15 13:11:18 +03:00
Daniil Fedotov
e34bfe2297
Merge branch 'master' into rabbitmq-cli-214-take-two
2017-08-14 14:40:35 +01:00
Daniil Fedotov
568874033d
Run dialyzer tests. Fix warnings.
...
Some types were named wrongly (list(), map())
MapSet cannot be matched to be empty. `%MapSet{}` only matches the type.
2017-08-14 14:36:38 +01:00
Michael Klishin
b00e648b9c
Extend execution environment validation to more commands
...
This also re-formats a bunch of commands to follow the same
order for the following functions:
* merge_defaults/2
* validate/2
* validate_execution_environment/2
* run/2
2017-08-11 18:06:30 +03:00
Michael Klishin
efe8725f3c
Merge branch 'master' into rabbitmq-cli-214-take-two
2017-08-10 14:21:42 +03:00
Daniil Fedotov
035e7305ac
Merge pull request #218 from rabbitmq/timeout_list_queues
...
Set a timeout on list_queues and a warning if unresponsive ones are found
2017-08-09 17:24:40 +04:00
Daniil Fedotov
3542b0d281
Add timeout message to list_queues command test
2017-08-09 14:24:12 +01:00
Michael Klishin
0031c4fdf6
Make validate/2 and validate_execution_environment/2 use the same tuple tag
...
Per discussion with @hairyhum.
2017-08-09 01:11:14 +03:00
Michael Klishin
afa605b3e9
Merge branch 'master' into rabbitmq-cli-214-take-two
...
Conflicts:
lib/rabbitmq/cli/plugins/commands/enable_command.ex
2017-08-08 19:14:07 +03:00
Michael Klishin
1e65edb7df
Update test expectations
2017-08-08 18:59:58 +03:00
Michael Klishin
c227843e32
Make validate_execution_environment/2 use a different tuple tag for failures
...
Per discussion with @hairyhum.
2017-08-08 18:29:04 +03:00
Michael Klishin
6c70863dcf
rabbitmq-plugins: refactor to validate_execution_environment/2 and R.C.C.Validators.chain/2
2017-08-08 03:21:07 +03:00
Michael Klishin
15565ec1d7
rabbitmq-plugins set: switch to validate_execution_environment/2
2017-08-07 16:44:19 +03:00
Michael Klishin
2e64c90913
rabbitmq-plugins enable: switch to validate_execution_environment/2
2017-08-07 16:04:30 +03:00
Michael Klishin
770258ea65
rabbitmq-plugins disable: switch to validate_execution_environment/2
2017-08-07 14:47:17 +03:00
Michael Klishin
6da66de40a
forget_cluster_node: switch to validate_execution_environment/2
2017-08-04 19:15:53 +03:00
Daniil Fedotov
d66235a955
Cleanup test warnings
2017-08-04 12:19:56 +01:00
Daniil Fedotov
0676410019
Test that vhost is restarted after running restart_vhost
2017-08-04 11:32:40 +01:00
Daniil Fedotov
10bb587d61
The command to restart a vhost.
...
The command will attempt to restart a vhost.
If restarted successfully, return exit code 0
If the vhost is already started, return exit code 0 and notify that it's already started.
If there is an error restarting, return exit code 70 and the error
Part of rabbitmq/rabbitmq-server#1321
[#149484305 ]
2017-08-04 11:32:40 +01:00
Jean-Sébastien Pédron
66090ae1ee
test/close_all_connections_command_test.exs: Wait for one second for connections to close
...
... in the "close a limited number of connections in an existing vhost
closes a subset of connections" testcase. Hopefully this will fix
transient failures in CI because only one connection was closed.
2017-07-21 09:23:16 +02:00
Diana Corbacho
070ac897cc
Use gb and bytes units
2017-07-14 10:14:25 +01:00
Michael Klishin
4383c3e280
Tests, refactoring
2017-07-14 03:33:46 +03:00
Michael Klishin
6e49d8f516
Cosmetics
2017-07-13 19:36:26 +03:00
Michael Klishin
2d758a9913
Whitespace
2017-07-13 05:43:24 +03:00
Michael Klishin
a710114e1e
Spam
2017-07-11 15:38:15 +03:00
Michael Klishin
de41a1081a
Introduce rabbitmq-diagnostics erlang_version
2017-07-11 15:28:12 +03:00
Michael Klishin
c26a7a5909
Introduce rabbitmq-diagnostics server_version
2017-07-11 13:26:05 +03:00
Michael Klishin
e61e5c9289
Cosmetics
2017-07-11 13:25:28 +03:00
Michael Klishin
ca20f8a0d6
Make CLI tools diagnostics message more detailed
...
Our current message is informative enough but it ends with a "nodedown".
Emperical evidence suggests that once a user sees it, they stop reading.
Providing a hint that there will be diagnostics output below is step 1.
Step 2 is improving the diagnostics section. It now
* Calls out three most common groups of issues explicitly
* Suggests what documentation guides can contain helpful information
There are rabbitmq-server and rabbitmq-common commits that make
similar improvements to the server-supplied part of the diagnostics
message.
Per discussion with the team.
2017-07-04 22:34:39 +03:00
Michael Klishin
5774bc64e5
Merge branch 'master' into rabbitmq-cli-encode-commands
2017-07-03 15:52:07 +03:00
Daniil Fedotov
58304ffc95
Split encode command tests to separate commands
2017-07-03 12:11:34 +01:00
Michael Klishin
9b9ebe7f29
Reduce probability of running into server#1280
...
When tests are being run in a loop, it is possible to reach max
supervisor restart intensity even with decent handling of concurrent
vhost setup/deletion.
2017-06-30 16:42:37 +03:00
Michael Klishin
b7b5223a39
list_vhost_limits: handle errors before serialising results
...
Also update tests and format no_such_vhost errors in a more sensible
way.
2017-06-30 14:43:09 +03:00
Michael Klishin
e1ae05ec64
A typo
2017-06-30 09:00:16 +03:00
Michael Klishin
2d60573f03
Make these tests more resilient to node data variations
...
E.g. if other test suites created a bunch of users
first. We should not assume that there's only one user
present.
2017-06-16 19:29:38 +03:00
Daniil Fedotov
89c9a7d6aa
Exec command tests
2017-06-08 18:37:34 +01:00
Daniil Fedotov
1641ecbc11
Improve wait command.
...
Do not call await_startup on rabbitmq node, instead do it on
rabbitmqctl node, so even if net_ticktime is low, it won't fail
with nodedown.
2017-06-08 18:15:21 +01:00
Daniil Fedotov
b802fcdf87
Do not try to connect to the RabbitMQ node before executing command
...
Commands are supposed to return bardpc errors, which are handled by output,
so there is no need to connect to the node before calling the run function.
2017-06-07 16:21:53 +01:00
Daniil Fedotov
b8d6042046
Quiet mode for wait command will suppress log messages
2017-06-07 14:22:59 +01:00
Jean-Sébastien Pédron
cd377eeb0f
Merge branch 'rabbitmq-cli-wait-stages'
2017-06-07 13:42:36 +02:00
Daniil Fedotov
fe2568e6ba
Fix function arity when testing handle_command_output
2017-06-06 12:20:18 +01:00
Daniil Fedotov
27fc29914c
Test exec command
2017-06-06 12:07:00 +01:00
Daniil Fedotov
5c98699a29
Add new test to check argument processing typical to multiple commands.
...
Check that merge_defaults does not fail on badmatch with arbitrary args.
Check that info keys can be a comma-separated list
2017-06-06 12:06:17 +01:00
Daniil Fedotov
b4a8789ed1
Wait in stages.
...
Make wait command work in stages with timeouts.
First wait for a pid file to appear (times out)
Then wait for erlang distribution to start on the node (times out)
Then wait for application to be running in the node (does not time out)
Default timeout is set to 10 seconds, which should be enough to
write a pid file and start distribution.
2017-06-02 16:48:34 +01:00
Daniil Fedotov
6cf003ed03
Typo in info message
2017-06-02 14:35:52 +01:00
Daniil Fedotov
48e4c376f9
Check that there are no errors in report command output
2017-06-02 12:34:45 +01:00
Daniil Fedotov
fe8df8a2d7
Trace on/off commands output test
2017-06-02 12:30:45 +01:00
Daniil Fedotov
5b42862016
Fix tests
2017-05-24 13:46:34 +01:00
Daniil Fedotov
60deb8514d
Improve error reporting.
...
badrpc errors are handled in Rabbitmqctl module.
Report errors from node discovery
Add helpers to skip errors in formatters.
2017-05-24 12:08:03 +01:00
Michael Klishin
a10ecbdb7a
This command belongs to diagnostics, not ctl
2017-04-30 01:27:44 +02:00
Michael Klishin
48f79daa09
Don't output backend information; declare a formatter instead of delegating to it
2017-04-30 01:25:27 +02:00
Gabriele Santomaggio
5b8cdf37a1
Rename list_discover_peers with discover_peers
2017-04-28 18:47:35 +02:00
Gabriele Santomaggio
4fa68912a4
Format result
...
Add Backend type
Add simple unit test
2017-04-28 18:12:04 +02:00
Michael Klishin
1805012f77
Merge branch 'master' into rabbitmq-cli-shutdown
2017-04-07 22:31:54 +02:00
Michael Klishin
ac8b32f61a
Merge branch 'master' into rabbitmq-cli-180
...
Conflicts:
lib/rabbitmq/cli/core/distribution.ex
2017-04-05 15:03:52 +03:00
Daniil Fedotov
5c18bcf8b0
Test shutdown command validation.
2017-04-05 12:00:32 +01:00
Daniil Fedotov
62a44ac641
Optimize rabbitmqctl startup.
...
Plugins dirs are added to ERL_LIBS by shell scripts, we try to load
enabled plugins first and scan plugins dir only if some of them
are not found.
When discovering plugins, we can load applications only for enabled ones.
EPMD can be started only after initial `net_kernel:start` call failed.
We don't need to discover all commands every time, only if a command is not
in the `rabbitmqctl` application modules.
[finishes #143025009 ]
2017-04-04 14:06:53 +01:00
Daniil Fedotov
1e1cb92a44
Make it possible to specify erlang cookie from command line
...
Add new flag `--erlang-cookie` and environment variable `RABBITMQ_ERLANG_COOKIE`
to configure a cookie for CLI to connect to RabbitMQ node.
2017-04-03 14:46:26 +01:00
Daniil Fedotov
00a298961a
Print diagnostics on nodedown error
...
[finishes #142492945 ]
2017-03-31 11:28:41 +01:00
Michael Klishin
2dc56b3737
hipe_compile: reject blank, non-existent paths and those with insufficient permissions
...
References #178 .
2017-03-14 01:49:04 +03:00
Michael Klishin
ef98536ab4
rabbitmqctl hipe_compile WIP
2017-03-10 01:01:03 +03:00
Gerhard Lazu
4c6e83f8f5
Fix help command test
...
It would sometimes fail, based on the order of tests
2017-03-09 15:12:45 +00:00
Jean-Sébastien Pédron
61ba37f3f7
Fix all warnings reported by Elixir 1.4.x in the testsuite
2017-02-28 16:16:54 +01:00
Diana Corbacho
87331bb95e
Exclude applications that are not RabbitMQ plugins from the list of plugins
2017-02-27 14:52:40 +00:00
Michael Klishin
ec9cadbbb2
Wording
2017-02-21 19:52:06 +03:00
Michael Klishin
691b88670d
Merge branch 'master' into rabbitmq-cli-10
2017-02-21 11:34:07 +03:00
Michael Klishin
0bbecbca8a
Wait a tad to ensure all connections are closed and accounted for
2017-02-21 02:10:35 +03:00
Michael Klishin
ad483d1f4e
Tiny refactoring
2017-02-21 02:00:43 +03:00
Michael Klishin
9f5384838e
Set enable plugins before running this test
2017-02-21 01:45:06 +03:00
Daniil Fedotov
95fe5c96fd
Document aliases. Improve eval command to accept bound arguments
2017-02-16 12:41:26 +00:00
Daniil Fedotov
2b4012127e
Support aliases
...
Fixes #10
Loads aliases in "name = command_name [arguments and options]" format from --aliases-file
2017-02-15 18:03:45 +00:00
Daniil Fedotov
8efb8a32ab
Do not use Mix in production code.
...
Fixes #174
Mix is not bundled into the escript file, so sould not
be used in the code.
2017-02-15 10:46:08 +00:00
Michael Klishin
187bb25e82
Remove a couple of non-essential but fairly fragile tests
...
Incorrect help output is impossible to not notice (or hear
about from the users very quickly) but currently some tests
depend on command scoping (in that if an earlier test loaded
some extra commands it messes up with `help` output).
2017-02-07 15:43:24 +03:00
Michael Klishin
879df89a86
Merge branch 'master' into rabbitmq-server-1085
2017-02-05 23:24:24 +03:00
Michael Klishin
abf7bab4d2
Don't match on exact error message
...
References rabbitmq/rabbitmq-common#164 .
2017-02-02 00:13:13 +03:00
Arnaud Cogoluègnes
62cdd4d7fc
Merge branch 'master' into rabbitmq-server-1085
2017-01-31 17:20:52 +01:00
Michael Klishin
54d98e99de
Make these two tests pass
...
They are arguably not worth keeping at this point because they depend
on the exact output formatting and don't contribute much. It is extremely
unlikely that we will leave out info items and not notice it immediately
given that this CLI generation has already been integrated.
2017-01-27 18:44:14 +03:00
Michael Klishin
2a9c24af2c
Merge branch 'master' into rabbitmq-server-release-12
2017-01-27 18:33:19 +03:00
Jean-Sébastien Pédron
61d8bb836e
Merge pull request #171 from rabbitmq/rabbitmq-cli-170
...
Validate enabled plugins version requirements
2017-01-27 16:29:04 +01:00
Daniil Fedotov
0e13568ec3
Move plugin validation from `validate` to `run`
2017-01-27 14:55:09 +00:00
Daniil Fedotov
77860364bb
Merge branch 'master' into rabbitmq-server-release-12
2017-01-27 10:42:58 +00:00
Daniil Fedotov
d76229a3d1
Test plugin version validation when enabling all plugins
2017-01-26 16:28:01 +00:00
Daniil Fedotov
df95a411c7
Format user_already_exists error
2017-01-26 12:33:56 +00:00
Daniil Fedotov
52ad0d2a39
Validate enabled plugins version requirements
2017-01-26 12:21:20 +00:00
Daniil Fedotov
a5857e13d8
Handle auto-completion line as argv, not a single argument
...
It's easier to detect a script name if passed as argv list.
Arguments can be parsed with quoted spaces (e.g. in directory path)
2017-01-24 14:40:31 +00:00
Daniil Fedotov
b58da01921
More tests for autocomplete
2017-01-24 12:35:22 +00:00
Daniil Fedotov
1a7bdc871b
Fix some compiler warnings in tests
2017-01-24 12:33:48 +00:00
Daniil Fedotov
3871c4ccde
Support autocompletion with different script names
2017-01-24 12:30:12 +00:00
Daniil Fedotov
6288d75472
Cleanup compiler warnings
2017-01-24 09:59:00 +00:00
Arnaud Cogoluègnes
57f2eff218
Add read to topic permissions
...
Part of rabbitmq/rabbitmq-server#1085
2017-01-23 10:12:03 +01:00
Michael Klishin
ed68f0e957
Merge pull request #166 from rabbitmq/rabbitmq-event-exchange-10
...
Provide cli user as user who performs action for event notifications
2017-01-21 02:05:19 +03:00
Daniil Fedotov
b7fb43fb48
Fix auto complete module to support new parser API
2017-01-18 15:38:33 +00:00
Michael Klishin
ee34fac5bd
Merge branch 'master' into rabbitmq-event-exchange-10
2017-01-17 20:28:03 +03:00
Michael Klishin
8c984eac31
Merge branch 'master' into rabbitmq-cli-165
2017-01-17 18:38:27 +03:00
Michael Klishin
5b473b085c
Close all connections before this test
2017-01-17 18:38:14 +03:00
Daniil Fedotov
bb57a213c0
List vhost limits command
2017-01-17 13:02:09 +00:00
Diana Corbacho
fd6ba841cd
Provide cli user as user who performs action for event notifications
2017-01-17 09:01:14 +00:00
Daniil Fedotov
cea4e1803c
Adopt tests to the new rabbit_vhost_limits:list API
2017-01-16 12:09:10 +00:00
Michael Klishin
98ff75da70
Don't assume there aren't any topic permissions at the start of this test
2017-01-13 15:01:13 +03:00
Michael Klishin
5e15f5c2d2
Merge branch 'master' into rabbitmq-server-505
2017-01-12 12:58:27 +03:00
Daniil Fedotov
5c2d9bbc7b
Close connections for every test
2017-01-11 14:17:26 +00:00
Jean-Sébastien Pédron
5905f1c40a
Update copyright line to year 2017
2017-01-10 15:42:40 +01:00
Michael Klishin
82a4b4abae
Close all connections first in these tests
2017-01-07 05:26:33 +08:00
Michael Klishin
6c5c35e4b1
Wording
2017-01-07 05:13:57 +08:00
Michael Klishin
b12edd9b6c
Cosmetics
2017-01-07 03:43:22 +08:00
Diana Corbacho
b2b804eda9
Limit number of connections to close
2017-01-06 15:15:31 +01:00
Diana Corbacho
da8e333209
Test close all connections command
2017-01-06 13:54:48 +01:00
Arnaud Cogoluègnes
50f5738b02
Rename name to exchange in topic permissions
...
References rabbitmq/rabbitmq-server#505
2017-01-03 12:01:33 +01:00
Jean-Sébastien Pédron
e9121fe08c
{enable,disable}_plugins_command_test.exs: Adapt test
...
... after change in 530a9c7d83
.
[#136769947 ]
2016-12-29 18:14:07 +01:00
Jean-Sébastien Pédron
6864f7e510
help_command_test.exs: Fix warning about unused alias
2016-12-29 17:52:54 +01:00
Arnaud Cogoluègnes
6160bdd57e
Merge branch 'master' into rabbitmq-server-505
2016-12-27 16:43:57 +01:00
Daniil Fedotov
ab392e2737
Fix arguments to restore vm_watermark in test
2016-12-23 13:32:19 +00:00
Daniil Fedotov
30b41ba267
Support start from common_test tests
2016-12-23 12:12:33 +00:00
Arnaud Cogoluègnes
8d95b7455a
Fix topic authorisation tests
...
References rabbitmq/rabbitmq-server#505
2016-12-22 17:42:03 +01:00
Arnaud Cogoluègnes
c7a11fad38
Merge branch 'master' into rabbitmq-server-505
2016-12-22 17:09:06 +01:00
Arnaud Cogoluègnes
1dcc44d5f7
Add topic authorisation commands
...
References rabbitmq/rabbitmq-server#505
2016-12-22 16:50:59 +01:00
Daniil Fedotov
22aed07b7d
Get cluster name using rabbit_nodes to avoid writing not_found
2016-12-22 15:48:58 +00:00
Diana Corbacho
7b689ae633
Detailed error message in memory threshold validation
2016-12-22 12:13:46 +01:00
Michael Klishin
544e7155e5
Cosmetics, wording
2016-12-16 21:16:07 +03:00
Arnaud Cogoluègnes
93ca16c5ff
Add global parameters commands
...
Part of rabbitmq/rabbitmq-mqtt#73
2016-12-16 16:41:29 +01:00
Gerhard Lazu
240c7c0862
Merge pull request #156 from rabbitmq/rabbitmq-cli-153
...
Load .ez plugins without version
2016-12-14 17:00:40 +00:00
Gerhard Lazu
4d46936749
Be more specific about what is being stopped on `stop_app`
...
rabbitmq/rabbitmq-server#1043
2016-12-14 12:04:54 +00:00
Michael Klishin
f7a2dbfdbe
Cosmetics
2016-12-14 14:57:27 +03:00
Michael Klishin
c647314d79
Merge branch 'master' into rabbitmq-cli-153
2016-12-14 14:50:06 +03:00
Diana Corbacho
d872b5271b
Add tests for load of plugin applications
2016-12-14 11:40:13 +01:00
Diana Corbacho
6e29559910
Add tests for Erlang cookie hash command
2016-12-12 12:59:41 +01:00
Daniil Fedotov
895f0dd431
Specify test timeouts in milliseconds
2016-12-08 09:58:54 +00:00
Daniil Fedotov
e3344f2820
Give purge queue command test more time
2016-12-08 09:53:50 +00:00
Daniil Fedotov
8735851da4
Sort commands when printing help
2016-12-07 16:21:10 +00:00
Daniil Fedotov
274ea7944c
Let ciphe_suites command test more time
2016-12-07 16:07:27 +00:00
Arnaud Cogoluègnes
adef01fcbc
Merge pull request #150 from rabbitmq/rabbitmq-cli-144
...
Introduce `rabbitmq-diagnostics maybe_stuck`
2016-12-07 16:10:22 +01:00
Michael Klishin
6f5d3c6bb0
Introduce `rabbitmq-diagnostics maybe_stuck`
...
Fixes #144 .
[Finished ##135678977]
2016-12-07 17:10:17 +03:00
Daniil Fedotov
f7a741ece8
Merge branch 'master' into rabbitmq-cli-134
2016-12-07 14:05:59 +00:00
Diana Corbacho
6d9df7dfb3
Expect streams on plugins tests
2016-12-07 12:55:00 +00:00
Michael Klishin
7d730e739d
Introduce `rabbitmq-diagnostics cipher_suites [--openssl-format]`
...
Fixes #141 .
[##135616437]
2016-12-07 01:43:41 +03:00
Daniil Fedotov
d4807b5233
Test cleanup
2016-12-06 17:14:40 +00:00
Michael Klishin
b560ea76f6
Wording
2016-12-06 17:02:43 +03:00
Daniil Fedotov
fc0ca12a91
Test commands suggestions
2016-12-06 12:19:25 +00:00
Michael Klishin
ba0efb56b0
Merge pull request #133 from rabbitmq/rabbitmq-cli-129
...
Load command specific options from a single command
2016-12-03 11:32:44 +03:00
Michael Klishin
2c8c6dada1
More test cases
2016-12-03 11:26:36 +03:00
Michael Klishin
bb56ad8a56
Ditto
2016-12-03 11:10:24 +03:00
Michael Klishin
5cc7fdf28a
More test cases, wording
2016-12-03 11:01:35 +03:00
Daniil Fedotov
c62d48380a
Load command specific options from a single command
2016-11-30 16:51:59 +00:00
Arnaud Cogoluègnes
409f8e3b00
Use 1 RPC call to get running plugins
2016-11-30 17:19:13 +01:00
Arnaud Cogoluègnes
76d704cc24
Add test plugins EZ archives
2016-11-30 11:20:01 +01:00
Arnaud Cogoluègnes
3373930aa1
Fix plugins formatter test
...
Fixes #131
2016-11-30 10:43:15 +01:00
Arnaud Cogoluègnes
fd07c8b70b
Support several versions of plugins in directories
...
References #131
2016-11-29 17:33:41 +01:00
Arnaud Cogoluègnes
304ab703f4
Support multiple plugins directories
...
References #131
2016-11-29 15:26:57 +01:00
Michael Klishin
95d7d055f2
Merge pull request #130 from rabbitmq/rabbitmq-cli-123
...
Make `rabbitmqctl stop` support an optional pid file argument
2016-11-23 21:19:15 +03:00
Michael Klishin
94c21f4a40
Make `rabbitmqctl stop` support an optional pid file argument
...
While at it, move test/helpers_test.exs under test/core.
This slightly changes command output (mentions what file path is used
or what its contents are when we cannot parse it). We try hard
to not introduce any breaking changes compared to the 3.6.x CLI
tools but in this case it's an improvement.
Also, no one should depend on `rabbitmqctl stop` output, only UNIX
exit code, which did not change.
2016-11-23 21:11:01 +03:00
Arnaud Cogoluègnes
fc08e50e88
Merge branch 'master' into rabbitmq-cli-118
2016-11-23 09:21:56 +01:00
Daniil Fedotov
e3289ed454
Remove empty switches and aliases
2016-11-22 18:32:12 +00:00
Arnaud Cogoluègnes
887a09644b
Merge branch 'master' into rabbitmq-cli-118
2016-11-22 16:51:27 +01:00
Michael Klishin
266a4f664e
Make StopCommand#validate/2 accept a pidfile path
2016-11-22 17:23:19 +03:00
Michael Klishin
c59b6c029f
Make switches/0 and aliases/0 optional command callbacks
...
Fixes #120 . Same as #124 but doesn't include any unrelated changes
and thus suffer from #126 .
2016-11-22 16:11:25 +03:00
Michael Klishin
8aaeb75b12
Fix a merge revert conflict
2016-11-22 15:35:04 +03:00
Michael Klishin
e92022da11
Revert "Merge pull request #124 from rabbitmq/rabbitmq-cli-120"
...
This reverts commit c087a635c0
, reversing
changes made to 59225a551d
.
See https://github.com/rabbitmq/rabbitmq-cli/issues/126 , which exposed
a serious flaw in the option parser split which was introduced
as part of #124 .
Reopens #120 .
2016-11-22 14:07:58 +03:00
Daniil Fedotov
53f3c86840
Make it clear that invalid is not nil
2016-11-21 16:06:41 +00:00
Michael Klishin
313a90e6f4
Typos, wording
2016-11-21 05:14:53 -08:00
Daniil Fedotov
5607b92e32
Remove empty switches/0 and aliases/0 callbacks
2016-11-21 11:26:40 +00:00
Daniil Fedotov
461d914fb7
Test for command specific parsing
2016-11-21 11:17:32 +00:00
Daniil Fedotov
cc87a49f93
Make switches as aliases callbacks optional
2016-11-18 17:21:27 +00:00
Daniil Fedotov
59225a551d
Remove `flags/0` callback. Remove command modules helpers from helpers to command_modules
2016-11-18 14:12:53 +00:00
Arnaud Cogoluègnes
5e16943fe4
Add encode command
...
Catching up with rabbitmq/rabbitmq-server#979.
Fixes #118
2016-11-18 14:52:29 +01:00
Daniil Fedotov
e4ebdaabde
Make rabbit node resolve from environment variable by default
2016-11-17 14:16:00 +00:00
Michael Klishin
c6482eab3d
RabbitMQ server coerces tags to atoms now
2016-11-15 22:02:20 +03:00
Daniil Fedotov
ccb6bf116c
Namespace refactoring
2016-11-14 17:52:08 +00:00
Daniil Fedotov
31848069e2
Use RABBITMQ_NODENAME as default node
2016-11-11 11:12:09 +00:00
Daniil Fedotov
1dc8e90a70
Make tests happy
2016-11-10 17:40:43 +00:00
Arnaud Cogoluègnes
259a4e55f7
Switch JSON library to JSX
...
Part of rabbitmq/rabbitmq-common#46
2016-11-09 12:59:15 +01:00
Daniil Fedotov
9ebf876c9a
Do not require ENABLED_PLUGINS_FILE to run ctl, still print an error
2016-11-08 14:45:59 +00:00
Daniil Fedotov
b0f59ead31
Fix tests
2016-11-08 14:23:09 +00:00
Daniil Fedotov
ad90e60121
script name is overridable via argument
2016-11-08 14:21:31 +00:00
Daniil Fedotov
3e3d8f3f0b
Fix tests for plugins commands
2016-11-08 14:19:11 +00:00
Michael Klishin
23a5bc87d6
Cosmetics
2016-11-08 15:34:47 +03:00
Daniil Fedotov
4733765759
Better generic formatting. No tests for format_error
2016-11-08 10:11:07 +00:00
Michael Klishin
db194fb013
Merge branch 'master' into rabbitmq-cli-105
...
Conflicts:
test/forget_cluster_node_command_test.exs
test/rename_cluster_node_command_test.exs
2016-11-07 22:37:24 +03:00
Daniil Fedotov
837226430b
Coordinate environment with config module
2016-11-07 22:03:09 +03:00
Michael Klishin
3e623e02e9
Wording
2016-11-07 09:45:59 -08:00
Michael Klishin
b3113368a9
Correct a typo in test file name
2016-11-07 08:22:09 -08:00
Daniil Fedotov
97035a2c9c
Vhost limits test helpers
2016-11-07 15:09:01 +00:00
Daniil Fedotov
26a81d25b1
Vhost limits commands tests
2016-11-07 15:08:08 +00:00
Michael Klishin
9598ea67ad
Mix assumes test cases are .exs files
2016-11-07 07:06:47 -08:00
Daniil Fedotov
14d82eabdc
Refactor error reporting to allow commands specify formatter
2016-11-04 11:11:03 +00:00
Daniil Fedotov
cb3e54d8d8
Table formatter
2016-10-31 18:07:24 +00:00
Daniil Fedotov
54c858321d
ensure federation plugin is enabled when testing parameters
2016-09-08 13:39:31 +01:00
Michael Klishin
e1de90218c
Merge pull request #104 from rabbitmq/rabbitmq-cli-101
...
Operator policies commands
2016-09-08 15:35:56 +04:00
Daniil Fedotov
599cede1df
Convert error_string char list to string
2016-09-08 11:03:08 +01:00
Daniil Fedotov
3ac39162be
Operator policies commands
2016-09-08 11:02:21 +01:00
Michael Klishin
639a38a89c
Use rabbitmq_stomp instead of rabbitmq_metronome
...
The metronome plugin is an example and not supposed to be used
in production. It has certain assumptions that do not necessarily
hold when a test suite that messes with broker state is executed.
It therefore makes more sense to use rabbitmq_stomp or another
plugin that is commonly deployed in production systems.
Per discussion with @hairyhum.
2016-09-07 18:22:24 +03:00
Michael Klishin
11f6954fed
Squash a warning
2016-09-07 17:55:25 +03:00
Daniil Fedotov
5aed413ad8
Test stability. Enabling federation plugin when needed, do not stop distribution.
2016-09-07 13:28:06 +01:00
Daniil Fedotov
fe3e83ec50
Fixing some tests
2016-09-07 12:46:47 +01:00
Daniil Fedotov
41fd1588b3
Fix warnings in tests
2016-08-23 14:28:34 +01:00
Daniil Fedotov
a7fe88e74c
Example json formatter. Remove IO.puts from commands
2016-08-23 14:28:07 +01:00
Daniil Fedotov
57550182e1
Specific output tests
2016-08-22 15:05:17 +01:00
Daniil Fedotov
4c13a51ac8
Reworking command outputs
2016-08-22 12:58:37 +01:00
Daniil Fedotov
17c2fceb24
Expect help command to return list of strings
2016-08-19 12:06:26 +01:00
Daniil Fedotov
0da30bd1d1
Help command return list of strings instead of printing them\
2016-08-18 17:38:49 +01:00
Daniil Fedotov
35fc3d12cd
Default output formatting and exit code selection. Inspect printer
2016-08-18 15:35:49 +01:00
Andrew Bruce
107aacdf4b
Fix a copy+paste mistake
2016-08-15 14:21:33 +01:00
Andrew Bruce
541ad4249c
Fix merge_defaults implementations
...
...and don't default inside run methods.
Defaults must go on left-hand-side of `Map.merge`, or they'll clobber
user-defined settings.
Remove some unnecessary pattern matching.
Issue #92
[#127359637 ]
2016-08-15 14:21:15 +01:00
Michael Klishin
b57e8e16cc
Don't rely on rabbit_control_main; coerce node names to atoms
...
`rabbit_control_main` is going away due to the very existence of
these new CLI tools.
2016-08-12 04:46:26 +03:00
Michael Klishin
cb209d834d
Merge branch 'master' into rabbitmq-cli-rename-cluster-node-command
...
Conflicts:
lib/rabbitmqctl.ex
2016-08-12 04:36:51 +03:00
Michael Klishin
508a906bf9
Wording, add aliases to UpdateClusterNodesCommand
2016-08-12 02:34:43 +03:00
Michael Klishin
17773fcd1f
Merge branch 'master' into rabbitmq-cli-update-cluster-nodes
2016-08-12 01:56:12 +03:00
Michael Klishin
0e8ab49937
Brush up tests, support both "disc" and "disk"
...
as the current `rabbitmqctl` does.
2016-08-12 01:54:23 +03:00
Michael Klishin
0449004a6b
Merge branch 'master' into rabbitmq-cli-change-cluster-node-type
2016-08-12 01:04:01 +03:00
Michael Klishin
81ea222428
Fix CLI arguments parsing for policies, brush up tests
...
Policy commands now work on the CLI against an actual node.
2016-08-11 17:15:43 +03:00
Michael Klishin
e9ef2cff34
Merge branch 'master' into rabbitmq-cli-policies-commands
2016-08-11 13:58:11 +03:00
Michael Klishin
ad2b4627c7
Merge branch 'master' into rabbitmq-cli-9
...
Conflicts:
lib/rabbitmq/cli/ctl/parser.ex
lib/rabbitmqctl.ex
2016-08-11 11:52:54 +03:00
Michael Klishin
f540d0962a
Minor test improvements
2016-08-11 11:24:30 +03:00
Michael Klishin
ef2c06f0f4
Merge branch 'master' into rabbitmq-cli-force-boot-command
2016-08-11 11:12:59 +03:00
Michael Klishin
29c3bf3f43
Wording, cosmetics
2016-08-11 10:56:32 +03:00
Michael Klishin
cb03611e2a
Merge branch 'master' into rabbitmq-cli-78
2016-08-11 10:49:39 +03:00
Michael Klishin
f6861efbf4
Use equality operator in asserts where possible, wording
2016-08-11 10:41:38 +03:00
Michael Klishin
05db449187
Handle duplicates on plugin lists, be more defensive with defaults
...
Makes CLI invocations of `rabbitmq-plugins {enable, disable, list}`
mostly work.
2016-08-11 01:27:13 +03:00
Michael Klishin
529b802ed5
Make sure this test case is actually different from the one above
2016-08-10 23:23:58 +03:00
Michael Klishin
e4c3a26281
Typos
2016-08-10 19:24:21 +03:00
Michael Klishin
830b1d1382
Cosmetics, extract fn
2016-08-09 18:26:05 +03:00
Michael Klishin
31c3356c56
Use effective program name in help command output
...
Note that this solution is imperfect because
for tests the name of the tool is `mix`. But most
tests don't care.
2016-08-09 15:05:48 +03:00
Michael Klishin
14ff225719
Group rabbitmq-plugins command tests under test/plugins
...
Note yet moving the rest under test/ctl so that a bunch
of existing PRs merge cleanly.
2016-08-09 13:44:20 +03:00
Michael Klishin
379104fa94
Revert "Adapt to RabbitMQ master"
...
This reverts commit 53906c38e4
.
The original version was correct.
2016-08-08 22:27:10 +03:00
Michael Klishin
a06a4321d6
merge_defaults_defaults => merge_all_defaults
2016-08-08 21:46:47 +03:00
Michael Klishin
53906c38e4
Adapt to RabbitMQ master
2016-08-08 21:46:47 +03:00
Daniil Fedotov
ca98b02656
Implement policy management commands
2016-07-29 14:59:19 +01:00
Daniil Fedotov
006477d8e4
cleanup tests
2016-07-27 14:45:42 +01:00
Daniil Fedotov
f563001a71
cleanup test
2016-07-27 14:44:23 +01:00
Daniil Fedotov
a0c5af375b
Implement forget_cluster_node command
2016-07-27 14:41:02 +01:00
Daniil Fedotov
e89bf53357
Do not require rabbit as dependency
2016-07-27 12:27:27 +01:00
Daniil Fedotov
7b35c7c2cc
More validation, error handling and tests
2016-07-27 11:48:24 +01:00
Daniil Fedotov
cd68b3ce9c
Implement change_cluster_node_type command
2016-07-25 16:48:45 +01:00
Daniil Fedotov
12cbd50f10
Implement update_cluster_nodes command
2016-07-25 15:11:05 +01:00
Daniil Fedotov
0eee8e2446
Implement force_boot command
2016-07-25 14:01:41 +01:00
Daniil Fedotov
57c4a0fa69
Fix some tests
2016-07-25 14:00:55 +01:00
Daniil Fedotov
a84cd93d2e
Implement eval command
2016-07-22 17:17:15 +01:00
Michael Klishin
58708b6ac3
Merge branch 'master' into rabbitmq-cli-83
2016-07-15 23:54:48 +03:00
Michael Klishin
909a3b41fe
Adapt to recent server rabbit_health_check changes
2016-07-15 23:47:15 +03:00
Michael Klishin
09fc873a34
Improve a couple of error atoms
2016-07-10 19:47:27 +03:00
Michael Klishin
94440991c5
Merge branch 'master' into rabbitmq-cli-83
2016-07-10 12:09:19 +03:00
kjnilsson
744e3edf72
HelpersTest uses distribution and shouldn't be run concurrently
2016-07-06 11:23:25 +01:00
Daniil Fedotov
5b828c7e64
Tests for command modules
2016-06-23 12:33:39 +01:00
Daniil Fedotov
5c5f4d4414
Plugins command tests
2016-06-23 10:50:01 +01:00
Daniil Fedotov
eda1e7cac2
Tests for list plugins command
2016-06-23 10:50:01 +01:00
Daniil Fedotov
963f6a2ff9
tests for list plugins command
2016-06-23 10:50:01 +01:00
Daniil Fedotov
9baa5c1ebe
Load commands from load path. Specify scope in application config by file name
2016-06-23 10:50:01 +01:00
Daniil Fedotov
38d573ef94
Skip existing channels in list_channels test
2016-06-23 10:49:47 +01:00
Michael Klishin
bc5ff3bf26
Merge pull request #79 from rabbitmq/rabbitmq-cli-69
...
Purge queue command
2016-06-14 23:07:55 +03:00
Michael Klishin
2d68d42241
Assert that messages were purged; don't assume 0 messages were deleted
2016-06-14 23:04:27 +03:00
Michael Klishin
d77eb83c5f
A few Helpers.parse_node calls are no longer necessary
...
[Finish ##121221959]
2016-06-14 14:21:16 +03:00
Andrew Bruce
ec3a191515
Purge queue command
...
This initial version makes two RPC calls:
1. Gets the amqqueue resource
2. Makes the purge request using that resource
Issue #69
2016-06-14 10:31:47 +01:00
Michael Klishin
39b3de4d1e
Namespace commands, fixes #74
...
Note that the top level module is not namespaced. It's
not clear to me if it should be or will be end up using
and (Elixir/Mix) umbrella project anyway.
2016-06-10 02:54:22 +03:00
Michael Klishin
506c9cc43f
Normalize node names before passing them to Command.run/2
...
Fixes #76 .
2016-06-10 00:56:44 +03:00
Michael Klishin
39300fa5ca
Restore original cluster name
2016-06-09 15:29:51 +03:00
Michael Klishin
e95a085b3e
Merge branch 'master' into rabbitmq-cli-70
2016-06-09 15:19:46 +03:00
Andrew Bruce
7730539bc1
set_cluster_name
...
- Shows up in help
- Validates args a bit
- Has no defaults
Issue #70
[#116551629 ]
2016-06-09 11:29:27 +01:00
Michael Klishin
d59e0fa444
Merge branch 'master' into rabbitmq-cli-67
2016-06-09 04:13:48 +03:00
Michael Klishin
d27469c665
RabbitMQ.CLI.RabbitMQCtl => RabbitMQ.CLI.Ctl, references #74
2016-06-09 04:08:21 +03:00
Michael Klishin
4e31f4c627
More renaming, references #74
2016-06-09 04:00:43 +03:00
Michael Klishin
8fcad8338e
Namespace more modules under RabbitMQ.CLI, part of #74
2016-06-09 03:34:56 +03:00
Michael Klishin
ddf191dea9
Adapt to master
2016-06-09 02:26:52 +03:00
Michael Klishin
89a3cd954c
Merge branch 'master' into rabbitmq-cli-67
2016-06-09 02:23:53 +03:00
Michael Klishin
0c35f5a8cd
Move start_distribution into RabbitMQ.CLI.Distribution
2016-06-09 02:23:10 +03:00
Daniil Fedotov
091105e5b0
0 arity start_distribution
2016-06-08 17:04:08 +01:00
Daniil Fedotov
9b703b2896
Dynamically select distribution node
2016-06-08 15:19:37 +01:00
Michael Klishin
34961e7fed
Implement sync_queue and cancel_sync_queue commands
...
Happy path tests need a multi-node testing framework.
2016-06-08 03:32:41 +03:00
Jean-Sébastien Pédron
1b1534f86b
Implement the `join_cluster` command
...
Compared to the Erlang-based rabbitmqctl's command, this one accepts
`--disc` to specify the node type. In the implementation, it does
nothing because that's the default value already. It is only to improve
consistency, because there is a `--ram` flag.
The testsuite for this command is incomplete in this commit. When a
testcase will be able to start and stop multiple nodes, the testsuite
will need to be completed.
[#116551629 ]
2016-06-06 16:06:52 +02:00
kjnilsson
e5c35c2939
merge
2016-06-02 16:09:56 +01:00