Commit Graph

169 Commits

Author SHA1 Message Date
Ghanshyam f16c70a11c Revert "Update required minimum jsonschema version >= 4.16.0"
This reverts commit e2315c1cf5.

Reason for revert:

We need to support till xena as Tempest master do support stable/xena onwards branches. stable/xena has jsonschema 3.2.0 only https://github.com/openstack/requirements/blob/stable/xena/upper-constraints.txt#L548

We need to avoid such bumping unless something is failing.

Change-Id: Ib6c9ed442b9e4b6c70af7ca7e495e644b17428d7
2023-03-02 22:44:16 +00:00
Nozomi Kawamoto e2315c1cf5 Update required minimum jsonschema version >= 4.16.0
DeprecationWarnings for jsonschema has been fixed at below path.

https://review.opendev.org/c/openstack/tempest/+/875264

But it is required to update the minimum jsonschema version >= 4.16.0
for including a below commit.

ee024ffc61

Closes-Bug: #2008490
Change-Id: I0f459d7f74406e30af725c751f3b7cd1a6a931a6
2023-03-01 00:38:22 +09:00
Balazs Gibizer dfb304355b Introduce @serial test execution decorator
Tempest provides a LockFixture to avoid two potentially interfering
tests to run in parallel. However, this solution does not scale when
we want to separate a set of tests from many other test cases. For
example, host aggregate and availability zone testing needs compute
hosts without any nova servers to be able to test moving computes
between aggregates but a lot of other tests are creating nova
servers. To fully separate these aggregate tests from the rest of
the tempest test cases, this patch proposes a @serial class decorator
to mark a test class to be run totally independently of any other test
classes.

Under the hood, the @serial decorator is implemented with a tempest-wide
interprocess read-write lock. The serial test classes always take the
write lock, while the non-serial classes take the read lock. The lock
allows in many readers OR a single writer. So the serial tests are run
independently from the rest.

To minimize the time a serial test blocks other tempest tests run in
parallel, this patch also introduced a serial_tests test directory to
store the serial tests. The current test ordering in a fresh env
uses alphabetical order so the serial tests will run at the end of
the execution not randomly in the middle. The gate uses fresh VMs
for every run so we can rely on this optimization there. In local
envs where tests are re-run, the subsequent runs will be ordered at
runtime by stestr. Therfore, a longer runtime might be observed due to
locking, but the correctness of the test execution is still kept.

Related-Bug: #821732
Change-Id: I0181517edab75f586464a38c4811417f888783b1
2023-01-18 02:45:43 +00:00
jskunda 76db176c7e Fix security vulnerabilities using Bandit
Tempest was using:
-python module xml.etree[1],

It was vulnerable to different atacks.

Instead of xml.etree.ElementTree tempest is now using
defusedxml.ElementTree which is more secure.

[1] https://bandit.readthedocs.io/en/1.7.0/blacklists/blacklist_calls.html B313

Change-Id: I50a8ab3c3be2decccd7480ecf00f1a3e4a75f172
2022-10-10 12:39:23 +00:00
Jon Schlueter 1ff7748623 Remove usage of unittest2
from comments when it was last touched it looks like workarounds for
unittest2 might be able to be dropped.

related: https://github.com/mtreinish/stestr/pull/265

simplify the workaround logic around unittest2 TestCase logic

Change-Id: Ibac9d0c2fa2f30605dd44ee58b84946464ea6449
2022-01-24 17:49:25 -05:00
Ade Lee 6ded070b51 Add support for ecdsa keys
In FIPS mode, using RSA keys for ssh is fine as long as SHA-1 is
not used for the signature algorithm.  Unfortunately, the version
of cirros used in OpenStack CI does not have a version of dropbear
that supports SHA-2 signatures.  So, any connections from a FIPS
enabled machine will fail as the cirros instance will only support
ssh-rsa (SHA-1 signatures).

To get around this, we add a new option to specify the key type
(validation.ssh_key_type).  This will allow the addition of other
key types in future if needed.

Tempest now supports 'rsa' and 'ecdsa' key types.

We also add a fips job to the experimental queue to test the usage
of the new key type.

