18 Commits

Author SHA1 Message Date
Pete Vander Giessen
62ef2303ca Replace ostestr with stestr in testing framework.
A system upgrade broke ostestr. We can fix it by just calling stestr
directly.

Change-Id: I54762881d7356e3ded38a11f00600e3ded6acf7a
2019-03-07 17:10:57 -05:00
Paul Goins
f80cadabb1 Excluding unit_tests from coverage
Unit tests generally will all be executed, and measuring them will
skew the overall coverage numbers.  Thus, I'm excluding the unit_tests
folder.

Change-Id: Iec5e57b305615d4d3fe87cb46b771d92d14a5195
2019-03-01 15:03:10 +01:00
Paul Goins
af19e67961 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: I2a14d3a3b0215aa637bc18e780d1ad765c796daa
2019-03-01 11:11:06 +01:00
Alex Kavanagh
9802731e58 Migrate charm to python3 only runtime
Change-Id: I921f3e2fc8250ca7250ca7dfc47e12644ce4ef98
2019-01-31 22:05:20 +00:00
Doug Hellmann
764804a1be 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: I2068cc2748021157c6d5e4f4b6cbd85790dd11b7
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-11-02 00:55:46 +00:00
James Page
3f3eb45777 py3: Enable Python 3 at Rocky
Misc updates for rocky:

  - Switch default smoke test to bionic-rocky
  - Resync charm helpers

The change for this charm is minimal as it directly uses
ceph-common.  The cinder charm actually deals with installation
of the required python-rados/rbd libraries for the ceph
integration.

Change-Id: Ic2ee4b845ab604d80b7e27492f522d57f9463af1
2018-09-18 15:08:48 +02:00
Nguyen Van Duc
e5ff9faf68 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: I36cfee00be360654937cfd6f5b0cd630c84e103d
2018-07-12 17:52:13 +07:00
David Ames
65a188172f Enable Bionic as a gate test
Change bionic test from dev to gate for 18.05.

Change-Id: I808c6451583d66c8b8a17ed1bffc8a37660f6022
2018-05-16 13:28:02 -07:00
Ryan Beisner
1abf731e37 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: I9516fa288f9b04c8822c707e8649916a3f8e0fc6
2018-04-03 16:38:46 +00:00
Ryan Beisner
1a956ebf73 Sync charm-helpers
Change-Id: Iac5794aec967ffc85a42659d469769a63b2cf428
2018-02-21 14:08:15 -06:00
Ryan Beisner
34f39329c0 Update amulet test definitions
Also sync charm-helpers

This change requires the following charm-helpers change
to land first:

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

Change-Id: I2c33e25e14ad49d65f5fc7eb000830086cf829c1
2017-12-06 15:39:54 -08:00
David Ames
6287e25ce5 Enable Zesty-Ocata Amulet Tests
- Turn on Zesty-Ocata Amulet test definitions.
- Standardize test-requirements.txt
- Sync charm helpers for various fixes

Change-Id: I4ddc4d75eb86210abb073a92d8ed217a3f39fa55
2017-04-28 08:42:11 -07:00
David Ames
ff9136ae5a Enable Ocata Amulet Tests
- Add Zesty as a supported series to metadata.yaml.
- Turn on Xenial-Ocata Amulet test definitions.
- Sync charm helpers to get Juju 2.x amulet compatibility.
- Keeping Zesty-Ocata Amulet test definitions turned off until the
  metadata.yaml changes propagate to the charm store.

Change-Id: Idf45ef0e0587e6874e29145c7ce1109be7cc4e50
2017-03-28 17:38:14 +01:00
Ryan Beisner
d9e0ba7a7f 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: I671077fbafb38bd4d2005fb2236bec416f79593f
2016-09-09 19:22:05 +00:00
Ryan Beisner
695848f0ba 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 block.

Change-Id: I91e638f98f70c7098f089c7e60c1181632b39222
2016-07-20 03:34:22 +00:00
James Page
92f69b1444 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: I9ffc23d111d35833dc44fc33a27111bed55b6577
2016-03-23 09:30:16 +00:00
James Page
cc49cfa67c Tidy tox targets 2016-02-16 07:01:31 +00:00
James Page
2fb135098d Add tox support 2015-11-03 14:16:36 +00:00