Commit Graph

43 Commits

Author SHA1 Message Date
Alex Kavanagh 007f302ed6 Updates for caracal testing support
These updates, on the master branch, are to support testing the caracal
packages and support of the charms for caracal.  They do NOT lock the charms
down, and don't change the testing branches to stable branches.

Change-Id: I6f8bd495a2078b5683a05a63124d7902d0a86f74
2024-02-24 19:57:42 +00:00
Corey Bryant 05efc621c4 Add Antelope support
* sync charm-helpers to classic charms
* change openstack-origin/source default to antelope
* align testing with antelope
* add new antelope bundles
* add antelope bundles to tests.yaml
* add antelope tests to osci.yaml and .zuul.yaml
* update build-on and run-on bases

Change-Id: I70cadc739d692cf442aef8012477e89a9601c06f
2023-03-07 20:07:40 +00:00
Liam Young 83b866eaac Fix charm for tox4 compatibility
Related-Bug: 2002788
Change-Id: I716fb1056d5e603a9e0e6414fa46df5b4ae1031d
2023-01-17 17:50:03 +00:00
Corey Bryant f9206facde 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: I8f2c34f3a4a0601ee19aa694b323cc0f9ee65616
2022-08-26 18:40:41 +00:00
Alex Kavanagh 97f0144739 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: Ia0cdf927a4d4d2339ca1739066bf9a965c97d190
2022-04-06 10:54:36 +01:00
Alex Kavanagh 1c7f320cb6 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: I7c695c77c67f43f02c72c3b50d949c451be53bc3
2022-02-19 15:17:08 -07:00
Corey Bryant e0a38a6393 Add yoga bundles and release-tool syncs
* charm-helpers sync for classic charms
* sync from release-tools
* switch to release-specific zosci functional tests
* run focal-ussuri as smoke tests
* remove trusty, xenial, and groovy metadata/tests
* drop py35 and add py39

Change-Id: I8f7e9ee598a5fc218ccd68f4af36ea323af08bbb
2021-11-19 14:28:42 -05:00
Alex Kavanagh 222530b515 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

Change-Id: I1dadd96087714bf5a88f324d615d2c3126f66690
2021-09-27 15:51:23 +01:00
Aurelien Lourot 27df75e61a 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: I6e7a1c719921d48745e047af46017a43ff927643
2021-07-22 14:58:51 +02:00
Aurelien Lourot 9f29f8753a 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
https://github.com/openstack-charmers/release-tools/pull/127
https://github.com/openstack-charmers/release-tools/pull/129

Change-Id: I127b8a2636857f1bddfb6d78175370421a4c7ab8
2020-12-15 11:18:17 +01:00
Alex Kavanagh 1beb8444b4 Sync libraries & common files prior to freeze
* charm-helpers sync for classic charms
* charms.ceph sync for ceph charms
* rebuild for reactive charms
* sync tox.ini files as needed
* sync requirements.txt files to sync to standard

Change-Id: Ie7640826be5426157c57877348cef43ab6067543
2020-09-28 09:37:24 +01:00
Aurelien Lourot c4eaed25f2 Migrate functional tests from Amulet to Zaza
Change-Id: Ief33e4bebff904778df18fafb77c318ec212677b
Closes-Bug: #1828424
Func-Test-PR: https://github.com/openstack-charmers/zaza-openstack-tests/pull/233
2020-04-19 17:02:22 +02:00
Corey Bryant d565a0204b Enable functional tests for bionic-train
This patch also updates the smoke test to run bionic-train.

Change-Id: I6c063ca760a9d48f632d6cac095f4b12cd66db3c
2019-10-22 15:17:40 -04:00
Ryan Beisner cbf5b0bff8
Sync charm/ceph helpers, tox, and requirements
Change-Id: If70d66e7f279e9052fbafaa55019cb4a1754bc95
2019-09-30 21:43:36 -05:00
Camille Rodriguez b103ab19dd 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 small additions:
- 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.

LP Related-Bug: #1823718
Change-Id: Iaeca60d35c3f849fd69f7b3798d3a791c8635bae
2019-09-05 12:14:58 -04:00
Edin Sarajlic a6461cbb9f
Patch DNS lookups in Unit tests
Currently the unit testing suite has a minimal set of IPs
hard-coded (in the subnet 10.0.0.0/8). The failing unit tests call
functions that will perform DNS reverse lookups on the hard-coded
IPs. In the event that a DNS server is unavailable, or misconfigured,
the DNS lookups will result in a Python Exception being thrown,
causing the unit tests to fail.

This solution patches DNS lookups to return None result.

Also add OS_* to tox passenv to resolve the http proxy issue in
retrieving the cirros image.

Change-Id: I7a519fbe7fba5f3aefd22c57b8d44e3b39c99582
Closes-Bug: #1841806
2019-09-04 15:35:18 -05:00
Zuul 6763c2d168 Merge "Add Python 3 Train unit tests" 2019-08-13 17:45:32 +00:00
Corey Bryant dae6d383fc 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: I54278e976568bbf050cd71c17b01d3aa31317464
Story: #2005924
Task: #34228
2019-07-30 10:14:17 -04:00
Chris MacNaughton 764b8027b3 Sync charm-helpers
Change-Id: I7436d0d90b90fb1b6f97259387d11d879eee3a1c
2019-07-16 07:06:03 +00:00
Alex Kavanagh afa3c9a58e Refactor ssh_known_hosts_lines() and ssh_authorized_keys_lines()
Refactor ssh_known_hosts_lines() and ssh_authorized_keys_lines to be
easier to maintain and only call rstrip() once (per function).

