Commit Graph

52 Commits

Author SHA1 Message Date
Aurelien Lourot 4eef19197d Add missing blank 2020-09-09 09:49:15 +02:00
Aurelien Lourot 38317c3bc2 Make RmqTests.test_910_pause_and_resume more robust 2020-09-08 12:24:26 +02:00
Dmitrii Shcherbakov 51bce56f9e Skip test_921_remove_and_add_unit
Due to test stability issues we need to skip it and work on it after
release.
2020-05-20 10:26:48 +03:00
Aurelien Lourot 0dad4aca14 Minor improvements to RmqTests.test_913_list_unconsumed_queues 2020-05-18 23:36:27 +03:00
Dmitrii Shcherbakov dfc6235362 Add cleanup to the unit removal case
For some reason test cases are sometimes executed out of order and so
test_921_remove_unit is sometimes run before the pause_and_resume test
case which results in an error.

While the root cause for it must be found it would also be good to avoid
side-effects in individual test cases and return the environment back to
its original state.

There is no 'start' hook implementation for charm-rabbitmq-server,
however, changes that close to the 20.05 release are discouraged so this
change uses an upgrade-charm event simulation to re-trigger the addition
of a unit (which was previously removed) to the cluster.

NOTE: after an execution of hooks/upgrade-charm finishes, the charm will
stay in the waiting state with the following status until the next
update-status event: 'Unit has peers, but RabbitMQ not clustered'

