Commit Graph

10 Commits (0ea2c01d757375d54aa9a9de34c2c9995bb48d13)

Author SHA1 Message Date
Stephen Finucane 7f4a6211bf Mark raw strings as such
This is raising warnings now and will be an error in future versions of
Python 3.

Change-Id: I8827cb36ef2ef85e8f245a2a181fb23ee75bfd16
2018-07-06 14:01:28 +01:00
Masayuki Igawa d0b8ebd84a
Switch to use stestr for unit tests directly
This commit switches to use stestr command to run unit tests directly.
Recently, the latest ostestr command uses stestr instead of testr.
However, we should use stestr directly because it's simple and straight
forward. There is no reason to use ostestr for unit tests anymore.

We still have the other ostestr/testr usage such as tempest run command
and documentations. So, that will be changed with following patches.

Change-Id: Iff4abef50178bdc83b868eed4a906e22d790762b
2017-09-14 16:00:31 -06:00
Masayuki Igawa 134d9f748b
Introduce flake8-import-order
This commit introduces flake8-import-order to check import orders
automatically. We shouldn't do it manually.

Depends-On: Ia2140f5566ce169b076ffa5c9ebfbdbfc41e5bed
Change-Id: Iff75ebec42b295870edd1c04001adfb17460a682
2017-02-13 17:16:18 +09:00
Matthew Treinish ffad78a29f
Fix base unit test class location
The recent commit I45d73891f3c0829a2378a032dfc02e5ac0ee34b7
deduplicated the base test class methods from the tempest.lib
reintegration. However the surviving base class was put in the wrong
namespace. The base class is just that a base to build the individual
test subclass off of. It's very confusing for that to not live in the
base tests namespace. While the code in lib is supposed to be self
contained there isn't a reason to do that here for the unit tests,
especially because in this case the import heiarchy becomes more
confusing with the base living in a submodule. This commit moves the
base class to the base tempest.tests namespace where it really

Change-Id: I079eeb1135eed3254e5e9dbebac8a52b979303c7
2016-04-22 18:11:30 -04:00
Jordan Pittier 411290482a Use tempest.tests.lib.base instead of tempest.tests.base
Those 2 files were identical. We should use `tempest.tests.lib.base`
now that we are commited to tempest.lib.
Change-Id: I45d73891f3c0829a2378a032dfc02e5ac0ee34b7
2016-04-11 12:32:01 +02:00
Matthew Treinish 0948724aea Fix last unit tests on py34
This commit fixes the last remaining issues in the tempest unit tests.
There were several failures for a couple of different issues previously
but after this running the tempest unit tests will pass on python 3.4.

Change-Id: Icf9090df83f8266a4683c88995c547e3c1bff523
2015-05-12 18:58:00 +00:00
Sean Dague 6a9764dd73 printout testr tests that fail
We test whether or not testr fails to list all the tests, however
we're not being very nice about reporting when it fails (especially
not what caused the failure), and throw a cryptic 0 != 3 mismatch

This should help make it easy to find syntax issues in the future.

Change-Id: I0d4b5b2a280813d54b0c2712a504e472370bd196
2015-01-06 17:14:54 -05:00
Matthew Treinish a0f820f372 Fix unit tests to detect import failures
This commit adds onto the existing unit test which simply runs
'testr list-tests' to run discovery on tempest. This is done to ensure
that from a bare tempest repo with the requirements all present we can
actually import and list all the tests. However, there wasn't a check
of the return code. Historically this has been an issue with discovery
failing so adding a check to enforce it moving forward should prevent
it from slipping back in. Part of this is to also fix the test so that
it runs discovery on the correct test suite.

In order to make the unit test pass a config dependency in the
scenario test test_basic_server_ops during the testscenarios call in
load_tests had to be removed. Instead if there is a configuration
error raised while running load tests on this module instead of
failing it will just return the base test class. This is fine
because the test itself will fail on the same configuration
dependencies that load_tests is, however it won't happen silently
during discovery anymore.

Change-Id: Ie74c020de7c9c27adc4ff68dddbae5d4481d1224
2014-10-27 10:01:16 -04:00
Masayuki Igawa e8d31a0b80 Remove vim headers
We don't need to have the vim headers in each source files. We can set
it in our vimrc file instead. Also if set incorrectly, gate (pep8 check)
will catch the mistakes.

More discussions:

Change-Id: I43703e2289212389c7841f44691ae7849ed1f505
Closes-Bug: #1229324
2014-01-20 11:22:45 +09:00
Matthew Treinish 519cb3ebf5 Add tempest unit test to verify the test list
If there is an error in a test file it could potentially not get run
in the tox jobs used for gating. This commit adds a test which looks
for ImportFailures in the test list to ensure that all the test files
will get run in the gate.

Change-Id: Ia0a5831810d04f2201bd856039362b4a30f39319
2013-10-31 15:59:16 +00:00