Commit Graph

45 Commits

Author SHA1 Message Date
Alex Kavanagh 16b543572d Updates for caracal tox.ini
Update the tox.ini file(s) to use the constraints file from
zaza-openstack-tests.

Change-Id: Ied77c915fd5dbfdf9a15acee0b721a352307e3dc
2024-02-24 20:11:45 +00:00
Gabriel Cocenza 04480c4ff4 Add support for HAProxy L7 checks
This change add several configuration options to enable HTTP checks
to the HAProxy configuration, instead of the default TCP connection
checks (which continue to be the default)

Closes-Bug: #1880610
Change-Id: I50a9442ae66da71793a5e9904d23c26d1fbbdf42
2023-02-17 20:45:04 +00:00
Liam Young 5773a13ccb Fix charm for tox4 compatibility
Related-Bug: 2002788
Change-Id: I3784e6f54251aa0df58bc3ace0ea5a128ef63166
2023-01-13 14:00:36 +00:00
Bas de Bruijne 6e5189646f Use juju-exec in chron jobs for juju3 support
Change-Id: Id2a92a134c2e663b3dca10dbc36dd7c7afc9c86b
2022-12-08 15:56:43 -04:00
Corey Bryant 29d03fc673 Add Kinetic and Zed support
* 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

Change-Id: Idf4a6cd1e0888576f890b00aa5b343936900d6dd
2022-08-26 18:40:36 +00:00
Alex Kavanagh 7508c6104e Updates to enable jammy and finalise charmcraft builds
- Add 22.04 to charmcraft.yaml
- Update metadata to include jammy
- Remove impish from metadata
- Update osci.yaml to include py3.10 default job
- Modify tox.ini to remove py35,py36,py37 tox target and add py310
  target.
- ensure that the openstack-origin is yoga

Change-Id: I82a3ae55422e0871bddf37debf1089c9a9a3e843
2022-04-05 15:11:41 +01:00
Alex Kavanagh ebc532bde3 Update to classic charms to build using charmcraft in CI
This update is to ensure that the Zuul Canonical CI builds the charm
before functional tests and ensure that that artifact is used for the
functional tests.  This is to try to ensure that the charm that gets
landed to the charmhub is the same charm that was tested with.

Change-Id: Ia2f3bcba500de242a93d9f0bf073a9c5c3aad89a
2022-02-17 18:22:09 -07:00
Corey Bryant 5ba7d75df0 Additional test updates
* drop xenial metadata and function tests
* switch to release-specific zosci functional tests
* switch to yoga zosci unit test job
* add py39

Change-Id: I6b5b33d17450361f9f11bbc21e0651c2e2d3c0cf
2021-11-17 14:47:35 -05:00
Alex Kavanagh faeb5e7825 Add xena bundles
- add non-voting focal-xena bundle
- add non-voting impish-xena bundle
- charm-helpers sync for new charm-helpers changes
- update tox/pip.sh to ensure setuptools<50.0.0
- Note that this depends on I7f17acb4cc4a83fc15655bf6e15c8ff3b3fe92ff
  to be able to land this as glance needs xena support to run in this
  charms functional tests.

Change-Id: Ieaed39e06a7454f71b1422c46c4fccd72fbe04af
2021-09-28 15:39:00 +01:00
Aurelien Lourot 78e6d2aea2 Sync release-tools
In order to fix ResolutionImpossible on tox invocation.

https://github.com/openstack-charmers/release-tools/issues/151
https://github.com/openstack-charmers/release-tools/pull/152

Change-Id: Ia6a4f8211acdaecc0547ccc2c4a8bdf54d6ad072
2021-07-22 14:55:13 +02:00
Aurelien Lourot 586330d383 Sync release-tools
Sync release-tools boilerplate containing these changes
in order to pin pip < 20.3:
https://github.com/openstack-charmers/release-tools/pull/125
https://github.com/openstack-charmers/release-tools/pull/126

Change-Id: Iea9437af9792674436d0c404c0e6ad45ccbe56e0
2020-12-11 13:56:50 +01:00
Aurelien Lourot f9aa92c7ce Do not leak credentials on leader-set failure
This will also give us more insights into the leader-set failure
happening in the linked bug.

