24 Commits

Author SHA1 Message Date
Oleksii Chuprykov
ab89ef5876 Tests work fine with random PYTHONHASHSEED
Change-Id: Iba6fc87bbff289ae2572a7eb132f5c946dfa0956
Related-Bug: #1348818
2014-11-12 15:55:39 +02:00
Steve Martinelli
e7bba3211a Include support for using oslo debugger in tests
Simply run `tox -e debug <test_name>` to get an interactive
debugging prompt

Change-Id: I09e5b844a33c2f0fd4230f01fbc6c0aa8d752545
2014-10-22 14:29:36 -04:00
Jenkins
89a58c65ca Merge "Add functional tests to osc" 2014-10-03 22:38:01 +00:00
Steve Martinelli
1934b1b243 Place the command to generate docs on one line
Change-Id: I99d78208c940bc6646327ee967e71187c32a159f
2014-10-03 00:09:59 -04:00
Steve Martinelli
742982af4b Add functional tests to osc
Create a script that kicks off function tests that exercise
openstackclient commands against a cloud.

If no keystone/openstack process is detected, a devstack instance
is spun up and the tests are run against that.

There is also a hook added to tox.ini so that we can run these
tests easily from a gate job.

Change-Id: I3cc8b2b800de7ca74af506d2c7e8ee481fa985f0
2014-10-01 19:46:07 -04:00
Jeremy Stanley
181166f81b Work toward Python 3.4 support and testing
Change-Id: I70d8cf0971d18b9b2eb967e28cedecc897721f58
2014-09-03 19:05:47 +00:00
Dean Troyer
f3dbab4a6c Fix PEP8 E302 errors
Also add remaining skipped checks to HACKING

Change-Id: I0c4333ce29597e0a8a233af17c15bed2b4d0711f
2014-07-22 17:51:15 -06:00
Cyril Roelandt
3cfb97e5ae Add Python 3 support
Change-Id: I65fabfc4788230b7280808ec912601c327095db0
2014-07-15 10:26:16 +02:00
Dean Troyer
4914a8d107 Fix PEP8 E126 and E202 errors
Do both as they are all in the same set of files that required
major re-formatting.

Change-Id: I6e8a8ce19a55105124a33c0e2487fc4b4e06d252
2014-06-27 09:12:55 -05:00
Dean Troyer
11f3654f6e Fix PEP8 E265 errors
Change-Id: Ieb9a9af1da27d3935d1a4d3cfb61b0ccb03d099a
2014-06-27 09:12:55 -05:00
Dean Troyer
a78d75f290 Fix PEP8 H405 errors
Change-Id: Id9ea03e7d88148f84bffe1b18b5b4315e6123012
2014-06-27 09:12:38 -05:00
Steve Martinelli
89cbdd1ae1 Add a docs job to tox.ini
A noticed that there wasn't a docs option when running tox.
Thought it would be a good idea to add one.

Partial-Bug: #1331304
Change-Id: I5af9ff5d5986ad546146c0fa73eb98256fd00c5f
2014-06-18 03:41:42 +00:00
Dean Troyer
0059f045a9 Ignore most of the new hacking 0.9.2 rules
So we can update requriements.txt.  But fix a couple of easy ones:
* Fix E251 (1 occurrance)
* Fix E131 (1 occurrance)

Change-Id: I62aaa423aa6da9e9f0ca026ec586b51cc6a6df03
2014-06-13 17:06:28 -05:00
Jeremy Stanley
380d78c856 Remove tox locale overrides
* tox.ini: The LANG, LANGUAGE and LC_ALL environment overrides were
introduced originally during the testr migration in an attempt to be
conservative about the possibility that locale settings in the
calling environment could cause consistency problems for test runs.
In actuality, this should be unnecessary and any place where it does
cause issues ought to be considered an actual bug. Also, having
these in the configuration actively causes older pip to have
problems with non-ASCII content in some package metadata files under
Python 3, so drop it now.

Change-Id: I89ff5c22be053f09defb04b3ec589d74bffcae9d
Closes-Bug: #1277495
2014-02-10 03:10:52 +00:00
Dean Troyer
c8723ce175 Update tox.ini for new tox 1.6 config
Change-Id: I4363508f562f62b16c856bc072cdb4b37e37b418
2013-09-04 14:23:15 -05:00
Dean Troyer
17f13f7bf4 Create a new base REST API interface
* restapi module provides basic REST API support
  * uses dicts rather than Resource classes
  * JSON serialization/deserialization
  * log requests in 'curl' format
  * basic API boilerplate for create/delete/list/set/show verbs
