Commit Graph

13 Commits

Author SHA1 Message Date
Samuel Walladge f3a72cdc9f Update jobs to fix the CI
- remove old / deprecated zuul jobs
- update to the latest rolling python3 jobs
- update tox based on tox4 fixes
- update tox python targets
- add the platform mocking patch - copy from https://review.opendev.org/c/openstack/charm-nova-compute-nvidia-vgpu/+/899177/2/unit_tests/__init__.py

Change-Id: If77436f4c27cf719907a2888d5b1e9e6c7eb3f7c
2023-11-06 10:15:38 +10:30
Liam Young 679a76dfe5 Move common requires code
Move common requires code in to the common module so that
requires.py only contains the code which is specific to
reactive charms. This will allow for a subsequent patch which
creates a requires interface consumable by operator framework
charms.

Change-Id: I70037252cc7a677a9394929cb0cd17e9506ab624
2021-08-26 12:03:41 +00:00
Alex Kavanagh 6c611a3c61 Migrate from testr to stestr
Change-Id: I735638f91617d2e951c3ec23498c8ac116cf8f08
2021-02-10 11:18:06 +00:00
Camille Rodriguez 10af229842 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: I3e9653753f17e68a302184a734b8fbe6fbf92df8
2019-08-27 08:54:47 -04:00
Corey Bryant 0a4425b371 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: Ie5ed4bc0b8c1ecf1c870b9d7d1147c32950eec28
Story: #2005924
Task: #34228
2019-07-30 10:18:54 -04:00
Paul Goins b035ee30f1 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: Ia0f190f7de273290d01091fd9211a4bbdb688be5
2019-03-01 14:40:18 +01:00
Frode Nordahl 7c2e09450a
Fix Python3.4 compability
Add Zuul unit test job

Change-Id: I2dbcd27db0d1791c06c212b07f23d1f26e1fd5ad
Closes-Bug: #1814218
2019-02-01 14:37:33 +01:00
Liam Young ce2aa63653 Add unit tests and fix for _parse bug exposed
* Add unit tests for common.py and requires.py.
* Update tox env for above.
* Update gitignore to ignore common kruft.
* CRM._parse did not add a space when constructing 'results' after
  each argument of 'data'. This caused each element to run into the
  last.

Change-Id: I2c35820149618aae02171c89b26bf29ee5e22344
2018-12-17 16:28:35 +00:00
Doug Hellmann c7475b06be 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: Id5511088f9b29a801156231f6b95d6add8b68cd5
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:38:40 -04:00
Vu Cong Tuan d20c7bb5f2 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: I2b1942ffc66aa0c79a76182838fda0f369b24b78
2018-06-28 08:30:28 +07:00
Liam Young ad21b5daed Make specifying the nic optional
If a nic is not specified when setting up a vip resource then
corosync should just do the right thing. This change makes the nic
field optional as there is little benefit in using it.

Change-Id: I022a43df0a50a21df3c5f021dcd563da4d20db53
2018-04-17 10:18:53 +00:00
Ryan Beisner 7fc2ce2861 Add .gitreview, update tox.ini, update readme.
Change-Id: I93382fe053be5c266173f2be9c013baba4a6ee66
2016-07-06 12:56:24 +00:00
Billy Olsen a73846f575 First commit of the proposed hacluster interface.
This commit includes a rough implementation of the hacluster
interface which allows a charm to interact with the hacluster
subordintate charm.
2016-01-05 21:22:27 -07:00