Change-Id: Id2774bb1551e4826a2fd71d1a371d65ab2439a7d
2019-07-03 14:18:16 +01:00
James Page dd3fdda86d Switch to direct execution of stestr for unit tests
Drop dependency on ostestr, switch to using stestr run.

Change-Id: Idf1ddc01f891d58fecd7be119da9e8b1f124b5e0
2019-03-06 12:34:52 +00:00
Paul Goins 8e77f1f61b 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: I05541dfb69ddf2f2999a7b9f7659927df5c4ef56
2019-03-01 14:42:34 +01:00
Zuul e18da8a72f Merge "Update tox to remove py27 target" 2018-12-06 04:20:51 +00:00
Ryan Beisner 9214f1e206
Update tox to remove py27 target
Change-Id: I26aa26b87d731946dac12da5a356b757551925cf
2018-11-02 16:29:59 -05:00
Doug Hellmann 39e7ad7d3b 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: Ibd3e67980f97843e07572de1dafff03a1f5126c7
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-10-31 19:32:58 +00:00
Billy Olsen dc56287105 Don't resume service if unit is paused
Disabling the single-nova-consoleauth while the unit is paused
will restart the nova-consoleauth service on the local unit.
This patch only resumes the service locally if the local unit
is not currently paused.

Change-Id: Id66375ab758e1b33b96a819d2ce788a4434b1686
Related-Bug: #1765215
Related-Bug: #1705514
2018-10-31 10:39:09 +00:00
Liam Young c7d8b7bfd9 Reenable nova-cloud-controller unit tests
Change-Id: Iad1503f42b4a49e61476da22d5eeba090ba4af17
2018-10-31 08:13:50 +00:00
Alex Kavanagh 9c12812735 Switch the charm to support py3
Some major changes:
* the charm has been rebased (from a Python perspective) to be rooted in
  the charm directory.  This is a single root.
* Imports have been changed so that the don't add lots of imports to the
  namespace of the module doing the import.
* The code that used to run at module import time has been made lazy
  such that it only has to run if the relevant functions are called.
  This includes restart_on_change parameters, the harden function and
  the parameters to the guard_map.  Appropriate changes will be
  submitted to charm-helpers.
* Several tests had to be re-written as (incorrect) mocking meant that
  text fixtures didn't actually match what the code was doing.  Thus,
  the tests were meaningless.
* This has had a net positive impact on the unit tests wrt to importing
  modules and mocking.

Change-Id: Id07d9d1caaa9b29453a63c2e49ba831071e9457f
2018-10-18 15:43:03 +01:00
Corey Bryant d5c5cccb0a py3: Switch to using Python 3 for rocky or later
Switch package install to Python 3 for OpenStack Rocky or later.

When upgrading, remove any python-* packages that were explicitly
installated and then autoremove --purge any dependencies that are
no longer required.

Change-Id: I87ee4a0a854f88b931093f6245a3a1057bf56c57
2018-10-04 11:19:06 +01:00
Vu Cong Tuan 8fdf795d76 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: Ic149a635bc28e63b60afbc7eaeb483e7ddeee2a2
2018-06-27 15:06:07 +07:00
David Ames f03ccf02b7 Enable Bionic as a gate test
Change bionic test from dev to gate for 18.05.

Change-Id: I5a82ac79b29181fabec41570cd5aa003d2bfb8ea
2018-05-11 16:12:20 -07:00
Ryan Beisner dc4f54a6e3 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: I9d5b2d5139ed61ff9d7f116c33e3e145362b46e1
2018-04-03 16:33:35 +00:00
Ryan Beisner f5213021b7 Sync charm-helpers
Change-Id: If5ce5cd9b5aa88ec4b12b1087fc9ee4770a4be0a
2018-02-21 14:09:38 -06:00
Andrew McLeod 93bd3d7279 Enable xenial-pike amulet test
Make default func27-smoke xenial-pike
Charm-helpers sync

Change-Id: If2de44a0661aaa4679c7ed4c8bfe99e56fb8c24d
2017-11-16 15:41:44 +13:00
David Ames 91713886a6 Enable Zesty-Ocata Amulet Tests
- Turn on Zesty-Ocata Amulet test definitions.
- Standardize test-requirements.txt
- Sync charm helpers for various fixes

Change-Id: I8dbbc66b2aaaee90c6565eea1fafb324f3e51734
2017-04-28 07:47:51 -07:00
Alex Kavanagh f9b97ac66c Fix alphanumeric comparisons for openstack and ubuntu releases
- sync charmhelpers with fix-alpha helpers
- fix up code where the alpha comparisons are done
- fix tests which assumed mocks would just work on os_release()

Change-Id: I48b4853ed343bd3188c16f2bc432b4ca0badc473
Related-Bug: #1659575
2017-04-27 10:52:43 +01:00
Ryan Beisner 698701f56a 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: I8cc9b08f96519f93a06bdc5e273000b9dce51d8d
2016-09-09 19:43:30 +00:00
Ryan Beisner bcdac5541b 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: I9541f12fbf1a9b8a51a431c33fc984ac38bde177
2016-09-06 22:09:27 +00:00
James Page 3e0520aef7 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: Id353b3a1c8a74d8b2bed7fe0490090b5273e228f
2016-07-19 10:21:50 +01:00
James Page 60377b524f 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: I92961bab236d948288d986d7edeaa63231011f26
2016-03-23 09:30:17 +00:00
James Page a29f1e3907 Tidy tox targets 2016-02-16 07:05:29 +00:00
Corey Bryant 237e535c7f [james-pages,r=corey.bryant] Add tox support for lint and unit tests. 2015-11-02 21:16:37 +00:00
James Page b01e50663c Add tox support 2015-10-30 15:28:07 +09:00