* Add functional tests for ceph-mon actions.
This PR adds functional validation for 2 actions of the ceph-mon
charm that are currently being rewritten.
Cleanup after the tests run.
Co-authored-by: Luciano Lo Giudice <luciano.logiudice@canonical.com>
This change removes a repeated call to ceph daemon config
show and replaces it with a single call that we then
parse in Python.
It also removes a deprecated usage of handling async
code in Zaza that causes an infinite block in the test
code.
In order to correctly test the upgrade from stable, we have to
move the tests that haven't landed yet to a different class so
that the charm can select to run them only after performing the
upgrade to the locally built charm.
The updated testcase handles verifying the expected states
that are safe to migrate, as well as verifying that pre- and post-
migration data are correctly synced.
One of the pep8 target dependencies must have updated,
causing a bunch of new lint errors in these categories:
- line length > 79 chars
- no whitespace after keyword
Change prometheus test to check it has a non-zero amount of OSDs
registered rather than a specific number. This stops the number of
OSDs having to be managed in the tests.
With the upcoming transition to an operator-framework charm, the
Ceph tests need to be idempotent, since we'll be testing the upgrade
path from classical to operator. The tests that need fixing are the
ones that call out to add/remove disks, since they create loopback
devices to back the OSD's but never remove them.
The test suite for ceph-iscsi does a bunch of operations on filesystems
in quick succession, so some tests are prone to fail if the kernel doesn't
update the partition table. This PR does this manually between tests by
calling the 'partprobe' command.
Co-authored-by: Luciano Lo Giudice <luciano.logiudice@canonical.com>
This PR ensures that the SAML tests are using a fully valid IDP
metadata (Ceph's dashboard doesn't report its validity until SAML
features are used), as well as using TLS in the requests, in addition
to some cleanups here and there.
There appears to be a race condition between the loop device creation
and its actual usage. In order to prevent that, this PR setups these
devices during the test initialization instead of right before using
them in the 'add-disk' tests.
This PR builds on the add-disk one, testing the complete flow
of adding a disk, removing it and finally re-adding it after
recycling the original OSD id.