Related-Bug: #1730709
2020-05-18 23:36:27 +03:00
David Ames 37297aff8f Reduce the number of permutations of msg checks
Reduce the number of checks by 30%.
Remove duplicate test 410.
Use logging.info to get output.
2020-05-10 00:51:54 +00:00
Chris MacNaughton 27e5f7d8bc We must have async functions for the before/after callables 2020-04-10 16:51:41 +02:00
Chris MacNaughton 2a98274d67 Add a few more function hooks to the series upgrade process
By including pre and pos-application functions, charm
series upgrades can be handled in a more generic way,
even when they require running additional actions
before a unit is upgraded, or after the whole application
is upgraded.
2020-04-10 10:50:43 +02:00
Alex Kavanagh 7076053627 Update rabbitmq tests for version 3.8.2 on focal
Ubuntu focal ships with rabbitmq server 3.8.2 which has changed the text
output format for the cli commands that the tests rely on.  Fortunately,
3.8.2 also adds a --formatter=json option.  This patch takes advantage
of that.
2020-03-23 17:49:22 +00:00
Edin Sarajlic d2e12abb91 Remove condition: check client series will always be true.
All CI test runners are >= xenial. The condition will always be true.
2019-10-14 10:45:59 +11:00
Edin Sarajlic 1ea0be0440 Don't time.sleep when checking Rmq ports after toggling mgmt plugin. 2019-10-14 10:45:59 +11:00
Edin Sarajlic 060f7392d9 Don't sleep while waiting for cluster status to update. Use tenacity 2019-10-14 10:45:59 +11:00
Edin Sarajlic 215b3c87e3 Don't time.sleep waiting for Nagios. Port to tenacity. 2019-10-14 10:45:59 +11:00
Edin Sarajlic d780f76797 Port validating Rmq SSL off from time.sleep to Tenacity 2019-10-14 10:45:59 +11:00
Edin Sarajlic e8068a8356 Port validating Rmq SSL on from time.sleep to Tenacity 2019-10-14 10:45:59 +11:00
Edin Sarajlic 814ff7ddee Don't sleep before attempting get AMQP msg. Retry w/ tenacity 2019-10-14 10:45:59 +11:00
Edin Sarajlic 5e170cd1ba Make get_series/get_client_series available as public util functions 2019-10-14 10:45:59 +11:00
Edin Sarajlic 4eb068ab23 Provide a message if assert fails 2019-10-14 10:45:59 +11:00
Edin Sarajlic a0769e5dcb Remove TODO (behaviour confirmed not to be a bug) 2019-10-14 10:45:59 +11:00
Edin Sarajlic 1a9449766a Remove superfluous newlines at the end of debug messages 2019-10-14 10:45:59 +11:00
Edin Sarajlic 60e84e4c27 Port Rmq charm func test removing a unit from a Rmq cluster
This function was previously called test_901_remove_unit, but had to
be renamed (moved to the end of the func tests); The way in which unit
removal is now performed (by running the "stop" hook) puts the the
removed unit in a "waiting" state -- which consequently causes
wait_for_cluster() (e.g. used in 910) to fail (timeout).
2019-10-14 10:45:59 +11:00
Edin Sarajlic b5f60126bc Remove duplicate call to function 2019-10-14 10:45:59 +11:00
Edin Sarajlic 18726c341a Fix lint errors found in docstrings 2019-10-14 10:45:59 +11:00
Edin Sarajlic 4792a527c9 PROTOCOL_TLS is not available until Py3.6, use alternative 2019-10-14 10:45:59 +11:00
Edin Sarajlic 0e16359330 Check client+unit OS versions before running Rmq tests with SSL enabled 2019-10-14 10:45:59 +11:00
Edin Sarajlic 1835d957a1 Test: msgs can be sent/retrieved to/from Rmq cluster with SSL+alt port
Same message as my previous commit: As per the code: is there a
function to determine unit's release?  Otherwise, I'll just implement
a generic function that run_on_unit lsb_release -cs
2019-10-14 10:45:59 +11:00
Edin Sarajlic ce45a47dab Test: messages can be sent/retrieved to/from Rmq cluster with SSL on
As per the code: is there a function to determine unit's release?
Otherwise, I'll just implement a generic function that run_on_unit
lsb_release -cs
2019-10-14 10:45:59 +11:00
Edin Sarajlic 19c9e86b19 Test: Rmq pause/resume.
Note: This test may have exposed a bug, where the
`block_until_unit_wl_status` returns once it reaches the "maintenance"
state, but subsequent queries to `unit.workload_status ==
"maintenance"` fail. Recreating the unit object (via
`zaza.model.get_unit_from_name`) returns the correct workload_status
when queried.
2019-10-14 10:45:59 +11:00
Edin Sarajlic a738efd7f2 Test: Rmq unit action 'list-unconsumed-queues' returns a Juju action 2019-10-14 10:45:59 +11:00
Edin Sarajlic 2a0b7bf8e2 Test: Rmq unit action 'check-queues' returns a Juju action 2019-10-14 10:45:59 +11:00
Edin Sarajlic 9e7d76df2f Test: Rmq unit action 'cluster-status' returns a Juju action 2019-10-14 10:45:59 +11:00
Edin Sarajlic c5aba589ce Test: existence NRPE configs/data on Rmq units 2019-10-14 10:45:59 +11:00
Edin Sarajlic 405cdf6388 Test: RMQ management plugin enabling/disabling exposes/hides ports 2019-10-14 10:45:59 +11:00
Edin Sarajlic 79c816ed0f Test: messages can be sent/retrieved to/from Rmq cluster without SSL 2019-10-14 10:45:59 +11:00
Edin Sarajlic 1baff7281c Helper function for testing if messages move across cluster successfully 2019-10-14 10:45:59 +11:00
Edin Sarajlic 1acbfd8741 Add a function for retrieving a message to an Rmq unit 2019-10-14 10:45:59 +11:00
Edin Sarajlic 20aad97033 Add a function for publishing a message to an Rmq unit 2019-10-14 10:45:59 +11:00
Edin Sarajlic e09660f7c1 Add a function for disabling SSL on Rmq units 2019-10-14 10:45:59 +11:00
Edin Sarajlic 79d70e4f8d Add a function for enabling SSL on Rmq units 2019-10-14 10:45:59 +11:00
Edin Sarajlic 97cc2b8e60 Add function validating is SSL is disabled on Rmq units 2019-10-14 10:45:59 +11:00
Edin Sarajlic c917c5b370 Add function validating if SSL is enabled on Rmq units 2019-10-14 10:45:59 +11:00
Edin Sarajlic 79a9f179df Add function for determing if SSL is enabled in unit's Rmq config 2019-10-14 10:45:59 +11:00
Edin Sarajlic 6d3714aa06 Add a function for deleting a user from a Rmq cluster 2019-10-14 10:45:59 +11:00
Edin Sarajlic 3a64bec97a Add function for adding a user to an Rmq cluster 2019-10-14 10:45:59 +11:00
Edin Sarajlic 313f07bd0c Add test confirming that all Rmq units are part of cluster 2019-10-14 10:45:59 +11:00
Edin Sarajlic e0707fac04 Add an RmqTests class (tests to follow...) 2019-10-14 10:45:59 +11:00
Edin Sarajlic efb781b048 Create rabbitmq_server.tests file (add a license as a starter) 2019-10-14 10:45:59 +11:00
Edin Sarajlic 6749ff763e Add a function for creating connection to Rmq instance on unit 2019-10-14 10:45:59 +11:00
Edin Sarajlic fa68f09e72 Add a function providing all units/nodes Rmq cluster_status in JSON 2019-10-14 10:45:59 +11:00
Edin Sarajlic 47657d6113 Add a function for getting Rmq cluster_status info from a unit 2019-10-14 10:45:59 +11:00