Also updated project files from latest release-tools templates.

Also blacklisted libjuju 2.8.3 which causes spurious
JujuAPIError's.

Change-Id: I51b890098df6d918c1d84adba272559ef45411bb
Partial-Bug: #1890256
2020-09-11 12:23:12 +02:00
Alex Kavanagh 217ac0e4bd Release sync for 20.08
- Classic charms: sync charm-helpers.
- Classic ceph based charms:  also sync charms.ceph
- Reactive charms: trigger a rebuild
- sync tox.ini
- sync requirements.txt and test-requirements.txt

Change-Id: If3113f1b09776c5964aba92045d80153e5d0ce45
2020-07-27 20:53:18 +01:00
Dmitrii Shcherbakov 4eb640ab56 Return an empty string if relation data is missing
None is returned for a relation data value if a key isn't present -
assuming that it's a string is not correct. This change fixes that by
returning an empty string if protocol-name is not present.

Change-Id: I2bab6a69f9f663edee0738ff35b804d81736cb5c
Closes-Bug: #1882084
2020-06-04 20:33:24 +03:00
Frode Nordahl 3765c0b123
Unpin flake8 and fix lint
Change-Id: Iacae0fc791003d7f1730363f10f509434b0e671f
2020-03-10 13:39:41 +01:00
Ryan Beisner 965aa3283e
Sync charm/ceph helpers, tox, and requirements
Change-Id: I6216604292a41c0a65509716d5ead0bb022247d2
2019-09-30 22:10:09 -05:00
Camille Rodriguez 47d00b72e2 Avoid pollution and false positives with tox.ini
- 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: I61f1ab26748ad9c2f008fb0d8f003fc2aa28d841
2019-08-27 09:29:00 -04:00
Camille Rodriguez 1497395cde Add disco-stein bundle to gate tests.
The bundle disco-stein was in the dev_bundles because
a bug with the Python 3.7 syntax prevented the success of
the deployment of HA clusters. This bug is fixed, we can
reintegrate disco-stein in the gate_bundles.

Other minor adds:
- Changing naming convention for vip: 'Amulet' is deprecated.
- Passing OS env vars

