Commit Graph

63 Commits

Author SHA1 Message Date
Elod Illes f6a5996092 Fix deprecated zuul queue syntax and other gate issues
There are multiple issues with the gate. This patch combines the fixes
to unblock the gate.

1. Zuul deprecated (and removed) declaring shared queues at a pipeline
level [1]. This patch fixes the syntax to make the gate work again for
freezer.

2. Zuul CI jobs default nodeset is now Ubuntu 22.04 Jammy Jellyfish,
that does not provide anymore python2 binary, so python-dev needs to be
removed from bindep.txt

3. Latest tox does not allow to list the passed environment variables
in one line separated by space. One option is to list them in separate
lines. Also, external command allowing variable name changed.
basepython as python3 is also conflicts now and it is not necessary.
It looks like tox requires now to install now explicitly all the
requirements listed in requirements.txt.
tox.ini is updated accordingly to the above listed problems.

[1] https://lists.openstack.org/pipermail/openstack-discuss/2022-May/028603.html

Change-Id: I3c95bb48c7fdd0c752db121f1745f64a53b5a0e5
2023-02-23 16:26:54 +01:00
Cai Hui 111dfafb62 Dropped the python 3.6/3.7 in zed cycle testing runtime
In Zed cycle, we have dropped the python 3.6/3.7[1] testing
and its support.

[1] https://governance.openstack.org/tc/reference/runtimes/zed.html

Change-Id: If6c82699a088644aa7515021f62b1d08cb6c61fb
2022-05-15 09:11:59 +08:00
Cai Hui 14560b4e77 Drop lower-constraints.txt and its testing
As discussed in TC PTG[1] and TC resolution[2], we are
dropping the lower-constraints.txt file and its testing.
We will keep lower bounds in the requirements.txt file but
with a note that these are not tested lower bounds and we
try our best to keep them updated.

[1] https://etherpad.opendev.org/p/tc-zed-ptg#L326
[2] https://governance.openstack.org/tc/resolutions/20220414-drop-lower-constraints.html#proposal

Change-Id: I08cdfa48c8d7366e40b32e54d1f2252fcbcddab8
2022-05-08 21:05:10 +08:00
Cai Hui 8003eea9d1 Add python3.9 in tox
Add python3.9  CI  job.

Change-Id: I85674c664821aa2370d4f0d6d09657374dfdda7e
2021-11-03 06:40:47 +08:00
Cai Hui 2322fc9b7e Update tox.ini
Update tox.ini for local test in python3.

Change-Id: I9a3fadb6b6f87ec19e8ca26ee2a3169230efc3ab
2021-09-19 17:18:11 +08:00
wu.shiming de4175d546 Dep's should be restricted by upper-constraints
Tox trying to install latest versions for building docs which may
not be supported by stable and lower branches, so should be
restricted by respective version's upper-constraints.txt

Change-Id: I47416c166d07104ddf647cbbdb17525614311673
2020-11-20 14:43:05 +08:00
kuangcx 70c150ad80 Remove install unnecessary package
The docs  requirements migrated to doc/requirements.txt
we need not install things from requirements.txt.

Change-Id: I593e1d17d54690764b8c43c34b19adbdba07ee65
2020-09-30 15:52:11 +08:00
Caihui 339ef21789 Add py38 in tox.
In new release, The project  is used  python38 to replace python37,
so drop py37,add py38 in tox.

Change-Id: Id7a2c34f2b91a363a942acfa6c52684a63265d20
2020-07-01 23:30:02 -07:00
Caihui a3aea14c68 Update tox env param
The "tenant" is replaced by "project"  in new version.

Change-Id: I390db6ccb6bf17e6d641ad88e3dd6273750e3c4d
2020-06-24 03:56:52 -07:00
jacky06 eaab8694d0 Update to hacking 3.0
Update to newest hacking version, it has only minimal changes and full
support for Python 3.

Python modules related to coding style checks (listed in blacklist.txt in
openstack/requirements repo) are dropped from lower-constraints.txt
as they are not actually used in tests (other than pep8).

Change-Id: Id4b5f045563640f4b9c73ecafd4ebf8d3ff2c269
2020-05-11 23:31:15 +08:00
jacky06 815b66364b tox: Keeping going with docs
Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
suggests, keeps the build running when it encounters non-fatal errors.
This is exceptionally useful in avoiding a continuous edit-build loop
when undertaking large doc reworks where multiple errors may be
introduced.

