If there are multiple charms of a given application then a hook
like leader-settings-changed can trigger a deferred hook. So a
race can occur where the deferred hooks of unit1 are cleared
then in the process of clearing unit2 a deferred hook is
triggerred in unit1. To fix this do not block on the wl status
message after the hook test completes.
Also, make sure that an action failure is fatal to surface any
issues.
* Add ovn-chassis test
* Yet another refactor to reduce the amount that implementations need to override.
* Add ovn dedicated chassis support
* Fix race with checking wlm
* Updates to concurrent series upgrade
Updates to make it run more in parallel and spend less time waiting on
the whole model when updating machines.
* Make the concurrent series upgrade tests work
This is a number of changes to get the concurrent (here called
'parallel' historically) series upgrade tests to work. A number of
changes were required which included limiting the number of concurrent
async co-routines (futures) that could be run as with large models it
hits the limits of the Py3 runtime.
* Fix the tests and change pause order in maybe_pause_things
Due to an additional model helper call, an additional model AsyncMock is
required. Also the pause order had changed, and this is restored to
ensure the original design is retained (for pause order).
Clean up some commented out code and sort out a few PEP8 errors.
* Update comment to reflect code (3 -> 4)
* Fix tests that fail on bionic but pass on focal
Essentially, asyncio.gather has different behaviour on bionic that
focal. Although this doesn't affect testing, it does affect the unit
tests. These changes are simply to normalise the behaviour of unit
tests on focal and bionic.
- Reversed ldap-config-flags vs charm configs precedence
for https://review.opendev.org/748364
- Added new functional test to validate the precedence
- Added zaza helper function to assist handling charm configs
that do not accept "" (like booleans and ints), and reverting
to unset values through config_change()
- Fixed zaza reset helper function that apparently never
worked ({}.keys() returns dict_keys which is not a sequence)
Fix z-o-t so that tests that specify an application name can
be run irrespective of whether the charm_name has been set in
tests.yaml. Closes issue #442
The fix for the config_change helpers short cut on config restore
in c5a3f832d0 introduced a
regression for consumers that use the helper to set but not
restore config.
Re-introduce the shortcut when the caller passes in equal settings
for default and alternate configuration.
Fixes#427
Due to python-libjuju's requirement for coercing every config
value into strings, some configuration type/values are not
possible to specify the default for.
Allow the config_change helper to optionally use reset back to
charm default instead of specifying default config values in a
dictionary.
When configuring the address to use to talk to Keystone,
the format_addr helper should be used to ensure that an
IPv4 or IPv6 address can be correctly handled.
At present the shared resource cleanup method is a class method.
This will prohibit descendents of the class to influence whether
cleanup should be run.
Remove the @classmethod decorator so that it will make its
descisions based on class instance variables set by the
descendent.
Most api charms test restart on changed by flipping the value of
debug. This has led to the same test being copied around. To reduce
the boiler plate code this change adds a new test helper which can
be used instead.
Add Python 3.8 env in Travis CI test matrix.
At present the pinning of flake8 disallows running of lint on
Python 3.8 systems.
Update flake8 ignore-list to ignore W504 instead of W503, the PEP
guidance is that either is ok, but there must be local consistency.
There are more occurences of binary operator before line-break
than after in this repository, and we have also chosen to ignore
W504 in most of our other repositories.