Commit Graph

112 Commits

Author SHA1 Message Date
Corey Bryant
5823054627 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: I0ddfd7fde55302809a98bb8a6d745de4079b9a87
Story: #2005924
Task: #34219
2019-07-19 10:48:58 -04:00
caoyuan
f82c61f856 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: Id89f1eaa80623610594e5945a0b73beee7f09c5a
2019-05-22 16:21:24 +08:00
Ghanshyam Mann
0d3ad907a6 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: Id530578688faf2e97165b40abe18b863126cf89f
2019-04-14 23:05:06 +00:00
Nguyen Hai Truong
18fc68dd26 Update min tox version to 2.0
The commands used by constraints need at least tox 2.0.
Update to reflect reality, which should help with local running of
constraints targets.

Change-Id: Iece749b90ec90bec1f5324bc351878e6252720ed
2019-03-05 11:56:54 +11:00
Nguyen Hai Truong
055384343f Add 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: I5a92105f7cfbcabf521150d65f89b14cea62db0f
2019-02-23 18:01:18 +11:00
ricolin
63aa9caf4d Remove -U from pip install
'pip install -U' ugrades specified packages, this is not necessary
since we use constraints, remove the parameter '-U' from the line.

Change-Id: I2582c1a1995bb4cf903d4ce2e1ebb3fca930ea01
2019-01-15 02:54:28 +00:00
Vu Cong Tuan
ff67ac89f3 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: I6267a0287dd9ae1296fdc775bb3848be9b52978c
2018-07-13 13:05:52 +07:00
Doug Hellmann
da910ace0f 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: Idba5b407405e7d1457a02b074bf60b7fded284ee
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-06 16:06:01 -04:00
Zuul
5a60d23a51 Merge "Use pip_check_reqs module" 2018-06-05 07:19:48 +00:00
Nguyen Hai
6215887bc1 Follow the new PTI for document build
For compliance with the Project Testing Interface as described in:
https://governance.openstack.org/tc/reference/project-testing-interface.html
http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Remove the '[build_sphinx]' section as described in:
http://lists.openstack.org/pipermail/openstack-dev/2018-March/128594.html

Change-Id: Ibd6c6e9cca238821099ce190784d077ffe4c2dee
2018-04-25 12:11:07 +00:00
Paul Belanger
449c8f292a
Add bindep.txt file
Bindep is a tool for checking the presence of binary packages needed
to use an application / library. It started life as a way to make it
easier to set up a development environment for OpenStack projects.

Change-Id: I28dd0e00734be85cb4b66a09708c0dee8dcb5ef1
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-04-20 14:40:19 -04:00
Doug Hellmann
96e8e6c649 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: Ib89fed1004a5e4f7a0234fdccf6b8e1d85f3eee0
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-22 15:12:42 -04:00
14bf2b2e7f Use pip_check_reqs module
pip_missing_reqs has some bugs and is renamed(see [1])
to pip_check_reqs since v2.0. Switch to pip_check_reqs
module to get the bug fixes and updates.

[1] https://pypi.python.org/pypi/pip_check_reqs/2.0

Change-Id: Ic562975a82861d4e7cf322a982a60e0c6041ad44
2018-02-26 06:50:23 +00:00
chao liu
282c3b59d6 Add app.wsgi to target of pep8
The app.wsgi file should be adjusted to meet pep8 standards
and apply pep8 check to app.wsgi automatically.

Change-Id: Ie9be25fb6bd290c65c25907309f482d736fb8a68
2017-11-18 01:27:34 -08:00
Hieu LE
e06004d9f5 Implement basic policy module in code
This change prepares the magnum project to start implementing
policies in code. Subsequent patches will register more magnum
policies in code and remove the corresponding entry from the
policy file maintained in source.

This is part of a community effort to provide better user
experience for those having to maintain RBAC policy. More
information on this effort can be found below:
https://governance.openstack.org/tc/goals/queens/policy-in-code.html

Change-Id: I0e2b34067ea1e4d5868df544a9f65ae3f1944c43
Co-authored-By: Dai Dang-Van <daidv@vn.fujitsu.com>
Implements: blueprint policy-in-code
2017-10-19 08:33:58 +07:00
Spyros Trigazis
b4386f83ad Add swarm-mode driver
* add swarm-mode config
* remove etcd, flannel, discovery_url, swift_registry
* add swarm-mode COE obj
* add functional test, create cluster, create/remove
  service and delete cluster.

