Commit Graph

257 Commits

Author SHA1 Message Date
Michael Klishin 1629d2ae1e Clarify the intent 2019-12-10 23:23:06 +03:00
dcorbacho db2ab26930 Use vhost to delete federated exchange
Avoids deleting several links with the same upstream, but on different vhosts
[#169936237]
2019-12-10 17:08:58 +01:00
Arnaud Cogoluègnes c1b5812cee Start obfuscating credentials for federated queue
WIP

[#167070941]

References rabbitmq/rabbitmq-erlang-client#123
2019-08-14 16:53:04 +02:00
Daniil Fedotov 04adb8fa6a Custom consumer tag for federaion.
Consumer tag is currently generated from the upstream name.
Consumer tag serves to identify a downsream from the upstream queue,
while upsream name identifies upstream from the downstream node.
It would be more convenient to use different values.

Addresses #66
2019-04-26 16:07:59 -04:00
Michael Klishin 05c89aae39 Minor test improvements 2019-03-22 14:59:52 +03:00
Luke Bakken dd10964e48 Change regex to pattern 2019-03-21 12:03:35 -07:00
Diego Herrera Celedón 1ab3c5071c Implement some tests 2019-03-20 19:11:07 -03:00
Spring Operator ef766e32f0 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.2086793.n4.nabble.com/initializing-library-applications-without-processes-td2094473.html (200) with 1 occurrences could not be migrated:
   ([https](https://erlang.2086793.n4.nabble.com/initializing-library-applications-without-processes-td2094473.html) result SSLHandshakeException).
* 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).

## 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://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://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.rabbitmq.com/federation.html with 1 occurrences migrated to:
  https://www.rabbitmq.com/federation.html ([https](https://www.rabbitmq.com/federation.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://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 27 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 08:16:24 -05:00
Jean-Sébastien Pédron 269dcb6699 unit_inbroker_SUITE: Create `#amqqueue{}` on the broker
... and use it locally in the `get_connection_name()` testcase. With
this, we don't need to query the feature flag file and initialize the
registry locally.

This works because the feature flags are only checked when the
`#amqqueue{}` record is created. When we use it afterwards, the
`amqqueue` module doesn't care: the argument determines the version of
the record to use.
2019-02-08 16:44:18 +01:00
Daniil Fedotov c1c3660c98 Update unit_inbroker suite to support amqqeueue module. 2019-02-07 17:41:37 -05:00
Jean-Sébastien Pédron b7221e4fef Make #amqqueue{} a private record
See the corresponding commit in rabbitmq-server for all the
explanations.

Now, all accesses to the #amqqueue{} record are made through the
`amqqueue` module (available in rabbitmq-server). The new type name is
`amqqueue:amqqueue()`.

The `amqqueue.hrl` header also provides some macros to help with pattern
matching and guard expressions.

[#159298729]
2019-01-23 14:18:48 +01:00
Michael Klishin 46f257b0ae Swap these tests
Troubleshooting a Concourse failure.
2018-03-07 04:54:15 +03:00
Michael Klishin 4e42529af4 Coerce upstream definition to a proplist
So that maps do not fail validation.

References #68.
Closes #70.
2018-02-06 17:54:49 +01:00
Michael Klishin dcc78781b7 Coerce upstream set definition to proplists
So that it passes validation.

Closes #67.

[#154751618]
2018-01-31 15:49:42 +03:00
Diana Corbacho 44d2f3895c Use assert macros. Wait for link to be recreated
rabbitmq-federation#63
[#153011041]
2017-11-29 10:33:38 +00:00
Diana Corbacho a8953cd6ce Cleanup internal exchanges and queues after plugin is disabled or policy removed
rabbitmq-federation#63
[#153011041]
2017-11-27 11:24:14 +00:00
Jean-Sébastien Pédron f80c8e2db6 Merge branch 'stable' 2017-07-31 10:12:08 +02:00
Jean-Sébastien Pédron 3e3ebdf081 exchange_SUITE: Cleanup policies at the end of `restart_upstream` testcase
Without this cleanup, the `cycle_detection` testcase which follows fails
with the following error:

    ** Reason for termination ==
    ** {function_clause,
           [{rabbit_federation_exchange_link,
                '-ensure_internal_exchange/2-fun-0-',
                [406,
                 <<"PRECONDITION_FAILED - inequivalent arg 'x-max-hops' for exchange 'federation: cycle -> rmq-ct-with_disambiguate-cluster_size_2-1-21000@localhost B' in vhost '/': received '1' but current is '10'">>],
                [{file,"src/rabbit_federation_exchange_link.erl"},{line,540}]},
            {rabbit_federation_link_util,disposable_connection_call,3,
                [{file,"src/rabbit_federation_link_util.erl"},{line,305}]},
            {rabbit_federation_exchange_link,ensure_upstream_bindings,2,
                [{file,"src/rabbit_federation_exchange_link.erl"},{line,489}]},
            {rabbit_federation_exchange_link,'-go/1-fun-1-',8,
                [{file,"src/rabbit_federation_exchange_link.erl"},{line,423}]},
            {rabbit_federation_link_util,start_conn_ch,5,
                [{file,"src/rabbit_federation_link_util.erl"},{line,58}]},
            {gen_server2,handle_msg,2,[{file,"src/gen_server2.erl"},{line,1048}]},
            {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}

[#149584741]
2017-07-27 17:50:45 +02:00
Jean-Sébastien Pédron 96230a39a7 exchange_SUITE: Use a dedicated key in `cycle_detection`
The testcase is affected by other testcases not cleaning what they
created or not waiting for those resources to disappear.

By using a dedicated binding key (instead of the same `key` as all other
testcases), it seems to improve the success rate of the testcase.
2017-07-26 15:26:41 +02:00
Jean-Sébastien Pédron d4c33e11dc exchange_SUITE: No need to import rabbit_federation_test_util:no_plugins() 2017-07-26 15:25:57 +02:00
Michael Klishin 898cf32100 Merge branch 'stable' 2017-04-02 21:57:33 +03:00
Michael Klishin ab6ccc5f1f (c) year 2017-04-02 21:47:58 +03:00
Jean-Sébastien Pedron 699a7ce01e Change cluster_size_2 test ordering to fix failing test
Signed-off-by: Gerhard Lazu <gerhard@rabbitmq.com>
2017-03-13 12:13:21 +00:00
Diana Corbacho eb3f004280 Extend notify and notify_clear to support usernames 2017-01-13 15:48:45 +01:00
Michael Klishin b5db85e3e0 federation_link_restart => restart_federation_link
while at it, provide a more user friendly error message
2017-01-04 02:27:15 +08:00
Diana Corbacho b1b07fbfaa CLI command to restart a link 2017-01-03 15:26:11 +01:00
Diana Corbacho 9139e8e43f Merge branch 'stable' 2017-01-03 15:11:37 +01:00
Diana Corbacho c8252f2c53 Internal rename of only-down to only_down to satisfy parser 2016-12-30 16:07:33 +01:00
Diana Corbacho 600b29df43 Add tests for federation status/lookup 2016-12-29 10:06:56 +01:00
Diana Corbacho 46e5cddeaf Rename option 2016-12-28 13:23:33 +01:00
Diana Corbacho 221de38065 CLI command option to list down links 2016-12-28 11:32:12 +01:00
Diana Corbacho 12ad37f1f3 Include empty fields for csv and table formatters 2016-11-21 11:21:34 +00:00
Diana Corbacho 6fb03876c1 Tests for CLI extension for federation status 2016-11-21 10:06:04 +00:00
Diana Corbacho 9b70d870b8 Test refactor 2016-11-21 10:06:04 +00:00
Michael Klishin 548f65eb6e Merge branch 'stable' into rabbitmq-federation-39 2016-10-19 17:12:48 +08:00
Arnaud Cogoluègnes 174b6134b4 Improve Federation link connection name
Fixes #39
2016-10-19 09:38:47 +02:00
Daniil Fedotov a4c514f39a Test cleanup 2016-10-14 14:44:53 +01:00
Arnaud Cogoluègnes b180f575a1 Make Federation connections (links) specify a name
Fixes #39
2016-10-13 18:01:36 +02:00
Jean-Sébastien Pédron dc14525cf4 exchange_SUITE: Increase timetrap to 5 minutes
Hopefully this should fix timeouts on CI.
2016-07-06 14:53:00 +02:00
Jean-Sébastien Pédron 06d248d412 exchange_SUITE: Remove debugging printf 2016-06-24 14:23:29 +02:00
Jean-Sébastien Pédron 4e70c06538 Switch testsuite to common_test
While here, update Erlang.mk. It fixes the use of the `t=` argument to
`make ct-$suite`.

[#121412011]
2016-06-24 12:49:37 +02:00
Michael Klishin 5b04047100 Update (c) info 2016-01-01 12:59:17 +03:00
Jean-Sébastien Pédron 3836212a3d Use $RABBITMQ_NODENAME instead of hard-coding nodename 2015-10-19 17:29:55 +02:00
Michael Klishin 631b280fe6 (c) year 2015-05-24 05:13:37 +03:00
Simon MacMullen 457ab381ef Use functions from the broker, remove need to test. 2014-06-11 13:10:02 +01:00
Simon MacMullen be3cd2864a Remove some dependencies that were invented. Add a test to make sure the helper exchange type gets unregistered / reregistered correctly. 2014-06-11 12:04:31 +01:00
Simon MacMullen 34b5272870 Add a test designed to blow up and remind us if those records change. The alternative would be to move the id/1 functions to rabbit_amqqueue and rabbit_exchange, but they (especially the queue one) are just that little bit too federation-specific to really make sense there. 2014-06-11 11:44:06 +01:00
Simon MacMullen d770e82a1b Test queues too. 2014-06-10 13:13:59 +01:00
Simon MacMullen 5bc642aa63 Flesh out test, fix bug. 2014-06-10 12:20:53 +01:00
Simon MacMullen 43a5360fed Start to test plugin enable / disable 2014-06-10 10:28:37 +01:00
Simon MacMullen d7ca888acc Remove some no-longer-needed stuff 2014-05-14 14:30:28 +01:00
Simon MacMullen 85967f6f2f Port all the in-broker tests. 2014-05-14 14:06:05 +01:00
Simon MacMullen 2b556b38be Add a mechanism for federation to run multiple nodes in one distributed system, and thus port the rest of the mutli-node tests. There is still a great deal of detritus to be removed... 2014-05-13 18:10:31 +01:00
Simon MacMullen 6a88d64fac Further WIP-saving. 2014-05-09 13:53:54 +01:00
Simon MacMullen 4b787a9d20 WIP: port a test to use the multi-node framework. 2014-05-08 16:26:52 +01:00
Simon MacMullen 8b1d0105eb Update copyright for 2014 2014-03-17 17:25:21 +00:00
Matthias Radestock cc32ab542b remove unused code & eliminate warning 2014-03-13 12:50:51 +00:00
Simon MacMullen 61a01a752e Wait for the "goes" key to go away - i.e. for the old internal exchange to be deleted - so that when we check for "stays" we will get the new copy and not inadvertently the old and new copies together. 2014-02-26 14:45:01 +00:00
Simon MacMullen 53ef85ec4e Another final deracification. 2014-02-20 10:46:12 +00:00
Simon MacMullen 5a5fc63c92 Further attempt to remove raciness from the federation tests. If my calculations are correct, this might be the last one[?!] 2014-02-19 11:43:27 +00:00
Simon MacMullen ddab02d359 Try to make this test more robust. 2014-02-11 11:25:13 +00:00
Simon MacMullen 524673b392 Merge bug 23906 2014-02-05 16:32:38 +00:00
Simon MacMullen 0382d04e03 Merge bug25979 (again) 2014-02-05 16:26:13 +00:00
Simon MacMullen 9f73f73fdf Damn, that's no longer relevant either. 2014-02-05 16:24:29 +00:00
Simon MacMullen 933b571aa2 Fix tests post-merge 2014-02-05 16:07:48 +00:00
Simon MacMullen 4e7d0294ed Merge bug25979 again 2014-02-05 15:30:32 +00:00
Simon MacMullen 4ad9f2b681 That's no longer relevant. 2014-02-05 15:30:18 +00:00
Simon MacMullen 80bfbe2272 Merge default 2014-02-05 15:15:57 +00:00
Simon MacMullen 9e29aa67ea Derp 2014-01-30 15:08:05 +00:00
Simon MacMullen 523a938917 Remove all the timer:sleep/1 invocations (that aren't part of a loop to check whether something has happened yet). It turns out that they can all be replaced by waiting to see if bindings have appeared upstream. Tests are now notably faster to run, and should be more reliable. 2014-01-30 14:59:52 +00:00
Simon MacMullen 02f59b44e9 Cycle detection for bindings too, plus a test. 2014-01-30 11:17:24 +00:00
Simon MacMullen ef6f12fef0 Be more general about reporting failed command executions - ?assertCmd() doesn't tell you anything. 2014-01-29 15:21:44 +00:00
Simon MacMullen 299829365a Update nomenclature in tests too... 2013-12-09 11:18:03 +00:00
Simon MacMullen 36402c280b Tests need renaming too. 2013-09-18 12:52:04 +01:00
Simon MacMullen 94e4d3293d Rename a couple of modules that are exchange-specific. 2013-09-18 12:23:28 +01:00
Simon MacMullen d374681d9e Merge in default 2013-09-05 12:25:38 +01:00
Simon MacMullen f5b3a9000e Merge default 2013-09-04 14:49:23 +01:00
Simon MacMullen e4addbbc5e API change 2013-09-03 12:50:09 +01:00
Simon MacMullen 616c4ce764 If we fail to start a second broker, let's say why 2013-09-03 12:46:11 +01:00
Simon MacMullen cebd0cc414 Merge in default. 2013-09-02 16:36:20 +01:00
Simon MacMullen b26877f55d Uh, post bug 25707 that test makes no sense, and fails frequently. 2013-09-02 16:31:32 +01:00
Simon MacMullen ec17942ffc Merge default 2013-08-16 11:16:54 +01:00
Simon MacMullen b5d5996746 Update to new queue decorator API, and thus re-enable a disabled test. 2013-07-05 17:27:27 +01:00
Simon MacMullen ce515d3310 s/VMware/GoPivotal/g 2013-07-01 10:49:12 +01:00
Simon MacMullen b81e3f093d Fix various bugs in status updates, tests now pass again. 2013-06-28 16:46:23 +01:00
Simon MacMullen ceadd6d480 Add a (simple) restart test and also test status (although that part fails right now). 2013-06-27 16:53:26 +01:00
Simon MacMullen 0cd78b887b Oops, unbreak tests 2013-06-12 14:51:47 +01:00
Simon MacMullen ae5907e342 A bunch more tests, and a (temporary) fix thus discovered. 2013-06-05 14:36:11 +01:00
Simon MacMullen 1d4c99e2d6 Disable this test until we are much further along. 2013-06-05 11:56:24 +01:00
Simon MacMullen 844ff645b6 Allow specifying a different queue name for the upstream, remove use of a fake exchange, start to write tests, remember to sepcify drain. 2013-06-04 15:46:43 +01:00
Simon MacMullen 8deff01da2 Add a test of changing the policy for a federated exchange while keeping it federated. 2013-04-16 14:54:41 +01:00
Simon MacMullen 174b3de97c Stable to default 2013-03-12 12:46:08 +00:00
Simon MacMullen 65a15bbdfa Oops 2013-03-12 12:34:20 +00:00
Simon MacMullen 4df3ebd76a Also test that we don't unescape wrongly. 2013-03-12 10:31:11 +00:00
Simon MacMullen 855d654a8f Rewrite to use uri_parser:parse/2 and add unit tests. 2013-03-12 10:27:59 +00:00
Simon MacMullen 75ae97434a Strip out credentials when adding URIs to x-received-from header. 2013-03-11 18:44:57 +00:00
Simon MacMullen 6e9e3f4842 Slightly less cheap-and-cheerful test for multiple URIs.
"It's all right... to be mean" (to your connection pids).
2013-02-05 13:35:20 +00:00
Simon MacMullen 25dbc11929 Rather fiddly refactoring to split up #upstream into #upstream{} and #upstream_params{} - the latter being instantiated by the link process, and representing a choice having been made amongst the URIs in the #upstream{}. So we now should fail over randomly to a new upstream from the set. 2013-02-04 17:11:39 +00:00
Emile Joubert 5bd7b6461e Update copyright 2013 2013-01-23 11:43:00 +00:00
Simon MacMullen ab318fd339 Merge default! 2012-10-26 16:34:31 +01:00