Tidy up hacluster tests. In the process this fixes the error:
```
UnboundLocalError: local variable 'primary_status' referenced before assignment
```
This was caused by libjuju now returning an empty dict rather than
None when listing a subordinates units.
Refactor Designate tests so that the api tests can be called
without running pause/resume tests. This is useful in the mojo
replacement functional tests.
In the case where we have a subordinate charm, libjuju juju status
on the unit returns an empty dictionary, therefore the existing None
check would fail and the subordinate status would never get set.
The result being subordinates not included in the returned Iterator.
If the ssl-{key,chain,ca} charm config option have been set than
retrieve the ssl-ca from the vault charm and use it when making
called to the vault api.
python-libjuju was broken at 2.8 and thus zaza and zaza-openstack-tests
needed to be pinned to < 2.8. This patch releases that so that the
latest versions of libjuju are used in testing. This may get pinned
again before the next release window.
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
The image used for the tests is just treated as a blob, no guests
are booted using it so to speed up the tests when using slow
storage by switching to using cirros image. The cirros image is ~20
times smaller than the bionic one.
It's a bit too optimistic to expect an instance to respond to the first
ping. This patch gives the instance up to 8 retries with increasingly
lengthened waits to respond to a ping. This should help with Juju
storage backed nova instances.
Fixes: #265
There was a race before a block_until_all_units_idle() where it
could blast through the check before it started removing the relation.
This ensures that it waits until something happens and then waits for it
to finish.
Copy function from MySQLInnoDBClusterTests to test mysqldump
as standard on mysql applications.
DocImpact
Closes-Bug: #0000000
Implements: MySQL dump test