Commit Graph

11 Commits

Author SHA1 Message Date
Hervé Beraud 4cae88ff57 Use unittest.mock instead of mock
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.

Note that https://github.com/openstack/charms.openstack is used during tests
and he need `mock`, unfortunatelly it doesn't declare `mock` in its
requirements so it retrieve mock from other charm project (cross dependency).
So we depend on charms.openstack first and when
Ib1ed5b598a52375e29e247db9ab4786df5b6d142 will be merged then CI
will pass without errors.

Depends-On: Ib1ed5b598a52375e29e247db9ab4786df5b6d142
Change-Id: I17855080c832cd94783c279449f17c58ab5e3d9c
2021-12-15 09:56:53 +00:00
Alex Kavanagh 1be4ff0776 Migrate from testr to stestr
Change-Id: I6ab87f81b61e41c9b53b7f88912b927ca3ea41de
2021-02-10 12:11:41 +00:00
inspurericzhang deb7f5df41 Switch to Ussuri jobs
Change-Id: Ib26bdacadba617e0f2e95ad80ae35b5e5caaedd4
2019-10-31 17:43:22 +08:00
Camille Rodriguez 6d6106a3d3 Add disco-stein bundle to gate tests
This project does not have func tests, however these changes are in line
with a batch of changes over all charms, so I kept the same title for
reference.
Changes:
- 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: I5241afe9b0bdcfd8b7cd61d1395259d0bb96cae2
2019-08-26 17:39:29 -04:00
Corey Bryant 3d2a4404de 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: Ib7a01208cf4fe7b27dac72c5e6b95eafcd3f67a3
Story: #2005924
Task: #34228
2019-07-30 10:18:05 -04:00
OpenDev Sysadmins 47b903239e OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:42:56 +00:00
Paul Goins 39080541dd 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: I03bf73856dfd850c6c84a82745d0d161b0e9f538
2019-03-01 15:03:16 +01:00
Paul Goins 2c57ab6dcd 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: Ie48022dcbdb3dce7510a845f177804f2539c07c7
2019-03-01 11:34:03 +01:00
Frode Nordahl 498279adb1 Add repo config
Change-Id: Ie3dd7fa3ed98cbdc82abecad44114c6c7b731450
2018-11-14 15:39:18 +01:00
Frode Nordahl 82acd4465e
Add barbican-secrets interface code and unit tests 2018-10-17 16:20:39 +02:00
Frode Nordahl ea50b1e502
Initial commit of charm interface skeleton 2018-10-11 11:46:45 +02:00