Commit Graph

847 Commits

Author SHA1 Message Date
Michael Klishin bda0cbfdc3 Update test expectation
References #425, rabbitmq/rabbitmq-server#2363
2020-06-08 05:03:55 +03:00
Michael Klishin 3003b9e615 Introduce 'rabbitmq-diagnostics list_network_interfaces'
To make it easier to discover them without using eval and
obscure functions.

Part of rabbitmq/rabbitmq-cli#424
2020-06-05 17:16:10 +03:00
Michael Klishin 92bb8dee18 Cosmetics 2020-06-04 04:42:49 +03:00
Michael Klishin 2bd6c95375 Rely on rabbit_env to infer node name
During the 3.8.4 cycle we have backported `rabbit_env` to v3.8.x.
Instead of messing with env variable prefixing, it tries both
RABBITMQ_{VAR} and {VAR} environment variables. However,
in CLI tools node name currently only picks up RABBITMQ_NODENAME,
so environments where node name has to be explicitly configured
via rabbitmq-env.conf:

NODENAME=rabbit@our.custom.hostname

would not pick this node name up. RABBITMQ_NODENAME had to be added
as a workaround.

With this change the behavior of CLI tools and the server is closer.

Note that this updates a few places which used `Config.get_option/2`
to get a "default node name" which more often than not ended up
being a node prefix ("rabbit"). Those tests had to be updated
to use `Config.default/1`.

Closes #421.
References c8e766dec7, 8a5ab87038.
2020-05-28 02:54:33 +03:00
Michael Klishin 61a927ffb6 Brush up encode and decode commands 2020-05-21 09:37:08 +03:00
Michael Klishin bc95259d29 Adapt one more test 2020-05-21 08:13:46 +03:00
Luke Bakken a4669adf94 Update for version 2 of credentials-obfuscation
Part of rabbitmq/credentials-obfuscation#5
2020-05-20 18:54:40 -07:00
Michael Klishin 56da1bb71e Update test assertion expectations 2020-05-19 06:59:03 +03:00
Michael Klishin 0ff2e3fb77 Explain 2020-05-16 19:12:31 +03:00
Michael Klishin a2ec22023f Handle variable case in this test 2020-05-16 00:39:07 +03:00
Michael Klishin 0537a9ca36 Don't depend on a single env variable in this test 2020-05-16 00:36:33 +03:00
Michael Klishin 947940ccd5 Introduce 'rabbitmq-diagnostics os_env'
It prints RabbitMQ-specific environment variables that
are set on the target node. Can be used to inspect env variable-based
configuration without access to the target host.
2020-05-06 23:19:04 +03:00
Michael Klishin ab1c80062d Introduce 'rabbitmq-upgrade await_online_synchronized_mirror'
Similar in purpose to await_online_quorum_plus_one but
for classic mirrored queues.

Part of rabbitmq/rabbitmq-cli#408
2020-04-22 03:12:32 +03:00
Michael Klishin d99cdd04f5 Introduce rabbitmq-upgrade await_online_quorum_plus_one
The readiness is similar to that of 'rabbitmq-diagnostics check_if_node_is_quorum_critical'
but this command awaits for it up to --timeout seconds.

While at it, refactor DefautOutput to detect and support JSON formatting
of most basic return values suc has :ok or {:error, map}.

Part of #408.
2020-04-22 01:25:55 +03:00
Michael Klishin d54876be57 Drive by change: correct a typo 2020-04-22 01:23:50 +03:00
Michael Klishin a3d60d35c5 Be less generous in empty whitespace use in setup_all functions 2020-03-24 19:08:00 +03:00
Michael Klishin 58b404650a WaitCommandTest: make sure distribution is started before used 2020-03-24 17:49:42 +03:00
Michael Klishin 2f5a182a68 TestHelper.await_rabbitmq_startup/0: introduce retries 2020-03-24 17:49:22 +03:00
Jean-Sébastien Pédron 0e15591bf5 Update copyright (year 2020) 2020-03-10 15:39:56 +01:00
Jean-Sébastien Pédron 4e6e87b9fc Update mock_rabbitmq_plugin_for_3_8 to support RabbitMQ 3.9.x 2020-03-06 08:19:31 +01:00
Michael Klishin 5b7063d07d More sensible JSON formatting for some commands
Fall back to a JSON document if command returns a bitstring
(does not do any preformatting for JSON).

