The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.
Note that https://github.com/openstack/charms.openstack is used during tests
and he need `mock`, unfortunatelly it doesn't declare `mock` in its
requirements so it retrieve mock from other charm project (cross dependency).
So we depend on charms.openstack first and when
Ib1ed5b598a52375e29e247db9ab4786df5b6d142 will be merged then CI
will pass without errors.
Depends-On: Ib1ed5b598a52375e29e247db9ab4786df5b6d142
Change-Id: If1ef6178116ed8f1ce8f0244d72246292cdf52e9
The network space for the cluster space or the public space may have
addresses in a different subnet than the one that is currently assigned
to the unit. In this case, the attempt to look up the netmask results in
a value of None, which in turn causes charmhelpers to raise an
AddrFormatError when attempting to determine the CIDR.
Handle this case within the interface and return None for the respective
CIDR. This may cause some issues where the public or cluster CIDRs are
not resolvable, however the charm interface already expects to provide
None if the CIDR cannot be determined.
A better, however more invasive, change would be to change out the calls
in the ceph-mon charm to use the network_get calls rather than
network_get_primary_address. Per the documentation for the network
primitives, it appears that the cidr can still be empty and is likely to
still lead to the inability to resolve the CIDR locally.
This change will primarily focus on handling the inability to resolve a
CIDR locally, postponing the network_get transformation this late in the
cycle.
Closes-Bug: #1898299
Change-Id: If1538eb645577653cada770211fd445b76284fd3
- removing sitepackages in tox.ini to avoid test env pollution
- skip_missing_interpreters in tox.ini set to False to avoid false
positives by skipping missing interpreters.
Change-Id: I4af6d2c70c17f42c76bebbef05e259ae0ca3eeee
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.
See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html
Note that python35-charm-jobs is retained since this charm is supported
on Xenial.
Change-Id: Ie38f53298dd4f9001fa59f5a10c4cc42f55155cc
Story: #2005924
Task: #34228
In some situations the charm will call out to us thinking it has
relations when it has not.
Change-Id: If96f1501892784d7addedbbd7eca55dc8e7bb9ba
Closes-Bug: #1822102