[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045

Change-Id: I18032bd40489c4b1c511713b0f1c5bb1aca7c1d2
2020-03-30 12:03:27 +08:00
caihui a81b64881c Add py36 in envlist
Add py36 in envlist.

Change-Id: I91a3122703b773d08b1bcceb536a4effa5e4e5f2
2020-02-02 21:16:31 -08:00
Ghanshyam Mann f04df2caa5 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

freezer is ready with python 3 and ok to drop the
python 2.7 support.

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: I14ab74f3e82e83ef5c5a49831f68335965e7e101
2019-11-22 01:52:55 +00:00
Corey Bryant 79b064a079 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: I37c8620e53f45c3bfce2c018f65149c8505cb956
Story: #2005924
Task: #34207
2019-06-24 09:21:14 -04:00
chenke 8562e9e8d5 Make the low-constraints job work and modify coverage version
Now this style can't make low-constraints job work, because the pip
will constrain a library to the first item it encounters. Then the
version defined in the uppper file will be installed here.

The solution is to put the upper file in the deps.

Example:
When running low-constraints job:
According to the low-constraints file:
Babel==2.5.3[1] should be installed
Actually the log[2] shows that Babel===2.7.0[3] was installed.

Reference Link:
[1]. https://github.com/openstack/freezer/blob/master/lower-constraints.txt#L6
[2]. http://logs.openstack.org/85/657185/2/check/openstack-tox-lower-constraints/f9d0a50/job-output.txt.gz
[3]. https://releases.openstack.org/constraints/upper/master
[4]. https://review.opendev.org/#/c/601188
[5]. http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

The coverage version need >=4.5.0 to support py36:
[1]. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879269
[2]. https://travis-ci.org/agx/git-buildpackage/jobs/534117241

Change-Id: Idf278f4a7aca4470f5996e5166e4724259ef944b
2019-06-19 13:29:46 +00:00
Zuul 09658baca5 Merge "Move to opendev repository" 2019-06-15 02:59:08 +00:00
Cai Hui c65ce69ea2 Add the py37 testing job
Add the py37 testing job in tox.ini

Change-Id: I3cf540e4c57af4d274f88b0ae67401ccb5a86742
2019-05-24 23:27:32 -04:00
tonybrad 40486db3a9 Move to opendev repository
Change-Id: Idb5b3e83144fefc2022e9e98b1ac7e0f57f9e9b9
2019-05-21 08:59:49 +00:00
Ghanshyam Mann 0d715ccf95 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: I2e38f54ad658b670d4f8f66f14b45eced6d5b7dd
2019-04-14 21:13:42 +00:00
Nguyen Hai Truong a24a025804 python 3.6 unit test job
This is a mechanically generated patch to add a unit test job running
under Python 3.6 as part of the python3-first goal.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: I0381da9ffe40299f55a31a1c499b509b3eba05ef
2018-11-06 22:52:20 -08:00
Nguyen Van Trung b1c6d533d7 Don't quote {posargs} in tox.ini
Quotes around {posargs} cause the entire string to be combined into one
arg that gets passed to stestr. This prevents passing multiple args
(e.g. '--concurrency=16 some-regex')

Change-Id: I60a754d28ca56fb7f995d0af5c03a7734c5ba8b1
2018-10-09 10:05:38 +07:00
Doug Hellmann e7f6b83833 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: I9df9ee69b590e2589b7e687a7062bbfb19b6efbd
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Co-Authored-By: Nguyen Hai <nguyentrihai93@gmail.com>
Co-Authored-By: Trinh Nguyen <dangtrinhnt@gmail.com>
2018-09-05 11:29:02 +09:00
Nguyen Hai 29a4e902aa Fix openstack-tox-docs failure
Change-Id: I01035d5cb04b5908571d1d5e177176e9d8f24091
2018-09-04 21:04:06 +09:00
Zuul 3dbe8d8bb7 Merge "Adds doc8 check to pep8" 2018-08-20 10:48:02 +00:00
Vu Cong Tuan db99a4ab79 Switch to stestr
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: I0ec7bc7926e57b243e38b2c696815e648d0b3f61
2018-07-17 16:48:26 +07:00
Dao Cong Tien 401256a6e5 Adds doc8 check to pep8
This patch adds doc8 check for .rst files to pep8.
Files that fail doc8 check are also fixed.

Ignores D000, D001 of doc8 check. This requires lot of changes
and should be done in a separated patch.

Change-Id: I7d021e6fee3e12feff7c219e09c545da5274c354
2018-07-12 20:13:25 +07:00
Vu Cong Tuan 4f6e8ce7d5 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: I4839bb3c9905a540e3ed61a36cacbf9a5f665b1b
2018-06-29 13:10:31 +00:00
Doug Hellmann f420d4f35e add lower-constraints job
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.

Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.

Add openstack-tox-lower-constraints job to the zuul configuration.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

Change-Id: Ic5f68cd606f5dd17e4cca2facf3141960180be26
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-22 12:28:40 -04:00
Saad Zaher 54005e50da Migrating documentation to the new style
Change-Id: I4a398b2ea3023250905208f35996015f5a5d5e84
2017-09-14 10:13:46 -06:00
lingyongxu 9867828c8e Enable some off-by-default checks
Some of the available checks are disabled by default, like:
[H106] Don’t put vim configuration in source files
[H203] Use assertIs(Not)None to check for None

Change-Id: Ifed3a0b3514ac10a4c2b49b904f39a3faf2f15b5
2017-06-22 16:31:16 +08:00
Saad Zaher a8ca5cb86b Move install-guide to freezer repo
* Added install-guide to freezer repo
   * Remove install-guide from freezer-api

Change-Id: I122f2801e6853a2b3c3bc65408b3cec8fe1b555d
2017-04-26 17:41:47 +00:00
lingyongxu e99ba13881 Drop py34 target in tox.ini
We do not have python 3.4 in setup.cfg which declares the explicit
supported versions and we support py35 now.so it is no need to keep
the supoort for py34.

Change-Id: Idbf148074438ef058dbcbff0b97ce27fcf1663ca
2017-03-29 00:35:32 +00:00
qtlu d7c31df6f8 Add support for py35.
Change-Id: I1eaba8212dbd78599083e4e6db6e2472ef06c614
2017-03-09 22:29:34 -05:00
Ruslan Aliev da29fee615 Add pep8 check to freezer tests
This patch adds pep8 check on freezer/tests and fixes all
code style problems.

Change-Id: I178e4cbdfcbe610fbee1e6257b0d2b2b922d5411
Closes-Bug: #1643952
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
2016-11-22 19:52:52 +03:00
Saad Zaher 59862f3e3b Added py35 environment configuration to tox.ini
Change-Id: I5b469d4dfbc00f2939dae952dc5d0a0163f71359
2016-11-17 14:49:59 +00:00
Saad Zaher 8c08499940 Added release notes for freezer-agent
Change-Id: I0618e3b3922bd97e9846c24100913891cc4b349b
Implements: blueprint maintain-releasenote
2016-10-21 09:59:15 +00:00
Jeremy Liu ab47e90f21 Support upper-constraints in tox.ini
Openstack infra now supports upper constraints for all jobs.
Update tox.ini to use upper constraints for all jobs.

Change-Id: I524b0a31ecf2253bedee52b56109f5ff79b428cb
Closes-bug: #1614361
2016-10-10 03:20:19 +00:00
yatinkarel 45fa458209 change directory structure for unit tests
Unit tests are added in same directory with integration
tests.

Change-Id: I204dec8495276df37a8c536638a6852b604db671
Closes-Bug: #1606009
2016-09-13 19:56:43 +05:30
Deklan Dieterly 694c98e063 Fix tox.ini file
Remove select line in tox.ini.
Currently checks are not being run.
Run pep8 checks.
Fix code to pass pep8 checks.

Change-Id: Iacef4386b1214f95b1bd106c17a5f714f948a1a1
Closes-Bug: #1593452
2016-06-17 17:11:14 -06:00
eldar nugaev c4218f0385 Fix freezer for py3 compatibility
Change-Id: I03160bf2dba1b67b1daf7c60f4f0182acc2a4d90
2016-02-12 01:39:34 +00:00
Fausto Marzi ab794d3d36 Add Sphinx doc build
Change-Id: I9742e5261cd666f09a0bd93e2372da6a10f5f69b
Closes-Bug: #1542061
2016-02-06 22:09:01 +00:00
Jenkins 6856793455 Merge "Deprecated tox -downloadcache option removed" 2016-01-12 10:52:11 +00:00
vishal mahajan 00baef4f51 Pass proxy enviroment varibles in tox
When Development environment is under a proxy then tox is failed even if environment variables of the proxy are set.

Change-Id: Ia59a522f9ed9250e7b754eca49af600b381554fd
2016-01-06 08:29:02 +00:00
Ondřej Nový 71b95b314f Deprecated tox -downloadcache option removed
Caching is enabled by default from pip version 6.0

More info:
https://testrun.org/tox/latest/config.html#confval-downloadcache=path
https://pip.pypa.io/en/stable/reference/pip_install/#caching

Change-Id: Idfa22a7363a5f7e4998ba8084dfbb56084d2161d
2015-12-11 21:15:16 +01:00
Kenji Yasui 623f08928e Delete python bytecode before every test run
Because python creates pyc files during tox runs, certain
changes in the tree, like deletes of files, or switching
branches, can create spurious errors.

Change-Id: I7908520f6e2935ffacf5d914a01078939392e2e2
Closes-Bug: #1368661
2015-12-07 07:43:09 +00:00
Fausto Marzi 94e1c6ea4a Improved freezerc and freezer-agent script management
With this patch the scripts are generated by automatically
only from setuptools. The /bin/freezerc script is removed
and the content is incorporated in freezer.main

This patch should make more portable freezer on
win32 platform.

Unfortunately in order to support win32 platforms
we need to use a version of PBR >= 1.0.0,
to support env markers. Now requirements.txt reflects that

Change-Id: I31a4a13711f8c042072e3cc8785078fdbb971cb7
2015-10-29 14:35:55 +00:00
Fausto Marzi 15be7d2b0c Fixed and improved tox.ini, added subunit as dep
fixed a typo in tox.ini and also added
python-subunit in test-requirements.txt

Change-Id: Ic897f5a39586c07b89613311e766ad73bafd96b5
2015-10-19 17:58:21 +01:00
Fausto Marzi 5902b0f7cd Swift from pytest to testr for unittests
Freezer currently uses pytest to execute unittests.
As we need to be consistent with the frameworks by the
other OS project, we are porting our tests to tests.

Change-Id: Ib755771efe496e467079dc2e990ca89a2e513eb6
Implements blueprint: swift-to-testr
2015-10-15 16:32:22 +01:00
Fausto Marzi f7841f840c Fixed deps in setup.py and a bug in tests
Currently the deps of oslo.i18n wasn't aligned with
Kilo global-requirements.

Now tests are not execute by runtests.py but tox
call directly py.test, as there was a bug in the exec
of runtests.py. This is a temporary solution as
testr will be used soon as testing framework

Close bug: 1498078

Change-Id: I07daddb14ab75fe089c98c8e00c24ecb550ada82
2015-09-22 12:04:37 +01:00
Fabrizio Vanni cea7fb2702 basic integration tests for freezer-agent
The test provided in the tests/integration directory
execute the command line version of the freezer-agent.

The tests execute backups and restores, passing the parameters
on the command line, and check the results.

Types of integration tests depend on the environment variables defined.

Local storage tests are enabled by default and use temporary
files and directories, while SSH and Swift storage testing need
also access to existing external resources.

To enable the ssh storage testing, the following environment
variables need to be defined:

 - FREEZER_TEST_SSH_USERNAME
 - FREEZER_TEST_SSH_KEY
 - FREEZER_TEST_SSH_HOST
 - FREEZER_TEST_CONTAINER

To enable the swift storage testing, the following environment
variables need to be defined:

 - FREEZER_TEST_OS_USERNAME
 - FREEZER_TEST_OS_TENANT_NAME
 - FREEZER_TEST_OS_REGION_NAME
 - FREEZER_TEST_OS_PASSWORD
 - FREEZER_TEST_OS_AUTH_URL

Tests involving LVM snapshots are executed only with superuser
privileges and if the following env variable is not defined:

 - FREEZER_TEST_NO_LVM

Change-Id: I39f0c9bf62f7c82f81ad95f19cf0f7aefb059633
2015-08-13 16:54:14 +01:00