Commit Graph

66 Commits

Author SHA1 Message Date
dharmendra
e254845470 Switch to oslo_utils.importutils to load module
The imp module is deprecated since a while and the load_source
method has been removed from docs because broken [1][2].
Switch to oslo_utils.importutils for the same.

[1] https://bugs.python.org/issue14551
[2] https://mail.python.org/pipermail/python-ideas/2014-December/030265.html

Change-Id: Ic567e48b925befe2c196a5d46de8e504f273387e
2019-08-03 09:25:49 +00:00
Zuul
2417ececbd Merge "Update the constraints url" 2019-07-12 15:49:00 +00:00
dharmendra
90dbc5e4aa Update the constraints url
For more detail, please refer:
http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: Ie29b2732981a5e025726299307dfb93ded6b7386
2019-07-10 10:04:03 +00:00
ritika.sharma
ad39d21b92 Add Python 3 Train unit tests
See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: Ib6f6526db795b2ff74c5d176d4d56e4ec55fe29c
2019-07-05 14:57:56 +05:30
Ghanshyam Mann
047f3a7409 Fix gate error "mysqladmin: command not found"
mysqladmin package is required in tools/test-setup.sh
so adding bindep.txt file for this binary dependencies

- http://lists.openstack.org/pipermail/openstack-discuss/2019-June/007272.html

Change-Id: I469a04220ad36451d155a5256926d992aa56b5c3
2019-06-28 08:52:55 +00:00
Zuul
1029e822ea Merge "Replace git.openstack.org URLs with opendev.org URLs" 2019-05-03 02:25:43 +00:00
dharmendra
734ab72346 Drop py35 jobs
Python 3.5 was the target runtime for the Rocky release. The current
target py3 runtime for Stein is Python 3.6, so there is no reason to
keep testing against the older version.

https://governance.openstack.org/tc/reference/runtimes/stein.html#python-runtime-for-stein

Change-Id: Id6d0c53becf09741689dee0d7b30e5c397a63227
2019-04-30 09:16:04 +00:00
caoyuan
1ebb081e8f Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I6c273be62735d46221130a1da4d3672fdea77e01
2019-04-26 18:07:57 +08:00
bhagyashris
4b9bcfeeef Fix random failing of test_init_monitoring test
The existing unit test case [1] is failing randomly [2]
when both test modules `test_plugin` and `test_monitoring`
runs in a single worker.

Reason: VNFMonitor class is using singleton pattern.
In above test modules same object of VNFMonitor class
is returned from __new__ method but internally it makes
a call __init__ explicitly.
Since we are not initializing `_hosting_vnfs` attribute in
the __init__ method, when we try to access __hosting_vnf in
the second test `test_plugin`, it finds two vnf objects.

This issue is fixed in this patch by reinitializing the
`_hosting_vnfs` class level attribute as empty dict in the
test_init_monitoring unit test.

[1]: https://github.com/openstack/tacker/blob/master/tacker/tests/unit/vnfm/test_plugin.py#L75
[2]: http://logs.openstack.org/10/609610/9/check/openstack-tox-py35/b99de12/testr_results.html.gz

Change-Id: I2a5933ed21e478e860cb12b378a4368f9402291d
2019-01-22 11:20:08 +00:00
Kim Bao Long
5fec9293c9 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: I220127ff324719ed0b824b2288273bfd849182e0
2018-11-02 11:21:03 +07:00
Nguyen Hai
11f921444c 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/

Change-Id: Ic34952687f54176fccf051ab2e28260e25e107a8
2018-07-20 07:57:05 +00:00
nitesh.vanarase
7d0c22524a Fix tox to run functional instead of unit tests
Earlier tox -efunctional command was running unit tests
instead of functional.

This issue is fixed in this patch by explicitly pointing
to functional test code path.

Closes-Bug: #1778698
Change-Id: Ib98b667188fe3245a5ad4a140c0d3b2d3378ef84
2018-07-03 14:29:32 +05:30
Nguyen Hai
5915585cd2 Switch to using stestr
stestr is maintained project to which all Openstack projects
should migrate.

[1] https://etherpad.openstack.org/p/YVR-python-pti
[2] https://governance.openstack.org/tc/reference/pti/python.html