Co-Authored-By: ArchiFleKs <kevin.lefevre@osones.io>
Implements: blueprint swarm-mode-support
Change-Id: Iba177be167cb3a3866441d5f42670171f26c5a86
2017-07-18 10:47:23 +02:00
coldmoment
ba8ad5e37f Add a hacking rule for string interpolation at logging
String interpolation should be delayed to be handled
by the logging code, rather than being done at the point
of the logging call.
See the oslo i18n guideline
* https://docs.openstack.org/oslo.i18n/latest/user/guidelines.html#adding-variables-to-log-messages
and
* https://github.com/openstack-dev/hacking/blob/master/hacking/checks/other.py#L39

Change-Id: I8a4f5f896865aebbff88ee894f0081e58cfce9ef
2017-07-15 14:49:45 +08:00
lingyongxu
21bcd08370 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

Change-Id: I18babfaae830b13a53dcd13ce9233fc28652a787
2017-06-26 17:27:20 +08:00
jinzhenguo
014da56bbb Remove duplicated hacking rule M318,M319
Change-Id: If0fbeb3f0bf826cac3700ad7f244fc059e83718f
closes-Bug: #1696628
2017-06-08 13:49:48 +08:00
akhiljain23
20a5de74e7 Add 'rm -f .testrepository/times.dbm' command in testenv
Running py2* post py3* tests results in error. Add
'rm -f .testrepository/times.dbm' command in testenv to
resolve this.

Change-Id: I17f872b6169317de7c541a2ed77344ab1c313f94
Closes-Bug: #1229445
2017-04-03 10:14:27 +00:00
Feng Shengqin
9f83e1d9db Move cover.sh to the tools directory
Change-Id: I518618cc174c16ac74d30d9f4f41f329b9e4f36f
2017-03-20 19:55:05 +08:00
Luong Anh Tuan
1fb23da2c6 Indicating the location tests directory in oslo_debug_helper
According to [1], we can passing a "-t" argument to
oslo_debug_helper to indicate the directory where tests
are located. This will solves ImportError exception.

[1] https://docs.openstack.org/developer/oslotest/features.html

Change-Id: I5c25c86a79ace5be46c7254cc0ccdc2183303a7c
Closes-Bug: #1666560
2017-03-09 22:41:43 +07:00
Andreas Jaeger
7733a2af6f Fix api-ref with Sphinx 1.5
Sphinx complaints about a missing file, fix this with renaming the file
to the intented name.

Treat sphinx warnings as errors to avoid these kind of problems. Remove
the not needed note anymore, this works fine as is.

Change-Id: I3849f788bdea822bf73bb334bf8d230e723e6c5b
2017-03-04 12:14:21 +01:00
Cao Xuan Hoang
a26b2adc55 Remove support for py34
The gating on python 3.4 is restricted to <= Mitaka. This is due to
the change from Ubuntu Trusty to Xenial, where only python3.5 is
available. There is no need to continue to keep these settings.

Change-Id: Id6d387d7e2cf6395a7ccff6291c9c73787984d51
2017-02-08 10:03:14 +07:00
Feng Shengqin
d86b2019a1 Add debug-py34 to tox.ini
Change-Id: I547fe58930e8c77ac9cf171adde0b7227ce11269
2017-01-19 18:49:43 +08:00
Tovin Seven
143687974d Remove extra spaces
Remove extra spaces in ini files

Change-Id: I81b3a98687ff87a0a447c25a479a2ec74c7489c1
2017-01-17 10:21:28 +07:00
Dirk Mueller
80fc5a2d42 Add bashate checks to pep8 step
Similarly to pep8 checks, this allows enforcing a consistent
style of the shell scripts accross modfications. For now
only the indentation is enforced to reduce code churn.

Closes-Bug: 1648099
Change-Id: Ie66cbe1aea4bd01a8bba8833ef6cbd2cff6a7c6a
2016-12-07 15:25:41 +01:00
Jenkins
137b26a64c Merge "Enable DeprecationWarning in test environments" 2016-11-22 17:19:05 +00:00
Jenkins
b21551c2ba Merge "Import environment variables from testenv" 2016-11-10 08:04:31 +00:00
pawnesh.kumar
97cb24ba01 Enable DeprecationWarning in test environments
Many deprecations are triggered early (on imports, for example).
To make sure all DeprecationWarning messages are emitted we enable
them via the PYTHONWARNINGS environment variable.

