121 Commits

Author SHA1 Message Date
Marc Koderer
c2f9b3a3fe Activate site-packages for tempest plugins
If site-packages is deactivated tempest plugins aren't visible.
Create a new tox entry point instead of activating it globally.

Change-Id: If6cd204d4c1e64cf7bcf79bd5d32d3c10a1b2559
Closes-bug: #1478559
2015-07-27 15:19:08 +02:00
yan.haifeng
658544f6e6 Fix failed to access pip server when run behind proxy
When we run tempest on the machine behind proxy,the pip command failed to
connect to pypi.python.org to download packages.

Fix it by add another option "passenv" to [testenv] section.

Change-Id: Iedc40a2266be59a2298d5909486a1439f2757b8c
Closes-Bug: #1463978
2015-06-18 09:13:01 +08:00
Jenkins
7ebf503a9b Merge "Add passenv option to tox.ini" 2015-06-15 22:08:24 +00:00
Jenkins
cb169eec2d Merge "Remove heat-slow tox entry" 2015-05-29 15:39:46 +00:00
Attila Fazekas
83c6d08483 Remove heat-slow tox entry
The heat-slow tox entry tries to run 0 tests at the
moment.

Change-Id: I582c697d59d121bdd43d9c41eeba1b67c64a4861
2015-05-20 07:25:15 +02:00
Matthew Treinish
43073a2bf8 Add passenv option to tox.ini
Tox 2.0 introduced env variable separation, meaning that env vars set
in the env calling tox will not automatically be in the test env. This
breaks some assumptions we have in tempest. This commit adds all the
env vars which are used by testr or tempest directly for running tests
in the hope of making things work on tox 2.0 and older versions.

Change-Id: Icfe4bb5df0e48cbc9fcdbc602656672295d1887e
2015-05-14 09:05:35 -04:00
Matthew Treinish
3460aaaf3e
Add py34 to readme, pkg metadata, and envlist
This commit adds references explaining the current state of python 3.4
and tempest to the readme, pkg metadata, and adds an etry to the tox
envlist for running the unit tests on python 3.4.

Change-Id: I9c1e3cdf53dbae723a9fee67ad96932709d2305f
2015-05-13 10:17:58 -04:00
Matthew Treinish
464d287f5b
Remove CLI testing once and for all
The cli tests have been marked for removal for ~6 months and the
framework was the first thing included in tempest lib. There has
been more than enough time for all the projects to pick this up
in the client repos. So let's remove it all!

As part of this a couple of missing entries for tempest's
requirements.txt were found. These dependencies were being installed
by the clients so the fact they were missing was never noticed prior
to this. This commit also adds these missing entries back into the
requirements file.

Change-Id: I4f8638f1c048bbdb598dd181f4af272ef9923806
2015-05-07 14:17:44 -04:00
Sean Dague
3c634d1419 not all scenario tests should be in smoke
The decision to include all of scenario by default makes for an
extremely heavy test of tests in smoke, we should instead only include
specific scenario tests that expose some basic sanity
checking. Advanced scenario tests should be dropped from this list.

This change means we no longer have to exclude 'slow' tests, as we'll
just tag the right tests with smoke.

Change-Id: I34aa8aa9274e02bb68f62863d64c47ba9916f2e4
2015-04-29 06:05:50 -04:00
Jenkins
72c76893a1 Merge "Fix and re-enable H105" 2015-03-04 07:44:28 +00:00
Jenkins
d32c845a34 Merge "Move to hacking 0.10" 2015-03-04 07:43:34 +00:00
Chris Hoge
7579c1a40e Add UUIDs to all tempest tests and gate check
Adds uuid4 as a decorator of the form:
@test.idempotent_id('12345678-1234-1234-1234-123456789abc')
to every test in the Tempest tree. Includes a gate check to
ensure the existence and uniqueness of the ids.

Modify check tool to ignore Tempest unit tests.

Change-Id: I19e3c7dd555a3ea09d585fb9091c357a300e6559
Co-Authored-By: Sergey Slipushenko <sslypushenko@mirantis.com>
Implements: bp test-uuid
2015-02-26 16:05:16 -08:00
Chris Hoge
296558cf41 Add UUIDs to tests with tools and checks
This patch adds a new tool to check for existence and uniqueness
of UUIDs across Tempest or any other test repository based on
Tempest. The tool also includes an option to automatically tag
a test repository with UUIDs if they don't exist. The tool
will be used in the gate to ensure UUID existence.

