Commit Graph

25 Commits

Author SHA1 Message Date
Hervé Beraud 33bcde1011 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: I0550ad77a072d7edb083f24b260cbe034c8b9c75
2021-12-15 09:52:37 +00:00
Alex Kavanagh da16f31731 Migrate unit tests from testr to stestr
Change-Id: Icc61c198a2df0879bdf3cd2458ec827e2ed04d7c
2021-02-10 11:12:34 +00:00
Ghanshyam Mann c3d9d2ad6d [ussuri][goal] Updates for python 2.7 drop
OpenStack is dropping the py2.7 support in ussuri cycle.

charm repos need few updates on either py2 drop or updating
ussuri python template, tox.ini etc.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: Ia09eea20e0c425da01f1d02dd3915bcb2da8b245
2020-03-24 18:29:01 -05:00
inspurericzhang eb1f0a7b7e Switch to Ussuri jobs
Change-Id: I8c3cab09d2691fec361b1913a9c5bc83e82c65f0
2019-10-31 18:00:50 +08:00
Frode Nordahl 574a0c2837
Support database migrations
A charm may request principal to perform a DB migration.  The charm
may also optionally flag that interface availability should be
gated on the completion of the requested DB migration.

Change-Id: Id9ed69880f06b835ff2385721d4cb22e47f37c5d
Depends-On: Iaefcb81fff5ed8a9441c93ac4c8bac3fa12eef15
2019-09-30 08:21:45 +02:00
Frode Nordahl 4f7dba3da8
Extend configurable variables and retrieve config data
Gate ``available`` state on remote end signalling availability.

Depends-On: I9eb5f8a6039b74288a395a584f844507448cdc23
Change-Id: I44a23549e4830d89ba3182250c40dfe395767fb0
2019-09-30 08:21:20 +02:00
Frode Nordahl 1ab760f201
Add unit tests
Change-Id: I3e00a814f6228c9ad4a5833b147ab170c8e3d187
2019-09-24 16:21:54 +02:00
Camille Rodriguez ea3f7e846b 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: I77d021dfa8654ab9366bd50f67e4bdbdd17dc1db
2019-08-27 09:08:00 -04:00
Corey Bryant eec03efb47 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

Change-Id: I1b68cae8e1e131bab76c20074cf21b1c654f0271
Story: #2005924
Task: #34228
2019-07-30 10:14:06 -04:00
Ghanshyam Mann 575c16cdb2 Dropping the py35 testing
All the integration testing has been moved to
Bionic now[1] and py3.5 is not tested runtime for
Train or stable/stein[2].

As per below ML thread, we are good to drop the py35
testing now:
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/005097.html

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004647.html
[2]
https://governance.openstack.org/tc/reference/runtimes/stein.html
https://governance.openstack.org/tc/reference/runtimes/train.html

Change-Id: Iba77c5d4839ebec4b709e79ce46526d69b982ec1
2019-04-23 17:32:32 +00:00
OpenDev Sysadmins bc6ee31709 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:33:54 +00:00
zhulingjie c6deebab3f Change openstack-dev to openstack-discuss
Change-Id: I81dae20ab1c2556985de65b363e5e7751fb44d4b
2018-11-18 03:08:55 -05:00
Nobuto Murata 46e001d36c subordinate_configuration in the interface expects a dict
When a subordinate charm doesn't provide an explicit value for the
optional "subordinate_configuration" arg, the error "TypeError: argument
of type 'NoneType' is not iterable" happends. Because the principal
charm expects it as a dict as documented in the interface. So let's use
a empty dict as the fallback value.

Change-Id: Ib8456ab32ec8ee5bee160d0b38a61b7ee43e16ca
Closes-Bug: #1803040
2018-11-14 10:51:51 +09:00
Doug Hellmann fcf04868ab 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: I87cec522de2e0f13119701e44a6226c9a4e85e36
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-10-13 07:43:49 +00:00
Doug Hellmann 68e6772bbf Fix repo setup
Add .zuul.yaml,
add .gitreview configuration file

remove installation of python-apt, it breaks build and is not needed.

Change-Id: I99b87a480253d1018bb8cdb55e1766c4f07ba9dc
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-10-13 09:23:07 +02:00
Liam Young 4877768b01 README update 2016-09-15 07:38:43 +00:00
Liam Young e74ac1b6cc README update 2016-09-15 07:37:26 +00:00
Liam Young 85f776e541 Added readme 2016-09-15 07:34:54 +00:00
Liam Young efe2305668 Add standard available state 2016-09-14 15:58:00 +00:00
Liam Young 2b795745e1 Generl tidy, docstrings, copyright, tox.ini etc 2016-09-12 15:02:22 +00:00
Liam Young 365cd84af0 Fix plugin name 2016-09-12 13:45:34 +00:00
Liam Young bba0039e0d Fix missing uuid import 2016-09-12 10:34:04 +00:00
Liam Young 7fdf92e499 Add remote restart support 2016-09-12 09:36:40 +00:00
James Page c6469fc1dc Fixup for new reactive package naming 2015-11-04 13:39:55 +00:00
James Page be82dfb140 Initial commit of interface 2015-07-15 17:06:36 +01:00