Commit Graph

32 Commits

Author SHA1 Message Date
Alex Kavanagh d73b7f0e4e 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: I02c43750f4c910eb5ce55cc6040f6ea50bd419b2
2024-02-24 19:53:14 +00:00
Alex Kavanagh d00d011c18 Improve platform mocking
Patch out charmhelpers.osplatform.get_platform() and
charmhelpers.core.host.lsb_release() globally in the unit tests to
insulate the unit tests from the platform that the unit tests are being
run on.

Change-Id: Ice2a2d2379349c8cf7d77027cbca78b19e9d72d1
func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/1170
2023-11-09 07:31:46 +00:00
Corey Bryant 9a3334bf0f 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: I49cade430fa875816b785d72252bd3d34cb787df
2022-08-26 18:40:30 +00:00
Alex Kavanagh 9e38ea454e 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: Ifbf5da17ceb179bfc5d9248494a8a552f7880b3a
2022-04-11 07:56:13 +00:00
Alex Kavanagh 110fcddcf7 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: I41b2b99a832879e786936f34937c6c876439e924
2022-02-22 08:06:40 +00:00
Corey Bryant 79a00cad81 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

Depends-On: https://review.opendev.org/c/openstack/charm-cinder/+/814177
Change-Id: If8894bf0150c7fd0a73d70d20753d67efe92c0b8
2021-11-17 13:48:38 -05:00
Alex Kavanagh 3f9e52dd49 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: Ic4949d2152579e2d5cbcd7e6ee8edd749da5b7d4
2021-09-22 14:51:04 +01:00
Aurelien Lourot 21e28278db 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: I767dc8b085c61a5f4349c8865f0016a064a58297
2021-07-22 14:53:12 +02:00
Aurelien Lourot fa735fadc7 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: I7a81f9dd0e94a13cc04e19fd11017efb9455f435
2020-12-11 13:55:05 +01:00
Alex Kavanagh bf41f03ee9 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: Ide0a96c29f72b5233fc9b154e32c054591348191
2020-09-28 12:56:59 +01:00
Aurelien Lourot f5eacbd0c9 Fix Zaza tests, pre-freeze 'make sync' and Python 3.8 support
Change-Id: If2ac13d703f2f7b6af19f5beba5ae898c64f8584
Closes-Bug: #1828424
2020-05-12 13:50:19 +02:00
Natalia Litvinova 478cda6ad6 Migrate functional tests from Amulet to Zaza
This patch migrates functional tests from Amulet to Zaza.

func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/70

Change-Id: I92f0a9bdd3677200c775dc82695a3b950a51aac9
Partial-Bug: #1828424
2019-10-09 10:14:32 +03:00
Ryan Beisner 99da41166c
Sync charm/ceph helpers, tox, and requirements
Change-Id: I25dd883c61f6261901a76800d17ad982cb23177e
2019-09-30 22:41:36 -05:00
Zuul 3bacb92825 Merge "Add Python 3 Train unit tests" 2019-08-13 18:14:19 +00:00
Corey Bryant 4b031f0b4c 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: I61183c0f3fd3baf013edc0eeda1503513127a17d
Story: #2005924
Task: #34228
2019-07-30 10:20:21 -04:00
Chris MacNaughton c3b57d2860 Sync charm-helpers
Change-Id: Ie410edc7433de45b895a0fe9940e70513df15caa
2019-07-16 07:06:06 +00:00
Pete Vander Giessen adfd600034 Replace ostestr with stestr in testing framework.
A system upgrade broke ostestr. We can fix it by just calling stestr
directly.

Change-Id: I6c3f97d94d26f01b08cdb20421f6637ab2ba4345
2019-03-07 17:10:51 -05:00
Paul Goins 14507e4ea7 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: Iadfc6d9775269a9ede7bd35c5c455342696ffce9
2019-03-01 14:38:55 +01:00
Alex Kavanagh a53b14a19b Convert the charm to Python3
Change-Id: Ibdb9e582d75fd0c7cd130dddae9966aac5da3279
2019-02-13 16:24:29 +00:00
Doug Hellmann b7fde9532f 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: Id678d06c87706dded4740cb5e1d6380f2b02418f
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-11-02 00:59:39 +00:00
James Page 131a849452 py3: Switch to Python 3 at Rocky
Misc updates to support the switch to Python 3 for Rocky:

  - Change default smoke test target to bionic-rocky
  - Resync charm helpers

Charm does not directly install any python packages, so
cinder charm will deal with upgrade and switch to py3.

Change-Id: I77d412a62f4a5362c7221b869f4f9c03d5d87737
2018-09-18 15:12:47 +02:00
Nguyen Van Duc 2a6922783b 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: I7cd58d35fba69c0f64d5303b48c5bce0816ff36c
2018-07-12 16:04:39 +07:00
David Ames bb4e4912c7 Enable Bionic as a gate test
Change bionic test from dev to gate for 18.05.

Change-Id: I4d82f73b7b83d5bb597147663d424554d34d7e76
2018-05-17 23:29:16 +00:00
Ryan Beisner 10de49722d 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: Iaa9b4ead84bdcefe8fe389abc89be6f8e00a04a9
2018-04-03 16:40:08 +00:00
Ryan Beisner 5c0e2c8c3a Sync charm-helpers
Change-Id: Ide6ee5ebf067dde8fc4118f371a3d759030102c0
2018-02-21 14:08:06 -06:00
Ryan Beisner 4e70770d67 Update amulet test definitions
This change requires the following charm-helpers change
to land first:

 - https://github.com/juju/charm-helpers/pull/32

Change-Id: Iae88b2c11fe9ddcc176075f54a8c075d2dc3ba4c
2017-12-06 15:42:22 -08:00
David Ames d05b43970b Enable Zesty-Ocata Amulet Tests
- Turn on Zesty-Ocata Amulet test definitions.
- Standardize test-requirements.txt
- Sync charm helpers for various fixes

Change-Id: I81aba6403759fb973c3c2b0b4b0fab875ec5fc3b
2017-05-02 14:19:39 -07:00
Alex Kavanagh b29534d990 Fix alphanumeric comparisons for openstack and ubuntu releases
- sync charmhelpers with fix-alpha helpers
- fix up code where the alpha comparisons are done

Change-Id: If7d31bbd11cc1c445fc1ac82bd0d4a5097b3f52a
Related-Bug: #1659575
2017-03-28 15:12:10 +01:00
Ryan Beisner 12d6eff2dd 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: I2121c10e2547d12c7f818adf237663814b63cf14
2016-09-09 19:22:03 +00:00
Ryan Beisner e460db6f64 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-*, dev-* and dfs-*
naming standards.

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

Also remove brittle auth conf checks which are failing at
cinder-ceph master. Even without those explicit checks, if auth
fails, functional tests will still fail and catch issues in gate.

Change-Id: I7b0009fa0e29dcaf7d6e5607af7b397e437aac79
2016-07-20 04:00:40 +00:00
James Page a133878bb1 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: Ib15828dbbedf2648769bdc06d620fa164f707061
2016-03-23 09:30:16 +00:00
Billy Olsen 421cdd642f Use tox in Makefile targets
Modify the Makefile to point at the appropriate tox targets
so that tox and Make output can be equivalent. This involves
mapping the lint target to the pep8 target and the test target
to the py27 target.

Add tox support to the charm.

Change-Id: I7c8078ebaac1bcfbc9993330127182ffe85a2220
2016-03-16 22:31:27 +00:00