Commit Graph

17 Commits

Author SHA1 Message Date
Alex Kavanagh 4bf72620c3 Fix detection of already initialised lxc storage pool
The related bug was caused because the charm did not detect when
the lxc storage had already been set up using the `lxc storage`
command which is used in the 3.x series, rather than the old way
with the 2.x series.

Also fixes issue on xenial where linux-image-extra-* has been renamed to
linux-modules-extra-* from from -4.4.0-145-generic onwards.  Otherwise,
the install fails on xenial.

Change-Id: If8bdad6f5641ee21fc7860dceeb4c3facbaecc76
Closes-Bug: #1825393
2019-04-23 21:35:42 +01:00
Pete Vander Giessen 21335bc211 Replace ostestr with stestr in testing framework.
A system upgrade broke ostestr. We can fix it by just calling stestr
directly.

Change-Id: Ifcfd80384205072c3c195e2a1261e788be4d0cd6
2019-03-07 17:11:50 -05:00
Doug Hellmann e2a5aec2cd
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: Ib824a32b3135ccc6a6d64f41f5172838677b0189
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-11-02 12:13:51 -05:00
Ryan Beisner 7b9ed48f9e
Fix lint in unit tests re: py3-first and py2 compat
Change-Id: Icdcbeaffac1b001dcffbbf9376ef2b90c373f170
2018-11-01 22:39:54 -05:00
Corey Bryant e88e36dc2c Switch default smoke test to bionic-rocky
Change-Id: I508d16837ef41d4b83b40e608ae75de11d212bdd
2018-09-24 19:28:40 +00:00
Vu Cong Tuan 81e9f66574 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: Ied95af0b15b9adea4e942d01a4148d7faf28fda5
2018-06-28 08:18:08 +07:00
David Ames 2a4ada192d Enable Bionic as a gate test
Change bionic test from dev to gate for 18.05.

Change-Id: I45fec42fedc69430c3dbbdc752b7301efc168a8e
2018-05-09 09:34:01 -07:00
Ryan Beisner c17459aeea 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: Ic1e032c4fde7987511dfce143084b12530af8d19
2018-04-03 16:24:02 +00:00
Ryan Beisner 7d5d65b15e Sync charm-helpers
Change-Id: I416f1a910386a5edbc868668710c509e6316117c
2018-02-21 14:09:05 -06:00
Andrew McLeod c6ae48be4a Enable xenial-pike amulet test
Make default func27-smoke xenial-pike
Charm-helpers sync

Change-Id: I2af5a7bdcb956889f9e7140e67ec51a969eee379
2017-11-18 13:21:37 +13:00
Alex Kavanagh 62860678f4 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: I9176ea3be01146b18888266ba53a9d37439ea492
Related-Bug: #1659575
2017-04-27 16:18:50 +01:00
David Ames 723b09e342 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.
- Resync tox.ini to resolve amulet test failures.

Change-Id: I3cbc8f411dc9a4cfa6187be280dc2c43be64b611
2017-03-22 11:24:33 +00:00
Ryan Beisner ef5a16818b Update Amulet defs, series metadata and c-h sync
- Sync charm helpers if applicable.

- Fix test executable hashbags for virtualenv prep.

- Add Yakkety-Newton Amulet test definitions.

- Prep Xenial-Ocata Amulet test definitions (not yet enabled).

- Prep Zesty-Ocata Amulet test definitions (not yet enabled).

- Add Zesty charm series metadata.

- Remove Precise charm series metadata if present.

- Remove Precise Amulet test definitions if present.

- Add CS_API_TIMEOUT & CS_API_URL to tox.ini to control
  charmstore interaction in Amulet tests

- Create flavors to fix Newton+ Amulet tests.

Change-Id: I151692df2149fa0c1b882230508e9db760a277a0
2016-12-01 19:03:58 +00:00
Ryan Beisner 07daef9976 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: I44b560b74ea2be71859fe0386105ab20f9900a76
2016-09-09 19:22:09 +00:00
Ryan Beisner f2b4efc96f 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.

Change-Id: I892dfad152eff14d7e67313197c61dacc4a9eca2
2016-07-20 21:54:09 +00:00
Paul Hummer 2b42780d52 Fix lxd thinpool creation.
Force creation of the lxd thinpool.
Re-enable lvm tests.
Ignore charm temp and pyc files.

Change-Id: I8887f3231e789ab58c548ba583740035151097aa

Fix lxd thinpool creation.

Force creation of the lxd thinpool.
Re-enable lvm tests.
Ignore charm temp and pyc files.

Change-Id: I8887f3231e789ab58c548ba583740035151097aa

Add simplejson to requirements.

Change-Id: I2bc3992a020892fbd5af139f538d6e2069496ef2

Add unit tests

Change-Id: Iaeaa554eb05e2dd015ea699741a3d4d378e7dbc1

Fix lint.

Change-Id: I5e8a2b94ed434cf5338eb3925cd3a7342cc85360

Unify both Makefile and tox calls.

Change-Id: I0c8b35e5d777ea221a34521a258e26c4029fdccd
2016-03-23 14:41:04 -06:00
Chuck Short 9ff5dc6ecc Add test infrastructure 2016-02-25 11:02:07 -05:00