Per discussion with @lukebakken

Closes #394.
2020-01-18 02:06:04 +03:00
Jean-Sébastien Pédron cccf81d0ff test/fixtures: Fix mock plugins' dependencies
They should depend on `rabbit`, not on `rabbit_common`.

This will be even required #rabbitmq/rabbitmq-server#2212 is accepted.
2020-01-16 14:39:47 +01:00
Michael Klishin 73776fbf04 (c) bump 2019-12-29 05:50:26 +03:00
Michael Klishin 7158eec954 Introduce rabbitmq-queues check_if_node_is_mirror_sync_critical
Part two of #389.
2019-12-19 03:59:30 +03:00
Michael Klishin b5c47be4e6 Tests for the CLI part of rabbitmq-queues check_if_node_is_quorum_critical
Key tests for the target function are in the server repo.
2019-12-12 17:11:52 +03:00
Michael Klishin c49eb2fafc A typo 2019-12-12 16:55:59 +03:00
Jean-Sébastien Pédron 8a5ab87038 Load `rabbit_env` context to know about node configuration
The context is either initialized from the CLI's process environment or
from the remote node's own context.

This is required to e.g. find plugins or Mnesia directory.

In `code_path`, we don't append `ebin` anymore to the code path because
the `rabbit` application is now packaged as an .ez archive like plugins.
This simplifies the overall layout of the project.
2019-12-11 15:08:00 +01:00
Michael Klishin 01e950fd18 Make tests that mess with node or quorum state sequential
As most tests already are. It's highly unlikely that these
were meant to execute in parallel by design.
2019-12-11 14:51:10 +01:00
Michael Klishin 8b7c83bf6e Rename a test file 2019-12-11 04:56:04 +03:00
Michael Klishin b49b639add ctl export_definitions: fail validation w/o positional args 2019-11-19 00:41:30 +03:00
Michael Klishin 7c5933052e Finish ctl import_definitions 2019-11-16 06:46:26 +03:00
Michael Klishin 7c0718800f Introduce rabbitmqctl export_definitions [path] 2019-11-15 02:20:02 +03:00
Michael Klishin 99e9b0b2b6 Simplify these assertions a bit 2019-10-08 09:41:31 -05:00
Michael Klishin 7b1bf6c734 Squash a warning 2019-10-08 09:41:17 -05:00
Arnaud Cogoluègnes f0bba26e8c Add test for certificate expiration verification
References #304, #305
2019-10-08 16:10:04 +02:00
Michael Klishin c7e60774d0 Minor Prometheus listener description edits 2019-09-26 13:05:32 +03:00
Michael Klishin 254fe20453 Move quorum_status to rabbitmq-queues, add basic tests 2019-09-26 08:16:33 +03:00
Arnaud Cogoluègnes 67a38fc2e9 Handle empty output in JSON stream
Some streaming commands with a duration argument can send the empty
string as the output (along with a finishing marker). This case was not
handled properly and would result in a stack trace when the command
returned once the duration has elapsed.
2019-09-25 16:56:47 +02:00
Jean-Sébastien Pédron 0cb95e7b55 log_tail_stream_command_test: Bump stream duration to 15 seconds
... from 5 seconds. Hopefully this will increase the chance of seeing
the messages logged by the testcase.
2019-09-24 11:48:47 +02:00
Michael Klishin 5a137480b3 Merge pull request #378 from rabbitmq/consume-events-command
Consume event command
2019-09-24 01:55:57 +03:00
Michael Klishin 99f1790ac3 Update test expectations 2019-09-24 01:52:31 +03:00
Michael Klishin 4c33ce0961 Move command_line_arguments to rabbitmq-diagnostics 2019-09-24 00:54:11 +03:00
dcorbacho b5e5d0a274 Command line arguments command
* Reports the command line flags returned by `init:get_arguments()`

