Mock datetime instead of redefining standard library
This fixes up the test to mock the datetime calls specifically in
the test that needs to mock them, rather than the prior approach
which was redefining the behavior of the standard library function
globally.
Closes-Bug: #2045588
Change-Id: I9c585c91c5527a61e4a8dbcba0a8a01108cd9b2e
(cherry picked from commit 72e22a94ed4966ff6fb2fba41bac1b204dbd4c14)
Sync charm-helpers to pick up fix for openstack_upgrade_available
that enables successful payload upgrades. This will need backporting
to stable/wallaby.
Sync to the latest revision available in the stable/antelope branch, among the
most relevant patches are:
837a8b58 Support legacy cert requests (#799)
580c7764 Update Makefile to be consistent with CI (#777) (#795)
a2468260 Run CI on stable branches (#786) (#787)
ed014373 Update method for checking endpoint protocol (#769) (#775)
This patch is to lock the stable/2023.1 (antelope release) charms
down so that as much as possible.
In particular, this patch does:
- set the .gitreview to stable/2023.1
- lock zaza and zaza-openstack-tests to stable/antelope branches
- for reactive charms Add build.lock files to lock the layers
and python modules used to build the charm.
- for ops framework charms, extract a pip freeze from the
charmcraft container after building the charm to lock the
modules used to build the charm.
- drop the kinetic bundles if the exist. (Note the updates to
tests.yaml is in another batch (topic: antelope-voting)
- update the bundles so that they point to the antelope specific
channels. e.g. 2023.1/edge for OpenStack charms, 23.03/edge for
OVN charms, quincy/edge for Ceph charms and generally, the
appropriate LTS Jammy branch for the various support charms.
Enable jammy-antelope voting and drop kinetic-zed tests
* Voting was turned on for jammy-antelope in the
project-template for charm-functional-jobs in zosci-config
* Voting for jammy-antelope bundles with non-standard names
is turned on in individual charms
* Kinetic-zed bundles/tests are removed
Change-Id: Ie8a668f3ad032af939e87dba1cda18e30a2b13ff
(cherry picked from commit 93a1214feb1fde7874e3012678956ab820362cd4)
* sync charm-helpers to classic charms
* change openstack-origin/source default to zed
* align testing with zed
* add new zed bundles
* add zed bundles to tests.yaml
* add zed tests to osci.yaml and .zuul.yaml
* update build-on and run-on bases
* add bindep.txt for py310
* sync tox.ini and requirements.txt for ruamel
* use charmcraft_channel 2.0/stable
* drop reactive plugin overrides
* move interface/layer env vars to charmcraft.yaml