Change-Id: I3890dadba51bd1a112ac24bfb3a1e15afe96d3e1
2016-10-26 13:17:57 +05:30
pawnesh.kumar
95015896b0 Fix PEP8 issues, OpenStack Licencing and Version details
Change-Id: I77ed5ec049abcb4cb607c11f504b64baa2914b5e
2016-10-08 20:11:22 +00:00
avnish
8afa0738ef delete python bytecode including pyo before every test run
Change-Id: I7fcdf41c571f128f3688583026cdac57a5d60896
2016-09-16 09:26:30 +05:30
yatin karel
1c5da2e89c Import environment variables from testenv
Imported test environment settings to all the test suites
from testenv.

Change-Id: I65c7ece6afa3729faddf6255d6ecda2d14ce67b4
Closes-Bug: #1617571
2016-09-12 09:04:49 +05:30
Jenkins
4ec9a8f6b9 Merge "Init api-ref structure and requirements" 2016-08-29 18:06:28 +00:00
Hieu LE
cdd14f209e Init api-ref structure and requirements
This patch init api-ref document structure and
adding some requirements based on the guidance of
OpenStack API team.

Get ready for os-api-ref sphinx theme change

Change-Id: I896c8752fbcf15ec8e5bc6b3862a1ed040936215
Implements: blueprint magnum-doc-rest-api
2016-08-29 22:44:08 +07:00
Spyros Trigazis
4d545d6751 Compare test coverage with the master branch
* checkout one commit before the latest and check coverage
* check coverage with the latest commit
* all new lines must be tested

This functionallity essentially compares the current change
with the master branch, since the coverage job runs always
for only one change.

Partial-Bug: #1511667
Change-Id: I2ab9078489f30dbc383c068bb9abc0f3b9ee0e62
2016-08-29 14:28:59 +02:00
yatin karel
f98463852b Use upper constraints for all jobs in tox.ini
Openstack infra now supports upper constraints for
all jobs. Updated tox.ini to use upper constraints
for all jobs.

Change-Id: Idc8c6cb9b0fa3b547bd78638394fdf1687827e33
Closes-Bug: #1614117
2016-08-17 19:56:58 +05:30
OTSUKA, Yuanying
83e0d8d32b Add functional test for k8s ironic
This patch adds functional test for k8s ironic, and modify
utility scripts for gate jobs.

Partial-Implements: blueprint magnum-baremetal-full-support
Change-Id: I8d68711af9d90e4a52901765e7daf97bc2851125
Co-Authored-By: Spyros Trigazis <strigazi@gmail.com>
Co-Authored-By: OTSUKA, Yuanying <yuanying@fraction.jp>
2016-08-09 11:30:04 +02:00
Yatin Kumbhare
0a56f557d6 Add Python 3.5 classifier and venv
Now that there is a passing gate job, we can claim support for
Python 3.5 in the classifier. This patch also adds the convenience
py35 venv.

Change-Id: Ifd69012586ecb59faaab2a474f43efde9b244756
2016-07-12 17:20:05 +05:30
Spyros Trigazis
936dd11a16 [install] Add install guide from template for rdo
This guide is based on the installguide-cookiecutter template
and will be published automatically to docs.openstack.org.

[2] is a similar patch and [3] is WIP.

A change to add magnum to the install-guide job will follow.

This is a follow-up of [4].

[1] http://docs.openstack.org/contributor-guide/project-install-guide.html
[2] https://review.openstack.org/#/c/325389
[3] https://review.openstack.org/#/c/317152
[4] https://review.openstack.org/#/c/332161

Change-Id: I145fd30f575dab45b4c947bc4609287b1e300025
Partially-Implements: blueprint magnum-installation-guide
2016-06-22 16:20:05 +02:00
Hongbin Lu
c52e5bea06 Add tox test for k8s coreos bay
* Add a CoreOS test class TestCoreosKubernetesAPIs
* Add a CoreOS test environment in tox.ini
* Create a base class BaseK8sTest and move OS-agnostic k8s testing
  code to that class.