* ignore H302 due to urllib import

Change-Id: I3cb91e44e631ee19e9f5dea19b6bac5d599d19ce
2013-08-23 12:08:32 -05:00
Chuck Short
7183a11f09 python3: Introduce py33 to tox.ini
Introduce py33 to tox.ini to make testing with
python3 easier.

Change-Id: I7a775ac51e0bc0a5929184af47d51ea1cc4e3219
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2013-06-01 19:58:34 -05:00
Zhenguo Niu
bac0718764 Rename requires files to standard names.
Rename tools/pip-requires to requirements.txt and tools/test-requires
to test-requirements.txt. These are standard files, and tools in the
general world are growing intelligence about them.

Change-Id: I903213fda94a833335abaa7ad9a90bbb688ec15a
Fixes: bug #1179008
2013-05-29 17:38:13 +08:00
Monty Taylor
967d929207 Migrate to flake8.
Fixes bug 1172444

Change-Id: Ieca721663aea2fd31753df4abfb5b01a7145b26a
2013-05-16 10:36:02 -07:00
Dean Troyer
73fb88e931 Make entry point strings readable
PEP8 E126 wants continued strings to line up vertically, totally destroying the
readability and visual indication of the beginning of a string in a list

* Ignore PEP8 E126 in order to indent the entry point strings in a readable manner.
* Sort the enrty point command strings by object then verb.
* Bring other ignores from run_tests.sh to tox.ini

Change-Id: I2593de7d6c058322101bc68636317cdba29fe664
2013-03-21 21:51:08 -05:00
Josh Kearney
b26cb5bf68 Upgraded to PEP8 1.3.3 to stay aligned with Nova, etc.
Made all the necessary changes to pass new PEP8 standards.

Also cleaned up docstrings to conform to the HACKING stanards.

Change-Id: Ib8df3030da7a7885655689ab5da0717748c9edbe
2013-01-31 13:31:41 -06:00
Josh Kearney
63c8bb5306 Migrate from nose to testr.
Run tests with testr for parallel execution.

Part of blueprint grizzly-testtools.

Change-Id: I560592186f2f440049a451a32e58067262ab62d0
2013-01-22 12:16:09 -06:00
Clark Boylan
6a8302b532 Fix pep8 issues.
Fix several pep8 issues and pin the pep8 test to pep8 version 1.1.
This should prevent future changes from being unmergable by the pep8
gate after a pep8 upgrade.

Change-Id: I4678a9179579fb5c7afe795fb43a8a89a99ad717
2012-06-13 10:49:43 -07:00
James E. Blair
95c2f27fa4 Add openstack-common and test infrastructure.
Fix pep8 errors (project is pep8 clean now).

Update setup.py to use openstack-common style dependencies.

Remove the unused novaclient dependency.

Change the keystoneclient dependency to a git URL.

Add test-requires, and move some pip-requires dependencies
into it.

Remove the test_utils unit test which wasn't testing anything
that is actually present in the project.

Add the test_authors unit test.

Use tox for running tests locally.

See: http://wiki.openstack.org/ProjectTestingInterface

Tox can manage virtualenvs, and is currently doing so for running
tests in Jenkins. It's just as, or more, useful for running tests
locally, so this starts the migration from the run_tests system to
tox. The goal is to reduce duplicate testing infrastructure, and
get what's running locally on developer workstations as close to
what is run by Jenkins as possible.

Run_tests.sh will now call tox to facilitate the transition for
developers used to typing "run_tests.sh".

Developers will need tox installed on their workstations. It can
be installed from PyPI with "pip install tox". run_tests.sh outputs
those instructions if tox is not present.

New facilities are available using tox directly, including:

tox -e py26 # run tests under python 2.6
tox -e py27 # run tests under python 2.7
tox -e pep8 # run pep8 tests
tox # run all of the above
tox -e venv foo # run the command "foo" inside a virtualenv

The OpenStack nose plugin is used when running tox from the
command line, so the enhanced, colorized output is visible to
developers running the test suite locally. However, when Jenkins
runs tox, xunit output will be used instead, which is natively
understood by jenkins and much more readable in that context.

Change-Id: Ib627be3b37b5a09d3795006d412ddcc35f8c6c1e
2012-04-28 22:27:34 +00:00