Change-Id: I25aa83c7836f5a607af2aaa4bf862fa72766f799
Co-Authored-By: Sergey Slipushenko <sslypushenko@mirantis.com>
Partially-Implements: bp test-uuid
2015-02-26 13:59:05 -08:00
Joe Gordon
a62baa099d Fix and re-enable H105
Enable Hacking Hacking H105 (Don't use author tags, as we have git for
that)

Change-Id: I7c5379da34d21717feab19684ffc5ead6d50399b
2015-02-25 12:51:46 -08:00
Joe Gordon
28788b4ec0 Move to hacking 0.10
Release notes:
http://lists.openstack.org/pipermail/openstack-dev/2015-January/054165.html

Fix minor changes for new/improved rules.

Remove references to deleted rules. Skip new rule H105, enable in
subsequent patch.

Change-Id: Ibe07679034f575c403aced46c0221b96d299ea83
2015-02-25 12:42:37 -08:00
Joe Gordon
9f1612e7af Turn off sitepackages
Fully decouple the versions needed for tempest from the underlying
system. This will help make it possible to pin library versions on
stable branches to the library version used when the branch was
cut, while allowing master global requirements to move beyond that
version.

Note: We previously enabled sitepackages everywhere to avoid
recompiling indirect dependencies that were pulled in via the
pythonclients. To address this we were working on removing the CLI tests
from tempest.

Change-Id: I3b355fb592dbbd38cb6805ec413e02644088b088
2015-01-28 13:35:56 -08:00
Jeremy Stanley
0ae5d52a31 Preupgrade setuptools in tox tempestenv
* tox.ini: If setuptools is declared as a dependency, even
transitively, it can trigger a race in some versions of pip when
called with -U wherein pip removes setuptools in preparation for
upgrading it, and then proceeds to install something else using
setuptools. Work around this behavior by upgrading setuptools within
the virtualenv in advance.

Change-Id: I6d9bf61c1ce41e46ff6f621bfa88d511f6c16120
Related-Bug: #1405579
2014-12-29 20:37:14 +00:00
Sean Dague
c7b4d88c5a rm pyc files before test runs
It's extremely easy for incorrect local results to happen if a file
has been moved or deleted in an upstream pull. Add the rm pyc cantrip
to ensure local testing matches what a clean upstream is going to be
like as much as possible.

Change-Id: Iecf18d7c2310918ec90c14c64cd3083e46459980
2014-11-25 08:18:23 -05:00
David Kranz
03fbe5cae1 Fix tox stress invocation to not quote arguments
Change-Id: I6fc1e64c3e52a02126235d5cc42831ee2d25f997
2014-11-11 15:29:00 -05:00
David Kranz
f9695d21b3 Increase the 'all' timeout because slow tests are included
The default for tempest in .testr.conf is 500s. This was too short for
the heat slow tests so the time for that was increased to 1200. This
change is to a periodic job so if we need to it can be increased more
in the future.

Change-Id: If27ddef9865c54b997130c707382d2014d82e0a6
2014-10-30 14:53:05 -04:00
Jon Grimm
edcb24c858 Remove PYTHONHASHSEED=0 from tox pep8 job
Tempest has moved to new oslo-config-generator and this bug
workaround is no longer needed.

Change-Id: I50ffdcbc8a8f4830ba9c274af4c908e96467dad5
Closes-Bug: 1365136
2014-10-16 18:09:40 +00:00
Jon Grimm
270bd7f8ce Move tempest to oslo-config-generator
Also fixes tempest reported bug with old generator in oslo-incubator,
when identical options are registered in different groups.

Change-Id: I274f48503c1b61ca09cabc8d8c50245ba1059943
Closes-bug: 1282887
2014-10-16 16:06:43 +00:00
David Kranz
ea202d789e Don't use a specific arg list for stress in tox.ini
Callers should be able to specify the arguments.

Change-Id: I1d60af5e5300ff91ce3777ac46df655442098013
2014-10-10 12:13:05 -04:00
Matthew Treinish
5b7626a123 Clean up tox.ini and make tempest and unit test distinct
This commit creates a separate base env for tempest tests and
tempest's unit tests. However, to keep the same interface the tempest
env is setup by overloading the testenv using substitution from a
common base section.

As part of this internal reorganization in the tox.ini several other
things are cleaned up or removed. Usless or duplicate job definitions
are removed. The unit tests are switched to pretty_tox. Previously
they were run without any output which made it difficult to figure out
exactly what was running. Additionally, this removes the unnecessary
regex filter on the unit test job. The unit tests use a different
discovery path so there is no need to also filter it on the same path
this will allow the use of more specific regexes with tox to filter
tests.

