Commit Graph

45 Commits

Author SHA1 Message Date
Michael Klishin 8c6b3bfbc6
CLI: continue reworking assertions on plugin state 2022-11-02 13:08:44 +04:00
Michael Klishin e1d14bac2d
Reset enabled plugins after each test that enables any 2022-11-02 13:08:44 +04:00
Simon Unge 917bf55e19
See Issue 6020. Take plugin dependency into account 2022-11-02 13:08:44 +04:00
Ayanda Dube 4cbbaad2df mix format rabbitmq_cli 2022-10-02 18:54:11 +01:00
Philip Kuryloski 7e17a47557 Update rabbitmq_cli mock test plugin for 3.10.x 2021-06-15 11:29:57 +02:00
dcorbacho 679ca254f3 Switch to Mozilla Public License 2.0 (MPL 2.0) 2020-07-11 19:23:07 +01:00
Jean-Sébastien Pédron 0e15591bf5 Update copyright (year 2020) 2020-03-10 15:39:56 +01:00
Michael Klishin 73776fbf04 (c) bump 2019-12-29 05:50:26 +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
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
Josh Soref 335427bfe3 spelling: inaccessible 2019-02-24 02:10:14 -05:00
Michael Klishin 3f9c982d44 Standardize on :not_enough_args
That's what most commands use and the execution pipeline
expects.
2019-01-23 15:20:24 +03:00
Michael Klishin df39f2ccd1 Update (c) year in tests 2019-01-21 11:15:48 +03:00
Michael Klishin ac653965f4 Improve error message formatting for rabbitmq-plugins commands
There are two main types of errors that I see in practice:

 * Insufficient enabled plugins file permission (or the file does not exist)
 * Enabled plugins file used by CLI tools does not match that of
   the target node

[#162757498]
2018-12-19 15:54:23 +03: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
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 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 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 2e64c90913 rabbitmq-plugins enable: switch to validate_execution_environment/2 2017-08-07 16:04:30 +03: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
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 2a9c24af2c Merge branch 'master' into rabbitmq-server-release-12 2017-01-27 18:33:19 +03:00
Daniil Fedotov 0e13568ec3 Move plugin validation from `validate` to `run` 2017-01-27 14:55:09 +00:00
Daniil Fedotov d76229a3d1 Test plugin version validation when enabling all plugins 2017-01-26 16:28:01 +00:00
Daniil Fedotov 52ad0d2a39 Validate enabled plugins version requirements 2017-01-26 12:21:20 +00:00
Daniil Fedotov 1a7bdc871b Fix some compiler warnings in tests 2017-01-24 12:33:48 +00:00
Jean-Sébastien Pédron 5905f1c40a Update copyright line to year 2017 2017-01-10 15:42:40 +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
Diana Corbacho 6d9df7dfb3 Expect streams on plugins tests 2016-12-07 12:55:00 +00:00
Daniil Fedotov d4807b5233 Test cleanup 2016-12-06 17:14:40 +00:00
Daniil Fedotov ccb6bf116c Namespace refactoring 2016-11-14 17:52:08 +00:00
Daniil Fedotov 1dc8e90a70 Make tests happy 2016-11-10 17:40:43 +00:00
Daniil Fedotov 3e3d8f3f0b Fix tests for plugins commands 2016-11-08 14:19:11 +00:00
Daniil Fedotov 837226430b Coordinate environment with config module 2016-11-07 22:03:09 +03: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
Daniil Fedotov 5aed413ad8 Test stability. Enabling federation plugin when needed, do not stop distribution. 2016-09-07 13:28:06 +01:00
Daniil Fedotov 41fd1588b3 Fix warnings in tests 2016-08-23 14:28:34 +01: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 830b1d1382 Cosmetics, extract fn 2016-08-09 18:26:05 +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