Change-Id: Ib59eb8432fa1a2813b3047955157d1b3d24a55f8
2022-01-18 15:25:38 +00:00
songwenping d1f79f4bd6 Remove usage of six
Remove six-library, replace the following items with Python 3 style
code:
- six.moves
- six.iteritems

Remove six-library in requirement.txt

Change-Id: Ic45dff7406937c9ee6d7bd2286107bcd33e5a16d
2021-04-15 09:35:58 +00:00
asarfaty 987e797135 Update oslo.utils minimal version
Commit Ib301466bb0a1996997c63599918fa96059a927bd added the usage
of oslo_utils md5 api which was added only in release 4.7.0.
Updating the requirements to accomodate this.
In addition, changing the requirements for other dependent libraries

Change-Id: Ia86208975cdc2e4261cb6cb20547d76ddb3ec571
2021-03-22 14:07:12 +02:00
Wander Way a32c763c82 Uncap PrettyTable
This is now maintained as a Jazzband project [1].

[1] https://github.com/jazzband/prettytable

Change-Id: Id26f86a0ef721bf3175b1d67947ebf713c0d5477
2021-03-16 01:23:06 +00:00
Paras Babbar 13c7434078 Updating the paramiko version to 2.7.0 or greater
We have recently observed that ssh-keygen by default
create OPENSSH format for keys and paramiko got the
support for decrypting it from paramiko 2.7.0[1]

We have recenlty seen failures in whitebox plugin but
considering this can also be observe in tempest as well
it's good to update the version here too.

[1]: http://www.paramiko.org/changelog.html

Change-Id: I3603bbc9787e99fe864a4ec63d49fea6b90a45a8
2020-09-11 10:21:23 -04:00
Hervé Beraud eee87b504c Cap jsonschema 3.2.0 as the minimal version
Previous versions of jsonschema (<3.2.0) doesn't support python 3.8 [1].
Python 3.8 is part of the victoria supported runtimes [2] so we now force
to use jsonschema version 3.2.0 to avoid issues, remove ambiguity and ensure
that everything works with python 3 in general.

[1] https://github.com/Julian/jsonschema/pull/627
[2] https://governance.openstack.org/tc/reference/runtimes/victoria.html#python-runtimes-for-victoria

Change-Id: Id2c662c0d6146423855714a0f240eed682e3c004
2020-05-26 22:14:02 +02:00
Tony Breeds a7f16b291d Uncap jsonschema
We have jsonschema capped at a fairly old version. Other than some
specific releases, it looks like keeping it below 3.0 was added in
I943fd68b9fab3bce1764305a5058df5339470757 without really any explanation
why.

In order to update to a 3.x release we need to:
1. Remove the cap from global-requirements.txt (see Depends-On), leaving
   upper-constraints.txt at a 2.x release