Change-Id: I996d81dec2739bbe907f5fe87a335994c01697b3
2014-09-29 14:26:51 -04:00
Jenkins
5b45439078 Merge "Work toward Python 3.4 support and testing" 2014-09-29 16:41:59 +00:00
Jenkins
0c8dc861af Merge "Add bash to tox whitelist_externals" 2014-09-29 16:38:50 +00:00
Joe Gordon
fdd0663a55 Add bash to tox whitelist_externals
Stop triggering triggering a “not installed in virtualenv” every time
bash is called. Since we use this in all tempest based jobs, we have
these unnecessary warnings all over the place.

Change-Id: I8af53c0241dbcd656c274944338384be0f2f250d
2014-09-24 17:35:02 -07:00
Adam Gandelman
a10f768ac1 Remove PYTHONHASHSEED=0 from tox.ini
We've ironed out remaining issues that crop up when running
with a random seed. This updates tox.ini to revert to the default
behavior of running with PYTHONHASHSEED=random.  The pep8 check
continues to run with PYTHONHASHSEED=0 to workaround oslo issues
around config value ordering in the check_uptodate.sh test.

Change-Id: Ifa0dba8c3970fc676d374f33c129ef0f9d526c94
2014-09-15 12:09:52 -07:00
Jeremy Stanley
dd2e07acb9 Work toward Python 3.4 support and testing
Change-Id: If36e1a5e51cf63e499acb374d4aeace608c13512
2014-09-03 19:40:14 +00:00
Matthew Treinish
3a48181b1d Fix tox coverage job
To run the tempest unit tests with coverage enabled the coverage
module needs to be installed. This requirement is properly listed in
test-requirements.txt, however the coverage job definition wasn't
installing coverage. This commit fixes this oversight by adding the
test-requirements file as a dependency for the job.

Change-Id: Ic443c6c4a3166e6b198cbe2af0a77ff2f0a38e83
2014-08-26 19:08:43 -04:00
Adam Gandelman
359738a2be Ensure PYTHONHASHSEED=0 for the 'all' tox env
This removes the setenv override and sets the required
PYTHONHASHSEED=0 for the 'all' tox target, which devstack-vm-gate.sh
ends up calling for the current Ironic job.

Change-Id: Icc6a1cae1e49140c4e4648f6c75ad415f92479ce
Closes-bug: #1359929
2014-08-21 14:46:23 -07:00
Matthew Treinish
75d540db2e Disable hacking rule H305
This commit disables the H305 rule because it is inconsistent between
python releases. Additionally while the logical grouping is a good
thing in most cases it can be excessive to enforce sometimes. Having
reviewers attempt to catch it in most cases should be sufficient.

Change-Id: I7530fe2295c4260a20f8cdd1f853611a9a6b2f99
2014-08-15 14:19:03 -04:00
Matthew Treinish
1d14c54fd8 Enable E128 ignore E129
After bumping the hacking version to the 0.9.x series ignores were
added for several rules. This commit fixes the violations for a subset
of these rules and re-enables the checks.

Change-Id: Iaff25fc9e2ecfad0c0574b39ddce0c5188d6c31f
2014-08-13 17:50:55 -04:00
Matthew Treinish
96e9e88dc0 Enable H407,H305,H307,E122 ignore E123
After bumping the hacking version to the 0.9.x series ignores were
added for several rules. This commit fixes the violations for a subset
of these rules and re-enables the checks.

E123 is ignored because this rule is ignored in the default pep8 by
default, due to a lack of consensus around it.

Change-Id: I8f14cd2ca6afc38d3fe8ee758272071111022896
2014-08-12 17:39:16 -04:00
Matthew Treinish
256a21de76 Set python hash seed to 0 in tox.ini
New tox (>=1.7.0) sets a random python hash seed by default. This is
generally good for testing because it will help keep projects working
regardless of the hash seed, but tempest unittests don't currently
pass a with a random hash seed so set it to the python default seed.

This change will allow us to use new tox again and remove the
restriction on tox<=1.6.1 to run unittests.

Change-Id: Ib54364877a251db48c54dfdc43c503281ea1f04a
2014-08-05 23:23:01 -04:00
Jenkins
11004be543 Merge "Add tox job to build docs" 2014-07-11 14:33:47 +00:00
Jenkins
966c99f777 Merge "add py27 to default tox" 2014-06-29 14:42:07 +00:00
Sean Dague
5420d2d2c6 add py27 to default tox
because we should be unit testing when you run tox

Change-Id: If0bba55d80d900ccd39c7714edcd0bfd79d31467
2014-06-25 18:12:39 -04:00
Matthew Treinish
afeb91a5da Use config generator rc instead of wrapper script
This commit removes the generate_sample wrapper script and adds an
rc file for the config generator to specify the alternate path.
This makes console messages from the generator tooling point
consistent with what is actually being used. Before because a wrapper
was used error messages would recommend running the incorrect tool.

