charm-helpers:support-unittest-mode

Last commit made on 2023-10-23
Get this branch:
git clone -b support-unittest-mode https://git.launchpad.net/charm-helpers

Branch merges

Branch information

Name:
support-unittest-mode
Repository:
lp:charm-helpers

Recent commits

cec2095... by Alex Kavanagh

Fix pep8 issues

9333fea... by Alex Kavanagh

Mock get_platform / add CHARMHELPERS_IN_UNITTEST

Patch osplatform.get_platform() to return "ubuntu" if the environment
variable CHARMHELPERS_IN_UNITTEST is set to something truthy. This is to
enable unit testing in classic charms on NON ubuntu systems (e.g. Debian
bookworm) where the function is often called via a decorator that is
evaluated at module load time and thus is very, very tricky to mock out,
as it is often 'hit' during the test discovery phase.

fb4c776... by Felipe Reyes

Merge pull request #850 from coreycb/drop-os-release-caching

Drop @cached decorator from openstack_release()

b2d56ea... by Corey Bryant

Drop @cached decorator from openstack_release()

The openstack_release() function is typically called (indirectly)
by os_release() which already does caching. The caching of
openstack_release() was preventing updates to the value during
upgrading to a new release of openstack.

Closes-Bug: #2037751

e4bbecd... by James Page

Merge pull request #840 from rodrigogansobarbieri/send_app_name

Add name parameter to send_application_name

77bb1c8... by Alex Kavanagh <email address hidden>

Merge pull request #833 from dosaboy/wsgi-socket-rotation

Rename wsgi-rotation to wsgi-socket-rotation

1a90eb0... by Edward Hope-Morley

Rename wsgi-rotation to wsgi-socket-rotation

Commit 996f241 added support for new config option
'wsgi-rotation' but that name should have been
'wsgi-socket-rotation' in order to have a 1:1 relation
with the apache config it changes. The following patches
that implement this config are currently blocked until
this lands so that they can be synced before merge:

 * https://review.opendev.org/c/openstack/charm-ceilometer/+/887793
 * https://review.opendev.org/c/openstack/charm-cinder/+/886356
 * https://review.opendev.org/c/openstack/charm-glance/+/886376
 * https://review.opendev.org/c/openstack/charm-keystone/+/886377
 * https://review.opendev.org/c/openstack/charm-nova-cloud-controller/+/885836
 * https://review.opendev.org/c/openstack/charm-openstack-dashboard/+/886373

Related-Bug: #2021550

6a19a0a... by Rodrigo Barbieri

Add name parameter to send_application_name

This way, multiple nova-compute applications can
share the same ceph key, as nova can invoke
send_application_name('nova-compute').

02ee3d1... by Felipe Reyes

Merge pull request #839 from juju/remove-f-string

Remove f-strings, fix pep8 error, and py311 to matrix

73803f6... by Alex Kavanagh

Remove f-strings, fix pep8 error, and py311 to matrix

- Remove the f-strings; this caused problems with py3.5 which the
  library sort-of still supports.
- Fix the newest pep8 error.
- Add py311 testing to the matrix.