2. Remove the cap from all consumers (this change)
3. Release a new version of consumers that are published to pypi
4. Update upper-constraints.txt with those new releases
5. Update jsonschema in upper-constraints.txt to a 3.X release
   (See: https://review.openstack.org/649789)
6. Test consumers with the change from 5.
7. [Optional] fix issues in consumers that arise from 6.
8. Merge the change from 5.

Change-Id: I95b5520ca0e8da7b2a7663a272bc740b8c809592
Co-Authored-by: Sean McGinnis <sean.mcginnis@gmail.com>
Depends-On: https://review.openstack.org/649669
2019-04-04 14:01:16 +11:00
OpenStack Proposal Bot f778600530 Updated from global requirements
Change-Id: Ie708a64a191155b9797f3f9f78d4f1b43c8f2cf6
2018-03-26 08:29:26 +00:00
OpenStack Proposal Bot 20b95386b7 Updated from global requirements
Change-Id: I0aedf0e3b98de0d44cb7b32c9ccd72ecd1e0003c
2018-03-15 09:36:59 +00:00
OpenStack Proposal Bot 17f7371ce9 Updated from global requirements
Change-Id: I0ff6a1d542a7e1c4f867e3ab05647388a7b64633
2018-03-13 07:35:29 +00:00
Chandan Kumar 8a4396e3d3 Switch Tempest CLI commands from testrepository to stestr
This commit switches the Tempest CLI commands to internally use stestr
instead of testrepository. At this point in time the testrepository
project is effectively unmaintained and stestr was a fork started to
have an actively maintained test runner. It also focuses on being a
dedicated python test runner, instead of an abstract test runner
interface for any tests that emit subunit.

Besides the bug fixes and other improvements included with stestr, this
switch provides a number of advantages for tempest. Primarily stestr has
a real python API for invoking the test runner directly from python. This
means we can simplify the wrapper code to simply call a function instead
of building out a set of CLI arguments and passing that to the CLI
processor.

Co-Authored-By: Matthew Treinish <mtreinish@kortar.org>

Depends-On: Ic1fa3a98b6bcd151c489b078028687892655a19b
Depends-On: I3855aad5ce129ec8ccb87c05f7aa709b74070efe
Depends-On: https://review.openstack.org/529490/
Change-Id: I6f5fa7796c576b71c4a0dde66896974a8039a848
2018-02-13 08:16:33 +00:00
OpenStack Proposal Bot 24f82fe975 Updated from global requirements
Change-Id: I0b6d108af7379683b8a15fdfb9e5f03621828c0a
2018-01-17 05:52:56 +00:00
OpenStack Proposal Bot 2119ee14d5 Updated from global requirements
Change-Id: I9a1f17345fd024594935873d15668a06028d7529
2017-12-19 01:50:38 +00:00
OpenStack Proposal Bot 26cd92b43d Updated from global requirements
Change-Id: I1671fd5cf37bf015e1c0089fd086308da99c73b3
2017-11-29 09:24:14 +00:00
OpenStack Proposal Bot 2b120082b1 Updated from global requirements
Change-Id: I3de4073d5b7f4aa91daaa32f3ddb928fda89dd3b
2017-11-16 11:29:54 +00:00
OpenStack Proposal Bot 27d36e6191 Updated from global requirements
Change-Id: I565bfe16c781098b7744797a4067b93cd8d741b8
2017-11-13 21:57:19 +00:00
OpenStack Proposal Bot aec08095e9 Updated from global requirements
Change-Id: Ib1a0274dc49346a218782274e076a65703c7c450
2017-10-15 17:11:02 +00:00
OpenStack Proposal Bot 991d62df79 Updated from global requirements
Change-Id: I6466000459e6bbd4113d1c08508243c271afa9af
2017-09-16 23:25:55 +00:00
OpenStack Proposal Bot 1b9e59b4a4 Updated from global requirements
Change-Id: I7a631b5918cb01dfa1aa351cac8e53115379fbe0
2017-09-14 00:10:19 +00:00
OpenStack Proposal Bot ba12307658 Updated from global requirements
Change-Id: I03c917bbc6074fdc5bff4abaab524c315e7488a5
2017-08-26 11:44:40 +00:00
OpenStack Proposal Bot 05c86924cd Updated from global requirements
Change-Id: I19c957445ccdb7f260c99529cdc7ce32373d20f4
2017-08-18 11:44:10 +00:00
OpenStack Proposal Bot e2fd3d5bba Updated from global requirements
Change-Id: I969b2b5d1d0d243962ebba6356f0842b5aeccee2
2017-07-22 14:54:42 +00:00
OpenStack Proposal Bot 7814b04d90 Updated from global requirements
Change-Id: Icf0e822fcb1dc958d11dd818153a53b63a66cbc9
2017-07-18 01:58:33 +00:00
OpenStack Proposal Bot d1fb3e82fd Updated from global requirements
Change-Id: I381600fe7f3c1ee00c84033699f6534e9e873ef5
2017-06-16 05:35:35 +00:00
OpenStack Proposal Bot 0e873a2d28 Updated from global requirements
Change-Id: I69c1c41e4f1762ee028402ffb241efc517601400
2017-06-04 01:19:44 +00:00
OpenStack Proposal Bot bd36c536fe Updated from global requirements
Change-Id: I99840204b12ec86a3abafcd64c9fd8ef98e7d7fe
2017-04-26 19:40:01 +00:00
OpenStack Proposal Bot 1e8d676113 Updated from global requirements
Change-Id: I5f85413f0bea11408d827e2452e6d60fe2cf0cc6
2017-04-12 04:23:44 +00:00
OpenStack Proposal Bot 41e7bd7c6f Updated from global requirements
Change-Id: I538aa04495f3f2517769854d382d76803d0da9e9
2017-03-31 17:50:56 +00:00
OpenStack Proposal Bot 86b92ea9c1 Updated from global requirements
Change-Id: If6d98a694a8655c3f981f20172159051675c1639
2017-03-15 12:53:45 +00:00
OpenStack Proposal Bot 0b5a90e12a Updated from global requirements
Change-Id: If1dd2f2dc3b0fd44aff3587b958f2db2b0a04cf8
2017-03-08 17:20:35 +00:00
OpenStack Proposal Bot 13a7fec759 Updated from global requirements
Change-Id: I958576f5679ed176107d9cb9a4bf0dd1ff00b054
2017-03-01 04:17:53 +00:00
OpenStack Proposal Bot 313ee10990 Updated from global requirements
Change-Id: I9c83cfc7eb2f57bab20759a4c9808f19f60ad503
2016-11-25 03:36:43 +00:00
OpenStack Proposal Bot 6e4ab348ae Updated from global requirements
Change-Id: I2df9d18d3c2de403c61220ef88f37d033c082006
2016-11-09 23:05:46 +00:00
OpenStack Proposal Bot 0f5eaf23ec Updated from global requirements
Change-Id: Ia19c278521b92a84e8ef2b6ef663ef407eb4d121
2016-11-06 02:08:39 +00:00
OpenStack Proposal Bot 929fe95dad Updated from global requirements
Change-Id: Ie4f71910788d4107add63f5a8ed712df2987fdc2
2016-11-04 10:39:04 +00:00
OpenStack Proposal Bot 37100d60ea Updated from global requirements
Change-Id: I22f1309857fc9f544e9ce44b3e5af9c132515093
2016-10-21 03:01:41 +00:00
Tianbiao Qi 5bea3b23c4 Remove testscenarios denpendency
Since the commit 482e3ce6ab had
just removed the NegativeAutoTest Framework, which was the only
user of package testscenarios, testscenarios is no longer used by
tempest. This patch suggests to remove testscenarios from the
package denpendency defined file requirments.txt.

Change-Id: Id2d4ab7c54223044551e4684e9ae1eee130f01c0
2016-10-17 18:36:47 +08:00
OpenStack Proposal Bot 268cd656bc Updated from global requirements
Change-Id: I8818c5898760047d8123c76fcb62be7925adfe6b
2016-10-07 19:46:28 +00:00
OpenStack Proposal Bot ec2496d7f9 Updated from global requirements
Change-Id: I760bc939ab0a50870b3293e1fd8cd7db36bae98e
2016-10-05 01:37:18 +00:00
OpenStack Proposal Bot d33ee0a74d Updated from global requirements
Change-Id: I33d204ffcdc9b5bb86acfd717ea99a99d1d64e21
2016-09-30 02:25:34 +00:00
Jordan Pittier cefaa2badd Introduce a new tox target that checks requirements.txt
That new tox target checks that we don't have missing requirements in
requirements.txt AND that we don't have superfluous (unused) requirements
in requirements.txt.

That patch is copy/pasted from I014375a5ecfebc723541c2f2db6c2e0fba636aa2
which tried to do the same for Nova (unmerged yet for an unknown reason).

This change also includes the fixes to requirements.txt needed
to pass the new tests.

Change-Id: Iff37af95269c38e4d435a53a21e5d60e2c5a3fa8
2016-09-26 16:12:34 +00:00
OpenStack Proposal Bot b6bd1ea660 Updated from global requirements
Change-Id: I0b1fe472a2fd3150034e45c662811c0f75cb9ecb
2016-09-22 13:16:58 +00:00
Jordan Pittier 35a6375fd1 Move `call_until_true` to tempest/lib
This `call_until_true()` is handy and could be used in Tempest plugins.
Let's move it to tempest/lib.

Also add some unit tests.

Change-Id: Ie379030baa336239e6027c8f3cdbeb74c561f66b
2016-09-02 18:03:37 +02:00
OpenStack Proposal Bot 3ebcf1c633 Updated from global requirements
Change-Id: Iee3e84573eea902576d553b38b3be93814ebb749
2016-08-04 02:42:54 +00:00
OpenStack Proposal Bot 1493c7f0ba Updated from global requirements
Change-Id: I42a856b6439b1f35b78a55420ddc38426472ed64
2016-07-31 23:30:43 +00:00