Change-Id: I0ac792454777af6e3f1d718836031f9a14850229
2014-06-19 16:54:48 +00:00
Matthew Treinish
8bd013ea6a Add tox job to build docs
This commit adds a tox job to build the docs. It calls the setup.py
build_sphinx command.

Change-Id: I84dbd1aaea142bbe45c73df04856e128621143db
2014-06-18 21:58:32 -04:00
Matthew Treinish
571605828b Enable E251,E265 rules ignore H402
After bumping the hacking version to the 0.9.x series ignores were
added for several rules. This commit fixes the violations for a subset
of these rules and re-enables the checks.

Change-Id: If2445c395d481f3c5f6426a471da4ec8afb553f0
2014-06-17 22:54:49 -04:00
Matthew Treinish
c795b9e136 Enable E113,E111,H302,F812,E713 rules
After bumping the hacking version to the 0.9.x series ignores were
added for several rules. This commit fixes the violations for a subset
of these rules and re-enables the checks.

Change-Id: I8cc92a5de5acf43a2143751851cf6fddab401ba4
2014-06-17 23:33:30 +00:00
Matthew Treinish
b013678a10 Bump hacking to 0.9.x series
Hacking 0.9.0 had a minor bug so require 0.9.1 or higher.

In order to keep this patch to just a requirements bump, ignore new and
stricter hacking rules that are being triggered. Fixing up the code and
turning these on is out of scope of this patch and is for future patches.

Change-Id: Iafbd4adae8c6b446d53b62dfc490eab8e76a43ac
2014-06-17 17:34:09 -04:00
Matthew Treinish
55e29b457c Make run_stress.py script an entry point
With change f8b816af0751b10cc20b0ab456ca334150fcdf5f we started
packaging binaries using pbr entry points. The run_stress.py script
previously lived in tempest.stress, howver since it is intended to be
run as a binary the proper place for it is now tempest.cmd and using
an entry-point it will be easier to run it outside of the tempest
tree.

Change-Id: I96b2c7915875f4f9d7869b8728bf2c6f6ccbeec9
2014-06-09 15:31:42 +00:00
Matthew Treinish
5c660abe58 Enable H302 rule everywhere
This patch enables the use of the H302 hacking rule everywhere. With
one exception of the client class imports in clients.py, this
is intentionally ignored.

Change-Id: Ia0ef5e44a411ccd6e6c12f9cf64427a96e021b47
2014-05-18 21:14:36 -04:00
Matthew Treinish
2b6db0c641 Add hacking import exception for service clients
This commit adds import exceptions to the service client imports.
The service clients are imported at the class level and it would be
a major effort to change this. However, we want to be enforcing H302
everywhere else. This commit adds an exception to allow importing the
service clients as classes.

Change-Id: Ife74539fe04e97740e45325140f407fd7476e1c7
2014-05-17 10:49:58 -04:00
Matthew Treinish
20095908b2 Make heat-slow job run in parallel
The heat slow job was running it's tests serially. This patch changes
that so the tests will run in parallel to enable faster execution.

Change-Id: I55fe85952c13b2b40b2b9f5b4dd6073b21b7a3ea
2014-04-03 14:06:32 -04:00
Attila Fazekas
5739ac1ba0 Use pretty tox with the `all` env
The all entry is usable for running custom set of test
cases selected by a regexp in similar venv
as the gate uses with tox -eall.

The pretty tox helps you to see some basic results before,
 the test suite finished.

Change-Id: I553e450ad0a59308be0bfa24aa66877cdb6667da
2014-02-27 16:05:58 +01:00
Sean Dague
a646d179ae Revert "always use sitepackages"
This reverts commit c81568fa85620746534331cd820b0bb399719149.

After learning what I learned about how sitepackages works, this
wasn't really a sane change. Revert back to old behavior.

Change-Id: I8079a0f4d9e0bc2e51a743d4f23cf98d4840a3ab
2014-02-27 06:34:03 -05:00
Matthew Treinish
a74f5d4fba Mildly wound the interlopers
This commit removes all the references to nose in the tempest tree.
Moving forward trying to support nose which doesn't support some of the
features we rely on in tempest is increasingly difficult. Please refer
to this thread:

http://lists.openstack.org/pipermail/openstack-dev/2014-January/024673.html

for a more detailed explanation and the discussion regarding this.

Change-Id: I3dee566d33efe1fb7808817b885d1680736abe6a
2014-02-19 16:17:32 +00:00