LP Related-Bug: #1823719
Change-Id: I787248ad2983858c6db2e5a838270a128dae717a
2019-08-26 11:15:53 -04:00
Zuul c496f368f7 Merge "Enable bundle specific tox zaza target" 2019-08-23 12:30:41 +00:00
Corey Bryant 800637bba8 Add Python 3 Train unit tests
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: Ia7f98b1ab89d0983b5ed0334c3796977387cc460
Story: #2005924
Task: #34228
2019-07-30 10:20:25 -04:00
Chris MacNaughton a07f29f510 Enable bundle specific tox zaza target
Change-Id: I0b38a0c194b28d0fa4792375aa5bb689a2588adf
2019-07-08 16:32:28 +02:00
Zuul d5badb2bc1 Merge "Update tox for py3 target" 2019-03-20 14:09:18 +00:00
Chris MacNaughton d1e3a7845d Configure stestr directly
Change-Id: I20ac87956a7d0cdb49012c12a194e0207eb603b9
2019-03-06 16:06:22 +01:00
Paul Goins 983af9c476 Minor updates to tox.ini for coverage target
To be in line with the other recent updates, changing the
charmhelpers/* exclusion to */charmhelpers/*, which more reliably
excludes the charmhelpers code from coverage tracking.  While this
presently does nothing differently for this charm, it's probably
better for this code to be in line with the other charms rather than
being different for no obvious reason.

Also excluding the unit_tests directory.

Change-Id: Idcc3bb494eb632b5f971ee6c44bca5284a7839a1
2019-03-01 14:28:45 +01:00
Ryan Beisner 31fa7737a4 Update tox for py3 target
Change-Id: Id25854176b62353feda343615dbdbf6c2ed06f88
2019-02-28 14:43:39 +00:00
Paul Goins a24f45e06d Added tox environment for gathering coverage
This technique was borrowed from the tox "cover" environment in
openstack/nova's tox.ini.  This leverages the fact that stestr lets
you override the python executable via the PYTHON environment
variable.  Doing this allows us to easily generate coverage for our
unit tests.

An important caveat is that this does not provide any coverage for
tests via zaza, amulet, etc.  It is purely focused on the unit tests.

Note that this replaces the previous .coveragerc; coverage
configuration is instead pulled from tox.ini.

Change-Id: I20a4f267abb05f2123000518ae9b8ec8d5f0961c
2019-02-26 13:43:18 +01:00
Zuul 8a010810cc Merge "fix tox python3 overrides" 2018-10-12 10:55:15 +00:00
Ryan Beisner 4f99f3d402 Update requirements
Re-enable charm-proof (was lost @ py3 conversion).

Also remove tests/charm-helpers if present, in favor
of the pip-installed charm-helpers.

Change-Id: I23092d7e0ecb5d2d9eeef784317566e05c81015e
2018-10-03 16:23:18 -05:00
Doug Hellmann c401d6e8c5 fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: Ib289655299f7e1dd3dd88b4fb116e7b36f14b461
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:39:22 -04:00
Alex Kavanagh 59561fdda0 Convert the charm to Python 3 only
Major changes:

 * decoupling the hooks/manager.py file from the charm.  It is now a
   script that is called from hooks/keystone_utils.py as it has to use
   the same Python version/libraries as the installed keystone payload
   software.  keystone_utils.py and manager.py communicate via a Unix
   Domain Socket using json, encoded to base64.
 * As Python3 requires absolute imports, the charmhelpers symlink has
   been removed from hooks, and the hooks and charmhelpers symlinks have
   been removed from the actions directory.  Instead, the path is
   adjusted so that the modules can be found.

Change-Id: I18996e15d2d08b1dacf0533132eae880cbb9aa32
2018-09-21 09:09:47 +00:00
Frode Nordahl 3c34a8520a
Switch functional test framework from Amulet to Zaza
Change-Id: Id55bf63cb34b6ccad876ddd47734b959c63ed742
2018-08-21 04:48:44 +02:00
Vu Cong Tuan 7721aec50a Add py36 testenv
Python 3.6 is installed by default in Ubuntu 18.04 LTS.
Therefore, according to Transition Plan [1],
it'll be handy to have py36 testenv.

For more details, please check Python2 Deprecation Timeline [2]
and Python3-first Goal - Completion Criteria [3].

[1] https://wiki.ubuntu.com/Python/Python36Transition
[2] https://governance.openstack.org/tc/resolutions/20180529-python2-deprecation-timeline.html
[3] https://review.openstack.org/#/c/575933/8/goals/stein/python3-first.rst@42

Change-Id: I41eb6ecb09b3862fc5d5d5530623d594085acf0a
2018-06-28 08:26:47 +07:00
David Ames ce8f8d2392 Enable Bionic as a gate test
Change bionic test from dev to gate for 18.05.

Change-Id: I1cea7c9773a06eafa84ec6e4303cfc49219823a7
2018-05-09 09:33:56 -07:00
Ryan Beisner 0c6bfe96e9 Update tox.ini to stop using unverified package
As of pip 10.0, --allow-unverified is not permitted.

Use of the flag in this repo was previously used to force
installation of python-apt to accommodate certain unit tests.

The unverified package, python-apt, is no longer necessary
for test execution.

Related-Bug: #1760720

Change-Id: Ieca3f4978e947ce52d645ddab0f4523c90d03c75
2018-04-03 16:22:57 +00:00
Ryan Beisner 5f16698677 Sync charm-helpers
Change-Id: I28e9aa3687e24cacb70a2a54f1306f6be86f4c74
2018-02-21 14:08:55 -06:00
David Ames 7ecfa30b00 Enable xenial-pike amulet test
Make default func27-smoke xenial-pike
Charm-helpers sync

Change-Id: I289d38e4170d204fbf9b0281b28be28c9e847e65
2017-11-15 16:19:26 -08:00
David Ames a7baed8c94 Enable Zesty-Ocata Amulet Tests
- Turn on Zesty-Ocata Amulet test definitions.
- Standardize test-requirements.txt
- Sync charm helpers for various fixes

Change-Id: Ia86ed2cf9557d9eb11f577d641eb3e6920ff9e3e
2017-04-28 08:42:26 -07:00
Edward Hope-Morley b0b273c675 Fix premature identity-relation poll breakage
It is possible for the keystone charm to poll identity-relation
before their remote unit has set values. This patch fixes a
corner cases that cause a hook exception under this
circumstance.

Change-Id: I3339870b87adcd712a341ae5074b4af1e924f64a
Closes-Bug: 1674786
2017-03-22 15:33:37 +00:00
Ryan Beisner 6219ebee3b Update tox.ini files from release-tools gold copy
All OpenStack Charms now contain identical tox.ini files,
not to be modified or made unique within each charm repo.

This is to ensure consistency across charm repos in tox
target naming, approach and purpose, also giving the
charm dev and test experience additional consistency.

Also create empty dirs with .keep files where necessary.
Some classic charms have actions and/or lib dirs, and some
do not. In all classic charms, flake will now check those
dirs to ensure lint coverage of existing or future content.

Change-Id: Ibaf267dc1ad5f071ab046df07ded711a184b45bd
2016-09-09 19:42:16 +00:00
Ryan Beisner e7b13ce5a3 Update tox.ini files from release-tools gold copy
All OpenStack Charms now contain identical tox.ini files,
not to be modified or made unique within each charm repo.

This is to ensure consistency across charm repos in tox
target naming, approach and purpose, also giving the
charm dev and test experience additional consistency.

Change-Id: I6e448fdad04f0548a48a7163847bb0b236114404
2016-09-06 22:08:45 +00:00
James Page 0b47a8c3d1 Use bundletester for amulet test execution
Switch to using bundletester for execution of functional tests,
leveraging tox to build out test virtualenvs.

Rename amulet tests inline with gate-* and dfs-* naming standards.

Update README to refer to functional testing section of the charm
guide.

Change-Id: I037529196125e507bb15c1b0a3681a7457a6e8d1
2016-07-18 15:50:32 +01:00
James Page 2d2f8c05f2 Update to charm-tools >= 2.0.0
The new release of charm-tools no longer ships the charm
command; update minimum version requirement and switch
to using charm-proof instead, unblocking current pep8
failures across all charms.

Also pin the version of requests to 2.6.0 until theblues
(indirect dependency of charm-tools) sort out its
requirements versioning.

Change-Id: I565d5c72aa0ea4ed297bcbef00a3bf5e97edcb84
2016-03-23 09:30:17 +00:00
Liam Young c283a1c922 Enable Keystone v3 API
This changes enables the Keystone v3 api. It can be toggled on and off via the
preferred-api-version option.

When services join the identity-service relation they will be presented with a
new parameter api_version which is the maximum api version the keystone charm
supports and matches what was set via preferred-api-version.

If preferred-api-version is set to 3 then the charm will render a new
policy.json which adds support for domains etc when keystone is checking
authorisation. The new policy.json requires an admin domain to be created and
specifies that a user is classed as an admin of the whole cloud if they have
the admin role against that admin domain.

The admin domain, called admin_domain, is created by the charm. The name of
this domain is currently not user configurable. The role that enables a user to
be classed as an admin is specified by the old charm option admin-role. The
charm grants admin-role to the admin-user against the admin_domain.

Switching a deployed cloud from preferred-api-version 2 to
preferred-api-version 3 is supported. Switching from preferred-api-version 3 to
preferred-api-version 2 should work from the charm point of view but may cause
problems if there are duplicate users between domains or may have unintended
consequences like escalating the privilege of some users so is not recommended.

Change-Id: I8eec2a90e0acbf56ee72cb5036a0a21f4a77a2c3
2016-03-09 11:05:33 +00:00
James Page be5d1d2570 Tidy tox targets 2016-02-16 07:03:45 +00:00
James Page f3dad8630e Add missing files 2015-11-03 11:02:17 +00:00