Change-Id: I3a4a8e6a7c856446686252d80046532e08d3936b
2018-06-14 04:49:05 +00:00
Nguyen Hai
b777d681b6 Remove tox jenkins
Change-Id: Ic249c0afbb81479aed811f558861b595379f7431
2018-04-10 11:30:37 +00:00
Nguyen Hai
01e6ce3c48 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.

Co-Authored-By: Nguyen Hai <nguyentrihai93@gmail.com>
Change-Id: Ida2bb7e0de8ca646af2da8c4bc3ed1708f69b184
Depends-On: https://review.openstack.org/555034
Depends-On: https://review.openstack.org/558566
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-06 22:19:55 +09:00
Nguyen Hai
9c143a580d Follow the new PTI for document build [Updated]
Although Tacker docs move to new docs PTI jobs
(https://review.openstack.org/#/c/552046/),
the sphinx is still using legacy pbr runner.

This patch works futher jobs:
- Remove legacy pbr runner, [pbr] section.
- Remove [build_sphinx] section.
as described in:
http://lists.openstack.org/pipermail/openstack-dev/2018-March/128594.html

Change-Id: Ic65ed5ec145fa8a356fe28f86c3a69e3d20ef3c2
2018-03-22 21:48:08 +09:00
Nguyen Hai
a205c737ff Follow the new PTI for document build
For compliance with the Project Testing Interface as described in:
[1] https://governance.openstack.org/tc/reference/project-testing-interface.html
[2] http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Change-Id: I001f8d12a277e520af85ca18a27ff90b3cd98ae2
Closes-Bug: #1755190
2018-03-17 01:17:35 +09:00
yong sheng gong
9af2b71e07 Move to zuul3 jobs
https://docs.openstack.org/infra/manual/zuulv3.html#legacy-job-migration-details

Co-Authored-By: Duong Ha-Quang <duonghq@vn.fujitsu.com>
Co-Authored-By: yong sheng gong <gong.yongsheng@99cloud.net>

Closes-bug: #1729632
Change-Id: I2d1c4795b1a591831a12535d2f048a13258f4913
2017-11-04 22:09:42 +11:00
Jenkins
21f8f885a5 Merge "Remove setuptools-git" 2017-07-31 04:18:52 +00:00
Dai Dang Van
181dbfcc06 Remove .testrepository/times.dbm
When we run tox -e py27 command and after that
we run tox -e py35 command, we will meet with
test fail problem like: "No module named gdbm".
This patch adds cleaning up of this file
before running next tests.

Change-Id: I35a20521706b19a3067a5579c9dcf46efd0d55c0
2017-07-10 02:22:49 +00:00
Chuck Short
4b3cc58f34 Remove setuptools-git
Remove setuptools-git its not required to run the unit tests.

Change-Id: I3838a9c90e45862cc53eb1f71033d7a665991887
Signed-off-by: Chuck Short <charles.short@ericsson.com>
2017-07-03 20:07:31 -05:00
shihanzhang
0b972304f0 Remove log translations
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Change-Id: Iaef58c19695821426f97b18e96475869265d61d9
2017-04-06 13:46:04 +08:00
gong yong sheng
a2f1d9cc96 Remove the customized test-requirements script
The gate-test-requirements job is doing the same thing.
We cannot use revert since it is breaking the gate-test-requiremnts job.

Change-Id: Ie5f4304b0cb59fda9bcc87df518e4c2ad9915b60
2017-03-07 15:48:42 +08:00
gong yong sheng
13f4ff41d1 Sync test-requirements with global requirements
In this patch, a tool is provided for team to do the sync to avoid
any gaps with global requirements.

Change-Id: Ie960eae7a2756aa0f267c8ad37ea60f5effe6742
Partial-bug: 1668848
2017-03-06 22:16:37 +08:00
Cao Xuan Hoang
a81d72f22e 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: Ib94f0f269173072b5a4c77d46b43852e78092487
2017-02-23 16:11:52 +07:00
gong yong sheng
8cad24f5a6 Put dev doc under pep8 check
Change-Id: Idd1ae6c26d1723deaaae4562a1e1839ae55633e4
2017-02-06 15:08:47 +08:00
dharmendra
92e4b47661 Fix 'No data to report' error in coverage.
Remove unnecessary commands in 'testenv:cover' of tox.ini.
HTML coverage reports can be generated in 'cover' directory by
'python setup.py testr --coverage' only.

Change-Id: I6bc205c4a7772a11cd3dc911a52097e62444376f
Closes-Bug: #1651029
2016-12-19 23:11:02 +00:00
Sridhar Ramaswamy
dcd5e78ec4 Initial api-ref skeleton for Tacker
This patch is the first step to bring the NFV Orchestration
API Reference to the repository.
It is a part of the effort described here [1]:

[1] https://wiki.openstack.org/wiki/Documentation/Migrate#API_Reference_Plan

Once this skeleton patch is merged, an api-ref job can be added to
the gate. The gate job makes it much easier to review API Reference
contents, which will be brought by follow-on patches.

Change-Id: I7cc587f2c7b3c546be9cd11bad7e3b4eeacad171
Co-Authored-By: Naoya Harada <n-harada@vx.jp.nec.com>
2016-11-15 16:25:00 +09:00
venkatamahesh
8b7b886423 Added py34, py35 to tox.ini
Now we are making python34 and python35
as voted by jenkins. So in this patch those
are added

Change-Id: Id4e67caa964ebc4772d12d1cc6ece16af9de55e6
2016-09-29 03:35:41 +00:00
AvnishPal
21e1a4d4c1 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: Ibd2c90826db6d07193e3f01c25cb49ee9994b404
Closes-Bug: #1614361
2016-08-23 09:56:25 +05:30
Jenkins
650ae2d5b5 Merge "Remove *openstack/common* from flake8 excclude list in tox.ini" 2016-08-16 23:49:55 +00:00
Lu lei
6e70a2a7fc Remove *openstack/common* from flake8 excclude list in tox.ini
The *openstack/common* was used to keep codes from oslo-incubator,
but oslo-incubator was ignore in oslo3.11.0. So I think we
needn't use it any more.
Here is the oslo.utils CHANGES link:
http://docs.openstack.org/developer/oslo.utils/history.html

Change-Id: Ia8f46f8192bed49a7a7d71103c45a6ca5d2f6012
2016-08-05 10:22:20 +08:00
Sridhar Ramaswamy
2dcb15b169 Always use upper-constraints
This patch modifies tox.ini to always use upper-constraints.

Change-Id: I24273d7789842f4c78ddc3c5f2a4bdaf72050b41
2016-08-02 00:35:02 +00:00
Kanagaraj Manickam
e575760d3c Sample tacker.conf generator
It also make required keystone config changes as part
of devstack plugin, which helps the functional test cases
to successfully complete and it makes inline with existing
tacker conf.

Closes-bug: #1592247
Change-Id: I545ceb2c9e61c22dbd8a0e1ee39a6e4fa24f8e88
2016-07-21 12:11:42 +05:30
gong yong sheng
79dfbfe2fd Use oslo i18n
Also, we move tacker.i18n into tacker._i18n.
Other i18n usage integration will be done by bug 1599735

Change-Id: I742f7be08958337720056bcc4344dcdc06606035
Partial-bug: #1552282
2016-07-12 22:57:50 +08:00
Jenkins
f6614c229d Merge "Add reno support to tacker" 2016-06-06 21:05:01 +00:00
Tin Lam
cce8dc64e8 Add reno support to tacker
Added release notes management to tacker project similar
to other OpenStack projects.  See [1].

[1] http://lists.openstack.org/pipermail/openstack-dev/2015-November/078301.html

Change-Id: I0efbf340251ba2cfb6a862f2c50905453d873e3d
2016-06-05 01:41:12 -05:00
gong yong sheng
82772a0ecd Use oslo log and oslo concurrency
To make patches small and easy to review, the task (using oslo) is
implemented in a series of patches.

In this patch, some codes under tacker/openstack/common are changed
temporarily, but they will be removed totally in later patches.

Change-Id: I5396e8e569ff8b26b387e99f2442ccfa3f27d684
Partial-Bug: #1552282
2016-06-03 11:38:36 +08:00
Jenkins
3d40c322b5 Merge "Cleanup and fix Tacker coverage" 2016-05-07 00:57:08 +00:00
Jenkins
4de857f0fb Merge "Add debug testenv in tox" 2016-04-26 02:49:33 +00:00
Sridhar Ramaswamy
d9a9892c87 Disable nova quota for dsvm functional test
Parallel execution of tacker functional test ends up
creating lots of VMs and eventually fails hitting the
default max instance of 10. This fix disables quota for
tacker functional test suite. However gate VMs still has
upper constraint on resources like 8GB max limit. To avoid
tripping the actual gate VM resource limit reduce concurrency
to a lower number (2).

Change-Id: I3fe8c012b85554fa21b5b4b64378d68e3d979cc2
Closes-Bug: #1572420
2016-04-21 21:58:26 +00:00
Larry Rensing
cddc6d5745 Cleanup and fix Tacker coverage
Test classes were being accounted for during coverage, they
are now ignored for more accurate coverage metrics. Remove
references to neutron in .coveragerc. Fix tox.ini coverage
entry.

Co-Authored-By: Larry Rensing <lr699s@att.com>
Co-Authored-By: Sridhar Ramaswamy <srics.r@gmail.com>

Change-Id: I92d50592a5ba43f68554aa933ab8582897b58b43
2016-04-21 06:08:06 +00:00
caoyue
1341c218e6 Add debug testenv in tox
Once we add debug testenv, we can use "tox -e debug"
to debug test cases when tox is running.

Change-Id: I09d988a8659ad671030f7e2cee07a86f2cc91583
2016-04-18 10:52:10 +08:00
gong yong sheng
8bdccea2bb Collect test result reports
Fix the post_test_hook.sh and tox.ini to use right tox enviroment.
Post_test_hook.sh collects the result reports.

Change-Id: Ie60cd55521d89cb2e00f3ecff0fe3af989e0f6ea
Closes-bug: 1559861
2016-03-21 18:59:06 +08:00
Jenkins
a4d5f8f8f3 Merge "Remove empty tacker.pot" 2016-02-11 19:52:50 +00:00
Andreas Jaeger
f44d44c5a7 Remove empty tacker.pot
There's no need to have an outdated translation file checked in that
has no content besides metadata. For translations, the full file would
be needed which can easily be generated.

Adjust tox test so that it passes if no translations are in tree.

Change-Id: Ib1a7abf211ed8af515ae462fce845a028d577101
2016-02-01 21:18:58 +01:00
Martin Oemke
bcb6f07df8 Fix pep8 errors in tacker code
This Patch fixes pep8 errors and
enables this tests for all new patches to tacker.

E125 continuation line does not distinguish itself from next logical line
E126 continuation line over-indented for hanging indent
E129 visually indented line with same indent as next logical line
H302 import only modules
H904 Wrap long lines in parentheses instead of a backslash

see OpenStack Style Guidelines
http://docs.openstack.org/developer/hacking/

Change-Id: I29e8ac8e6cfcd547e9bdab599635d07f0df6e3d6
Related-Bug: 1515930
2016-01-27 21:09:42 +01:00
Martin Oemke
72d421a102 Fix E713 and F811 errors in tacker code
This Patch fixes all E713 and F811 errors and
enables this test for all new patches to tacker.

E713 test for membership should be ‘not in’
F811 redefinition of unused variable

see OpenStack Style Guidelines
http://docs.openstack.org/developer/hacking/

Change-Id: I2f73c11bb5f89b3d3c2a85417ad5098fd21e580d
Related-Bug: 1515930
2016-01-12 14:12:25 +01:00
Martin Oemke
456650d663 Fix E265 errors in tacker code
This Patch fixes all E265 errors and
enables this test for all new patches to tacker.

E265 block comment should start with ‘# ‘

see OpenStack Style Guidelines
http://docs.openstack.org/developer/hacking/

Change-Id: I4b1234fab420174d99b2c13a5b25c1f7c5d4909f
Related-Bug: 1515930
2016-01-05 13:26:47 +01:00
Martin Oemke
06b53f2305 Enable pep8 tests in tacker code
This Patch enables this tests for all new patches to tacker.

F402 import module shadowed by loop variable
F812 list comprehension redefines name from line
H237 module is removed in Python 3

see OpenStack Style Guidelines
http://docs.openstack.org/developer/hacking/

This patch cleans up py26 and py33 references,
because it is just necessary to test py27 and py34.

see
http://governance.openstack.org/reference/cti/python_cti.html

Change-Id: I7b225f6939f553b06ba84d01ccbdecf41b1a910a
Related-Bug: 1515930
2015-12-28 13:26:16 +00:00