[#159699409]
2019-09-23 20:07:33 +01:00
dcorbacho 15d7eb2858 Diagnostics: test consume_event_stream_command
[#168224266]
2019-09-23 17:19:07 +01:00
Michael Klishin 6193023a18 Merge pull request #375 from rabbitmq/post-upgrade-command
Post upgrade command
2019-09-22 08:32:30 +03:00
Michael Klishin ccc7ebbafc rabbitmq-upgrade: basic tests for post_upgrade, polishing 2019-09-22 08:31:20 +03:00
Whitespirit0 ea2ace438c Update set_parameter test to match new output 2019-09-20 11:41:33 +02:00
Michael Klishin 4505b9a85f ctl add_vhost: suggest a comma-separated list of tags
For consistency with user tags.
2019-08-15 15:52:09 +10:00
Michael Klishin 2c6f5a1146 ctl add_vhost: make it possible to provide a description 2019-08-15 15:42:06 +10:00
Michael Klishin 5b1086156e diagnostics log_tail_stream: remove a fragile test
It makes a lot of assumptions about Lager's log flush
timing and can be tripped by the peak rate protection
mechanism. This test module has a high rate of false
positives on Concourse.

There is another test that asserts over a "folded" stream, so
code coverage is kept about the same.
2019-08-11 13:20:19 +10:00
Michael Klishin d84340959b Make sure the app is started in these tests 2019-07-18 18:50:43 +03:00
Michael Klishin 37450cc0dc Drop --[no-]interactive support
Per discussion with @lukebakken.

It serves no purpose and to make scripting with stream
redirection work we had to make validation changes that make
that flag irrelevant and even confusing.

The only downside of this behavior is that something like

rabbitmqctl add_user --silent "a-username"

(without a password or redirected stream, with suppressed output)
would "hang" waiting for stdin input. If --silent is omitted
there would be an input prompt, making it clearer what's going on.

Closes #365 with a different behavior from the originally suggested.
2019-07-10 19:08:19 -07:00
Michael Klishin b890fe787b Ditto for ctl change_password
Part of #365.
2019-07-11 00:21:11 +03:00
Michael Klishin 865af70a98 ctl add_user: make password optional, accept it via stdin
Part of #365.
2019-07-10 23:27:29 +03:00
Michael Klishin 358aec5840 ctl authenticate_user: make password optional, accept it via stdin
Part of #365.
2019-07-10 02:17:12 +03:00
Michael Klishin b8acce6a85 Squash a compile warning
(cherry picked from commit 2a8fd5c1b2eae73f936991b17dfaa6fbd0fdbf85)
2019-07-08 03:23:55 +03:00
Michael Klishin 462b480f16 Same as d3c01b3a1f1a65d1d935c3e6e0441388da44ba57 in more places
(cherry picked from commit 68c8d204c08eb9956925e0fb71608a0737f3e771)
2019-07-06 20:31:43 +03:00
Michael Klishin 535f00e08f Let Lager's log message rate lapse before logging in these tests
Otherwise some log messages we assert on might be dropped.

(cherry picked from commit d3c01b3a1f1a65d1d935c3e6e0441388da44ba57)
2019-07-06 18:47:11 +03:00
Michael Klishin 1f07517c96 Wording 2019-07-06 18:08:05 +03:00
Michael Klishin 4f179948ad Cosmetics 2019-07-06 18:07:28 +03:00
Michael Klishin fe1e95a28c Wording 2019-07-06 17:59:49 +03:00
Michael Klishin 7de3958482 Await log update in this test 2019-07-06 17:57:54 +03:00
Michael Klishin ff051eec63 Test expectation update 2019-07-06 17:39:49 +03:00
Michael Klishin e50489eba7 Display 50 lines by default; cosmetics 2019-07-06 13:47:39 +03:00
Michael Klishin 435670c083 Update test expectations 2019-07-04 18:57:40 +02:00
Daniil Fedotov 78cc33420e Log commands tests 2019-06-27 13:46:08 -04:00
Michael Klishin 0ab7e36893 These two annotations are not used 2019-06-13 15:40:49 +03:00
Diana Corbacho f9bf3154a9 Command to log schema information
Logs by default name, cookie, active_replicas and user_properties
Any other mnesia property can be requested as info key

[#164550205]
2019-06-13 13:08:29 +01:00
Michael Klishin 54898185c5 Update test assertions 2019-05-29 14:03:08 +01:00
Michael Klishin dde11237e4 Basic tests for Diagnostics.CheckVirtualHostsCommand 2019-05-29 13:58:29 +01:00
Jean-Sébastien Pédron 5b6b9a7a69 test: Increase some timeouts so the testsuite passes on slow VMs 2019-05-14 17:51:42 +02:00
Michael Klishin 8ddd777c84 Re-enable a Diagnostics.ObserverCommand test 2019-05-11 11:07:53 +03:00
Michael Klishin e840b5a6a4 Basic tests for Diagnostics.ObserverCommand 2019-05-11 00:22:29 +03:00
Jean-Sébastien Pédron 2c03dc56c2 test/ctl/*feature_flags*: Use arbitrary feature flags, not `quorum_queue`
This allows to backport the test to v3.7.x.
2019-05-06 15:37:40 +02:00
Michael Klishin a61357b7e4 Cosmetics 2019-04-29 00:57:55 +03:00
Michael Klishin af32abbcd9 Merge pull request #351 from rabbitmq/rabbitmq-cli-345
Improve error reporting for invalid node names
2019-04-26 16:38:08 +03:00
Michael Klishin 8e7a02ff81 Naming 2019-04-25 20:13:39 +03:00
Michael Klishin 4cb2d05c9c Improve error reporting of invalid node names
While at it, format errors thrown in a few more risky
code paths.

Closes #345.
2019-04-25 17:15:25 +03:00
Michael Klishin ab5143e7df diagnostics erlang_version: support --offline
Closes #315.
2019-04-25 15:01:18 +03:00
Michael Klishin 3d5281508b Merge pull request #347 from rabbitmq/rabbitmq-cli-342
Add a flag to cipher_suites command to get all ciphers. Add --format flag to select format. Remove openssl_format flag
2019-04-25 04:19:42 +03:00
Michael Klishin 50f4d42fac Wording 2019-04-25 04:17:06 +03:00
Daniil Fedotov a74f8b930e Replace multiple format flags with a single `--format` flag. 2019-04-24 17:22:54 -04:00
Daniil Fedotov b53a16681a Add more flags to cipher_suites command to return all available suites and more formats.
Support new map format for cipher suites added in OTP-20.3
Support --all flag to get all available ciphers

Addresses #342
Depends on changes in rabbitmq-server
2019-04-24 15:37:28 -04:00
Michael Klishin d01b25574c Upgrade to amqp ~> 1.2, start amqp app before connecting 2019-04-24 22:37:05 +03:00
Michael Klishin 3bdfae0392 Give queue proceess and client some time to boot before consuming in slower CI environments 2019-04-24 22:09:44 +03:00
Michael Klishin d926bc26b8 enable_feature_flag: handle cases where target node does not support the flag
or any flags.

[#163980302]
2019-04-20 02:44:22 +03:00
Michael Klishin 81b84244af One more JSON formatting test case 2019-04-19 05:19:46 +03:00
Michael Klishin 95a7d37f1a New integration suite: JSON formatter 2019-04-19 05:17:28 +03:00
Michael Klishin 11774a3ff1 cluster_status: list RabbitMQ and Erlang versions
Per suggestion from @gerhard.
2019-04-19 05:17:12 +03:00
Michael Klishin 11f0b45732 cluster_status: rework output format, support JSON formatter
[#165435068]
2019-04-18 04:00:05 +04:00
Michael Klishin 69b5784410 Reset an unintionally lowered timeout in this test 2019-04-12 04:12:50 +04:00
Michael Klishin 45b48f2f04 Merge branch 'master' into rabbitmq-cli-340 2019-04-12 02:30:39 +04:00
Michael Klishin 66d6cf1173 Update :badrpc test cases to be more resilient (part 2)
On some networks the response is a timeout, not a nodedown. That's
acceptable for this test.
2019-04-12 02:27:15 +04:00
Michael Klishin 60fc0ee25c Update helper tests
(cherry picked from commit dd022e3be2)
2019-04-12 01:45:09 +04:00
Michael Klishin 796c973a1c Extract Core.Memory from Core.Helpers
In preparation for #340.

(cherry picked from commit 990e38a245)
2019-04-12 01:44:58 +04:00
Michael Klishin 001087d945 Update :badrpc test cases to be more resilient
On some networks the response is a timeout, not a nodedown. That's
acceptable for this test.
2019-04-12 01:43:54 +04:00
Michael Klishin dd022e3be2 Update helper tests 2019-04-12 01:43:36 +04:00
Michael Klishin 990e38a245 Extract Core.Memory from Core.Helpers
In preparation for #340.
2019-04-11 22:09:16 +04:00
Michael Klishin b7932ab6d4 Extract Core.Alarms and Core.Listeners from Diagnostics.Helpers 2019-04-11 01:38:20 +03:00
Michael Klishin 9cb776c98e Squash a warning 2019-04-10 15:22:38 +03:00
Michael Klishin d2549de22e Extract several modules from RabbitMQ.CLI.Core.Helpers
In preparation to changing status command output for 3.8
2019-04-10 13:31:38 +03:00
Michael Klishin d89feb4dec close_all_connections test: reduce duplication 2019-04-10 13:30:44 +03:00
Michael Klishin ed4a1fe5f4 Squash a warning 2019-04-09 15:07:01 +04:00
Michael Klishin 7ec98d5924 Extra tests that helped narrow #339 down 2019-04-09 14:37:00 +04:00
Michael Klishin ae4aca3364 One more test 2019-04-08 22:13:04 +04:00
Michael Klishin 03d2e921d9 Update assertions for #336 2019-04-08 21:33:45 +04:00
Michael Klishin 94f47ee51c ctl close_all_connections command test suite improvements
Use more but shorter retries when asserting on connection lists.

Discovered when investigating rabbitmq/rabbitmq-server#1971.
2019-04-08 15:18:27 +04:00
Michael Klishin 5685e4c7c9 rabbitmq-plugins formatter: don't print legend if --silent or --quiet is used 2019-04-01 14:56:40 +03:00
Michael Klishin 93dbbf342e Rework how command-specific options are displayed in help
Per recommendation from @dumbbell.
usage_addition/0 return format per discussion
with @dcorbacho, @hairyhum, @lukebakken.
2019-03-26 01:21:22 +03:00
Spring Operator 0a2541afd3 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# HTTP URLs that Could Not Be Fixed
These URLs were unable to be fixed. Please review them to see if they can be manually resolved.

* http://blog.listincomprehension.com/search/label/procket (200) with 1 occurrences could not be migrated:
   ([https](https://blog.listincomprehension.com/search/label/procket) result ClosedChannelException).
* http://dozzie.jarowit.net/trac/wiki/TOML (200) with 1 occurrences could not be migrated:
   ([https](https://dozzie.jarowit.net/trac/wiki/TOML) result SSLHandshakeException).
* http://dozzie.jarowit.net/trac/wiki/subproc (200) with 1 occurrences could not be migrated:
   ([https](https://dozzie.jarowit.net/trac/wiki/subproc) result SSLHandshakeException).
* http://e2project.org (200) with 1 occurrences could not be migrated:
   ([https](https://e2project.org) result AnnotatedConnectException).
* http://erlang.org/doc/reference_manual/distributed.html (200) with 1 occurrences could not be migrated:
   ([https](https://erlang.org/doc/reference_manual/distributed.html) result ConnectTimeoutException).
* http://nitrogenproject.com/ (200) with 2 occurrences could not be migrated:
   ([https](https://nitrogenproject.com/) result ConnectTimeoutException).
* http://proper.softlab.ntua.gr (200) with 1 occurrences could not be migrated:
   ([https](https://proper.softlab.ntua.gr) result SSLHandshakeException).
* http://yaws.hyber.org (200) with 1 occurrences could not be migrated:
   ([https](https://yaws.hyber.org) result AnnotatedConnectException).
* http://choven.ca (503) with 1 occurrences could not be migrated:
   ([https](https://choven.ca) result ConnectTimeoutException).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* http://fixprotocol.org/ (301) with 1 occurrences migrated to:
  https://fixtrading.org ([https](https://fixprotocol.org/) result SSLHandshakeException).
* http://erldb.org (UnknownHostException) with 1 occurrences migrated to:
  https://erldb.org ([https](https://erldb.org) result UnknownHostException).
* http://elixir-lang.org/docs/stable/elixir/OptionParser.html (301) with 1 occurrences migrated to:
  https://elixir-lang.org/docs/stable/elixir/OptionParser.html ([https](https://elixir-lang.org/docs/stable/elixir/OptionParser.html) result 404).
* http://elixir-lang.org/docs/stable/elixir/Stream.html (301) with 1 occurrences migrated to:
  https://elixir-lang.org/docs/stable/elixir/Stream.html ([https](https://elixir-lang.org/docs/stable/elixir/Stream.html) result 404).

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://cloudi.org/ with 27 occurrences migrated to:
  https://cloudi.org/ ([https](https://cloudi.org/) result 200).
* http://elixir-lang.org with 1 occurrences migrated to:
  https://elixir-lang.org ([https](https://elixir-lang.org) result 200).
* http://elixir-lang.org/ with 2 occurrences migrated to:
  https://elixir-lang.org/ ([https](https://elixir-lang.org/) result 200).
* http://elixir-lang.org/getting-started/typespecs-and-behaviours.html with 1 occurrences migrated to:
  https://elixir-lang.org/getting-started/typespecs-and-behaviours.html ([https](https://elixir-lang.org/getting-started/typespecs-and-behaviours.html) result 200).
* http://elixir-lang.org/install.html with 1 occurrences migrated to:
  https://elixir-lang.org/install.html ([https](https://elixir-lang.org/install.html) result 200).
* http://erlware.org/ with 1 occurrences migrated to:
  https://erlware.org/ ([https](https://erlware.org/) result 200).
* http://inaka.github.io/cowboy-trails/ with 1 occurrences migrated to:
  https://inaka.github.io/cowboy-trails/ ([https](https://inaka.github.io/cowboy-trails/) result 200).
* http://ninenines.eu with 6 occurrences migrated to:
  https://ninenines.eu ([https](https://ninenines.eu) result 200).
* http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html with 1 occurrences migrated to:
  https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html ([https](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) result 200).
* http://www.actordb.com/ with 2 occurrences migrated to:
  https://www.actordb.com/ ([https](https://www.actordb.com/) result 200).
* http://www.cs.kent.ac.uk/projects/wrangler/Home.html with 1 occurrences migrated to:
  https://www.cs.kent.ac.uk/projects/wrangler/Home.html ([https](https://www.cs.kent.ac.uk/projects/wrangler/Home.html) result 200).
* http://www.rebar3.org with 1 occurrences migrated to:
  https://www.rebar3.org ([https](https://www.rebar3.org) result 200).
* http://contributor-covenant.org with 1 occurrences migrated to:
  https://contributor-covenant.org ([https](https://contributor-covenant.org) result 301).
* http://contributor-covenant.org/version/1/3/0/ with 1 occurrences migrated to:
  https://contributor-covenant.org/version/1/3/0/ ([https](https://contributor-covenant.org/version/1/3/0/) result 301).
* http://inaka.github.com/apns4erl with 1 occurrences migrated to:
  https://inaka.github.com/apns4erl ([https](https://inaka.github.com/apns4erl) result 301).
* http://inaka.github.com/edis/ with 1 occurrences migrated to:
  https://inaka.github.com/edis/ ([https](https://inaka.github.com/edis/) result 301).
* http://lasp-lang.org/ with 1 occurrences migrated to:
  https://lasp-lang.org/ ([https](https://lasp-lang.org/) result 301).
* http://rabbitmq.com/documentation.html with 1 occurrences migrated to:
  https://rabbitmq.com/documentation.html ([https](https://rabbitmq.com/documentation.html) result 301).
* http://saleyn.github.com/erlexec with 1 occurrences migrated to:
  https://saleyn.github.com/erlexec ([https](https://saleyn.github.com/erlexec) result 301).
* http://www.mozilla.org/MPL/ with 290 occurrences migrated to:
  https://www.mozilla.org/MPL/ ([https](https://www.mozilla.org/MPL/) result 301).
* http://zhongwencool.github.io/observer_cli with 1 occurrences migrated to:
  https://zhongwencool.github.io/observer_cli ([https](https://zhongwencool.github.io/observer_cli) result 301).
2019-03-20 03:13:07 -05:00
Michael Klishin f6bb9487ef Info item arg processing test: handle multi-line return values 2019-03-18 07:47:46 +03:00
Michael Klishin b5d39b2a2f Handle info keys that are strings
Some commands define them as atoms, others
as strings.
2019-03-17 14:01:04 +03:00
Michael Klishin bea9cf4486 Rework command-specific help
* Display command-specific options first instead of
  generic at the top
* Include one line command synopsis from --list-commands
  in the command-specific message
* List timeout in a separate section. It doesn't
  integrate very well with either command-specific
  or general section
* Format section headings as H2s in Markdown, this makes them stand out
* Assorted small formatting changes
* Update tests to be less fragile to copywriting changes
2019-03-17 13:54:18 +03:00
Michael Klishin 7f6ef260da ctl shutdown: consider @localhost nodes to be local
Without this -n has to be used when it previously wasn't required.

Follow-up to #328, references #327, #309.

Per discussion with @lukebakken.
2019-03-07 01:29:23 +03:00
Michael Klishin c339b6a10c ctl shutdown: infer hostnames from node names
inet_db is not a very reliable source as it doesn't take
node name CLI arguments and ERL_INETRC file settings.
That can lead to false positives in environments where
inet_db returns the same value (e.g. `localhost`) for
every cluster member.

Per discussion with @gerhard.

Closes #327.
References #309.
2019-03-06 20:19:52 +03:00
Josh Soref fd4e361f43 spelling: unrecognised 2019-02-24 02:10:56 -05:00
Josh Soref 8f5cb9d9aa spelling: success 2019-02-24 02:06:39 -05:00
Josh Soref f1333cfa00 spelling: providing 2019-02-24 02:04:05 -05:00
Josh Soref 0ef7adafe7 spelling: mysterious 2019-02-24 02:01:00 -05:00
Josh Soref 335427bfe3 spelling: inaccessible 2019-02-24 02:10:14 -05:00
Josh Soref ecabb4e763 spelling: exchange 2019-02-13 00:20:24 -05:00
Josh Soref ce893da54c spelling: already 2019-02-13 00:17:15 -05:00
Michael Klishin ea6294be41 New command: `rabbitmqctl force_gc`
Developed as part of a live coding training session but can be
useful in practice, so let's keep it.

Per discussion with @hairyhum.
2019-02-21 19:11:30 +03:00
Michael Klishin 12f8debdc6 Update help command tests for the new grouped output 2019-02-21 16:35:21 +03:00
Michael Klishin b4d2ab6fe0 Return a human-friendly validation error 2019-02-21 00:35:23 +03:00
kjnilsson a56f9cae61 rabbitmq-queues: add --errors-only to grow command
For consistency with shrink

[#162782801]
2019-02-20 17:28:26 +00:00
kjnilsson 67dfe2dfa8 add rabbitmq-queues grow command tests 2019-02-20 13:47:58 +00:00
Michael Klishin 5d15f28869 Feature flag tests belong under test/ctl 2019-02-20 13:31:15 +00:00
Michael Klishin 581cd2dc25 Add tests for rabbitmq-queues commands 2019-02-20 13:30:00 +00:00
Michael Klishin 29b66976f9 version command test: remove an environment-specific test
`rabbit_misc:version/0` requires rabbit.app to be on code path
and loaded which is not always the case on the test node.

The command is so simple that this doesn't introduce enough risk
to justify spending more time on it.
2019-02-20 13:29:59 +00:00
Michael Klishin da1d4d85fb Return :ok from setup_all 2019-02-20 13:29:59 +00:00
Michael Klishin f7a74c4183 Squash a couple of test warnings 2019-02-20 13:29:59 +00:00
Michael Klishin ddf6841f2f New command: version, closes #314 2019-02-20 13:29:59 +00:00
Michael Klishin 9231b21305 Follow-up to #298: descriptions and aliases for TLS-enabled listeners 2019-02-12 14:14:54 +03:00
Luke Bakken 95e5b78af6 Output a friendly error if a long node name is used but --longnames not specified 2019-02-05 08:56:04 -08:00
Luke Bakken 962e0cf7c7 Ensure longnames option is passed to normalise_node
Fixes #311
2019-02-05 07:27:34 -08:00
Arnaud Cogoluègnes 97c048cf37 Add active consumer fields if necessary
When calling node is 3.8 and one of the nodes is < 3.8, active and
activity status fields need to be set with default values.

[#163298456]
2019-02-05 15:06:51 +01:00
Michael Klishin 041a6c2bdf Reuse existing modules more, rearrange functions 2019-02-04 02:22:21 +03:00
Michael Klishin e11e7d1885 shutdown: add a test for 56ac8d1cf7
References #309.
2019-02-03 22:10:22 +03:00
Michael Klishin 7ad9176435 Further improvements to the shutdown command
Add --[no-]wait (enabled by default) for those who would prefer
to use it to shut down remote nodes even though it wouldn't wait for
a verified node termination.

Propagate --timeout to calls.

References #309.
2019-02-03 20:40:01 +03:00
Michael Klishin 92851c4f88 Test modules should be named *_test.exs 2019-02-03 05:12:23 +03:00
Michael Klishin 2ad334c91f Refactor 2019-02-03 04:55:37 +03:00
Jean-Sébastien Pédron 95f5b85498 forget_cluster_node_command_test: Set `feature_flags_file` config
... by querying the node for the actual value.

[#160169569]
2019-02-02 12:09:10 +01:00
Daniil Fedotov 8bf5e81926 Merge pull request #308 from rabbitmq/rabbitmqctl-cli-307
Support bare --help
2019-02-01 21:43:17 +04:00
Luke Bakken 9b01b1cf3c Add `list_feature_flags` and `enable_feature_flag` commands
As their name suggests, they are used to manage the feature flags of
RabbitMQ and its plugins.

[#159298729]
2019-02-01 17:51:21 +01:00
Michael Klishin 0053f67485 Support bare --help
Note that there's a different between the case with no arguments
(exits with EX_USAGE) and --help (exits successfully).

Per discussion with the team.

Closes #307.
2019-02-01 19:47:09 +03:00
Daniil Fedotov 5e5f4d461c Make it possible to get command help by typing 'rabbitmqctl mycommand --help'
Add a new default switch `help`
Add an alias `?`

Make rabbitmqctl display command help if this option is true for known commands.
2019-01-30 16:47:18 -05:00
Michael Klishin 724dbca331 Merge pull request #303 from rabbitmq/await_startup_with_a_timeout
New command: `rabbitmqctl await_startup`
2019-01-28 21:06:41 +03:00
Michael Klishin 5fad316390 New command: `rabbitmqctl await_startup`
Like `rabbitmqctl wait` but doesn't use a pid file path.

Pair: @gerhard.

References rabbitmq/rabbitmq-server#1848.
2019-01-28 20:45:08 +03:00
Michael Klishin badbc59dc9 Drive-by change: remove a TODO
Currently integration tests do not start
or stop the runtime (only the RabbitMQ app on it),
and it will likely remain the case for a while.
2019-01-28 17:05:01 +03:00