* Increase the disk size from 8G to 10G for m1.magnum and s1.magnum,
  since CoreOS image requires more disk space to boot.
* Set os-distro property for CoreOS image.

Partial-Bug: #1546101
Change-Id: Ie56a9442ecebe05f39c7669bc950f5a6ca11df33
2016-05-09 02:36:26 +00:00
Andreas Jaeger
5364356b99 Remove constraints envs from tox.ini
The constraints environments are not used at all, they have been
obsoleted everywhere in OpenStack. Remove them completely.

Now the normal jobs can use constraints - as magnum already does.

Change-Id: Iecec444fba59923c7894c1fd2a90aebbfdc4724d
2016-04-17 17:09:03 +02:00
Andreas Jaeger
e3fef8412f Fix post jobs
The tox venv environment is run during post jobs and thus cannot use
constraints.

See
http://logs.openstack.org/a6/a6650650f065bc4423568f9318d362957eba7f31/post/magnum-docs/60418d4/
http://logs.openstack.org/a6/a6650650f065bc4423568f9318d362957eba7f31/post/magnum-branch-tarball/415035c/

We run for docs jobs:
"tox -e venv python setup.py build_sphinx"

thus, the docs environment is not used.

For branch tarball, the infra scripts use:
"tox -e venv python setup.py sdist"

And infra does not setup constraints for post jobs currently as this is
not working with current tools

Fix tox.ini for this.

Change-Id: Iad81b47899c4554b75f90dc24f0aa2aff7aef730
2016-04-17 17:07:58 +02:00
Davanum Srinivas
a6650650f0 Use k8sclient library
In Ia400b5b6919753d6241233a6666a2c30c7618bc9, we are
adding a new library to global requirements. This
python-k8sclient library essentially has the same
code that was in Magnum so it's a straight replace.

Change-Id: Ib85bcf532e4163d5c1ac95ef701a1ec3133b69eb
2016-04-17 03:35:39 +00:00
Jenkins
b225ccdbc5 Merge "Add reno to Magnum" 2016-04-05 16:46:36 +00:00
Eli Qiao
c1b63cdac0 Add reno to Magnum
Introduce reno to handle release notes as files in-tree.

Also added documentation on how to add re for changes, after this we
will require changes to add reno if they have some significant changes.

Implements: blueprint add-reno-for-release-management
Change-Id: Ifc18b78ab5ce89375b85f6ac4344ffafa7f1c48b
2016-04-05 08:45:43 +08:00
Niall Bunting
dbcfe35111 Magnum's tox test should respect upper-constraints
This will force pip install to use the upper-constraints.txt specified
version of pip modules. When you don't do this, you are out on the
bleeding edge and become unstable everytime some python library in the
wide world changes in a way that you don't expect.

Change-Id: I962329075b11d3790dc586ba33fe19fc64f1e4f9
Closes-Bug: #1563038
2016-04-04 09:18:44 +00:00
Eric Brown
6253f70a43 Remove bandit.yaml in favor of defaults
* Remove bandit.yaml so bandit just uses internal defaults. Results
  in much less maintenance.
* Raise the severity level of the scan to just medium and high
* Added nosec to line that makes use of file:// scheme. That support
  should probably be droppped at a later time.
* Removed a misleading log message noting what address it was
  serving on. Bandit also flagged this as a potential security issue
  serving on 0.0.0.0.

Change-Id: I3e08e462255f7b4ba8405d69f5843ed3c001d055
2016-03-09 11:20:28 -08:00
Yang Hongyang
fd8ee8d205 Add py34 to tox envlist
We are going to support python3.4, it's better to add py34 to the
envlist so that devs can fix python3 compatible issues.

Change-Id: I8b478f78c5fd2fb11e6fdcb02bffb10929113a18
2016-03-01 02:16:03 +08:00
Andreas Jaeger
d077045d78 Make bandit job voting
Merge bandit job into the voting pep8 target. Pep8 is used here as
general target for lint-like jobs. This will make the bandit job voting.

Looking at recent runs, bandit passes fine, so it's time to enable it.

Once this change is in, the non-voting bandit change can be removed from
OpenStack CI to reduce node usage and the entry in tox.ini can also be
removed.

Change-Id: I9bf1a741336abf830a092f0fb372116d08e6127c
2016-02-09 17:50:17 +01:00