Commit Graph

285 Commits

Author SHA1 Message Date
Rajesh Tailor a85bdb47ef [codespell] fix typos
This change fixes typos in tempest code, doc, zuul yaml
and tox.ini file, which are found by codespell.

Change-Id: I8051d979e28f7dbf532181f339cbef9cd7220c76
2024-04-02 12:12:32 +05:30
Ghanshyam Mann 16f6a0d55f Switch to the master constraint in tox.ini
To releas a new tag for Tempest 2024.1, we modified the
compatible constraint in tox.ini
- https://review.opendev.org/c/openstack/tempest/+/913950/

As new tag is released now so we can switch back to the master
constraint in tox.ini.

Change-Id: I1ec341903929f240ef3e796ee0db2acda9af9823
2024-03-22 13:00:13 +00:00
Ghanshyam Mann d5f63dbe33 Use stable constraint in tox to release new tag for 2024.1
We are going to release Tempest new tag to declare the start of
support for stable/2024.1. So that new tag use stable/2024.1
constraint in the tox env.

For example: if anyone use Tempest new tag in future say
1 year later then tox env also should use the 2024.1 contstraint for
compatibility instead master.

Also, making ironic-tempest-bios-ipmi-direct-tinyipa as
non voting to merge his change.

These need to be reverted once release is done.

Change-Id: I5ee1ce6b3ffbbb1f47e448fc15d540f74b21684f
2024-03-22 12:58:58 +00:00
Zuul 0edee3b8d8 Merge "Use 'tempest run --slowest' in integrated-compute" 2024-02-08 20:28:11 +00:00
Ghanshyam Mann f870b13e0d Switch back the tox constraint to master
Tempest 37.0.0 release hash is prepared[1] so we can
revert back to use the master constraints by default.

[1] https://review.opendev.org/c/openstack/releases/+/908346

Change-Id: I6487792f9bd6aa6c6383ae6448038f6d77a5beb9
2024-02-07 19:45:05 -08:00
Ghanshyam Mann 7edc9f5241 Pin stable/2023.2 constraint in tox to release 37.0.0
We are going to release Tempest new tag 37.0.0 to declare
the end of support for stable/yoga. stable/2023.2 constraint
is latest stable constraints tested with current tempest hash
which is going to be used for 37.0.0 release.

Further information:
 https://docs.openstack.org/tempest/latest/requirement_upper_constraint_for_tempest.html

Change-Id: I0b4863c219b71b75f665e7a7599063124c34b2de
2024-02-07 19:43:57 -08:00
Martin Kopec d76178e682 General doc updates
Added missing doc, for example for serial tests, fixed 404 links,
spellings, formatting and etc

Change-Id: I07a8cf9508d3cba33bd04afdc301bb7145153d59
2024-01-31 09:00:16 +01:00
melanie witt f59ee150a5 Use 'tempest run --slowest' in integrated-compute
This adds the '--slowest' option to the 'tempest run' command line for
the [testenv:integrated-compute] to show the slowest tests after the
tests finish running.

Change-Id: I53b0fa6dcf077191565e2aaf3f08a24b3238a34b
2023-12-07 03:36:01 +00:00
Zuul 88e165a4a8 Merge "Add unit tests to increase coverage" 2023-10-09 20:02:17 +00:00
Katarina Strenkova 433dbdc4b9 Add unit tests to increase coverage
This patch proposes adding several new unit tests in effort to increase
the total unit test coverage.

Additionally, the ./tempest/serial_tests/ directory is not included in
coverage calculation. The reason being we don't want to test tests with
unit tests, which becomes a bit of an overkill.

Finally, there is an addition of a new option for the coverage program
called --fail-under. It will result the program in failure if the
coverage is under set percentage. Reason for this implementation is to
encourage writing unit tests for new code.

Change-Id: I804116413cd7d73cd7e5ae71409a8855ef937b88
2023-10-04 13:14:24 +00:00
Ghanshyam Mann 6a122ead59 Switch to the master constraint in tox.ini
To releas a new tag for Tempest 2023.2, we modified the
compatible constraint in tox.ini
- https://review.opendev.org/c/openstack/tempest/+/874359/1

As new tag is released now so we can switch back to the master
constraint in tox.ini.

Change-Id: I431ec42d81c4d2a95d6f541c794607de1f9cadb8
2023-09-26 18:53:17 -07:00
Ghanshyam Mann 3926608631 Use stable constraint in tox to release new tag for 2023.2
We are going to release Tempest new tag to declare the start of
support for stable/2023.2. So that new tag use stable/2023.2
constraint in the tox env.

For example: if anyone use Tempest new tag in future say
1 year later then tox env also should use the 2023.2 contstraint for
compatibility instead master.

Also, making ironic-tempest-bios-ipmi-direct-tinyipa as
non voting to merge his change.

These need to be reverted once release is done.

Change-Id: Iea83eb6b467f40b9398262d6ddf6912d0ea98d1a
2023-09-26 19:55:01 +00:00
Pavlo Shchelokovskyy 53885e50fa Use upper constraints in pep8 test run
this is to avoid current problem due to
https://github.com/mtreinish/stestr/issues/347
but also to equalize dependencies with other test  envs.

Change-Id: I867bec362d83ab820aa6b11dc4770d50133ecdbf
2023-09-20 08:49:15 +00:00
likui e427f4efbf tox: Remove basepython
Python 2 is EOL. No environment should be defaulting to it. Our CI
environments certainly aren't.

Change-Id: Id985594cbf14c2b2ffe4dd72cb17365bfec8ebda
2023-08-03 13:07:34 +08:00
yatin b70d30d10c Revert "Run test_port_security_macspoofing_port slow tests serially"
This reverts commit 33e4e24df5.

Reason for revert: Test fixed with [1].
[1] https://review.opendev.org/c/openstack/tempest/+/889713

Change-Id: Ied75aa4c3332a99bc10bcb65d4624a5cafd56f8b
2023-07-27 04:30:57 +00:00
Ghanshyam Mann 33e4e24df5 Run test_port_security_macspoofing_port slow tests serially
Below commit made all the slow test run parallel
which has improved the tempest-slow time to almost
half. But there are some issue in running the
test_port_security_macspoofing_port slow scenario tests
in parallel and it fail many time

https://storage.bhs.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_db5/887220/5/check/tempest-slow-py3/db5adef/testr_results.html

Let's run this test in serial and see if we hit
any other test like this which is causing issue while
running on parallel.

Change-Id: Id0762a51f7ff72905c6c05bdff2e18321d616c91
2023-07-20 18:26:12 -05:00
Ghanshyam Mann e095e74a09 Switch back the tox constraint to master
Tempest 35.0.0 release hash is prepared[1] so we can
revert back to use the master constraints by default.

[1] https://review.opendev.org/c/openstack/tempest/+/885090/1

Change-Id: I02559c88825b69477958a6114d93bd428a7759ca
2023-06-06 20:37:41 +00:00
Ghanshyam Mann 366e020b20 Pin stable/2023.1 constraint in tox to release 35.0.0
We are going to release Tempest new tag 35.0.0 to declare
the end of support for stable/xena. stable/2023.1 constraint
is latest stable constraints tested with current tempest hash
which is going to be used for 35.0.0 release.

Further information:
 https://docs.openstack.org/tempest/latest/requirement_upper_constraint_for_tempest.html

Change-Id: I658c195385418fe84e6b9574a089fd1ede3e8217
2023-06-06 20:37:38 +00:00
Ghanshyam Mann 0ab4ca3f3f Switch to the master constraint in tox.ini
To releas a new tag for Tempest, we modified the
compatible constraint in tox.ini
- https://review.opendev.org/c/openstack/tempest/+/882354/

As new tag is released now so we can switch back to the master
constraint in tox.ini.

Change-Id: Ic4f60c6a1b8b657edf06cffc9165c49da4395389
2023-05-05 00:22:04 +00:00
Ghanshyam Mann 8d15219774 Use stable constraint in tox to release Tempest new tag
We are going to release Tempest new tag which work with
the stable/2023.1 constraint so use that in the tox env.

For example: if anyone use Tempest new tag in future say
1 year later then tox env also should use the 2023.1 contstraint for
compatibility instead master.

These need to be move back to master constraint once release is done.

Change-Id: I81c251c7f006b8792c006db88bd47fdb40df14a1
2023-05-05 00:22:00 +00:00
Ghanshyam Mann 91e2be9ebf Switch to the master constraint in tox.ini
To releas a new tag for Tempest 2023.1, we modified the
compatible constraint in tox.ini
- https://review.opendev.org/c/openstack/tempest/+/877713

As new tag is released now so we can switch back to the master
constraint in tox.ini.

Change-Id: Ic91e443ae1948d71fa276be03dcef4576c64df33
2023-03-16 14:52:29 -05:00
Ghanshyam Mann 00a315dc96 Use stable constraint in tox to release new tag for 2023.1
We will release Tempest new tag to get cinder tests
fix[1] in stable/2023.1. Without the cinder test fix[1], tempest
released for 2023.1 will not work with cinder in 2023.1.
So that new tag use stable/2023.1 constraint in the tox env.

For example: if anyone uses Tempest new tag in future say
1 year later then tox env also should use the 2023.1 contstraint for
compatibility instead master.

These need to be move back to master constraint once release is done.

[1] https://review.opendev.org/c/openstack/tempest/+/875372

Change-Id: Ibb348e0642190b3a83d8b5f86c8b49295cf071e0
2023-03-16 14:50:38 -05:00
Ghanshyam Mann 518e426ab4 Separate the extra tests to run in a separate job
Recently we are seeing a lot of job timeout(bug#2004780)
and we see many tests taking time and also number of tests
increasing over time. This is to prepare the list of extra tests
(here extra tests means the tests which are covered by the other
API or scenario tests) which we do not need to run in every
integrated jobs. Instead, we can run them in a separete job(s).

Currently I am adding admin (except keystone) and negative tests
in the 'extra tests' list but we can add more tests here which
we think are covered in some other tests.

As negative tests are important for interop, adding those extra
tests coverage for stable branch job also but running them in
periodic run only.

Related-Bug: #2004780
Change-Id: Id02221df0d6180519751c63e890851bd59fdafa0
2023-02-11 19:05:34 +00:00
Ghanshyam Mann e2183ca8f6 Minimize the tests footprint in multinode job
multinode job run all the tests including multinode and
non multinode tests. But we do not need to run all the
non multinode tests in this job instead smoke tests along
with multinode tests should be enough to run. This make
multinode jobs to run only smoke and multinode tests. For
that, we need to tag the multinode tests with 'multinode' attr.

Relavant-Bug: #2004780
Change-Id: I7e87d1db3ef3a00b3d27f0904d0af6a270e03837
2023-02-11 19:05:26 +00:00
Ghanshyam Mann 6bb98c2aa4 Prepare tempest-slow-parallel job and run periodically
tempest-slow-py3 job run all the slow test serially which
takes lot of time and end up job timeout. This preparing
tempest-slow-parallel job which will run slow tests parallelly
in periodic run. Based on the results, later we can make
tempest-slow-py3 job to run tests in parallel.

Also, run tempest-full-parallel in periodic and based on the
result we can run tempest-full-py3 job scenario tests in parallel.

Relavant-Bug: #2004780

Change-Id: I876dacb40daa384cddc8faae3200cd3d39506ddc
2023-02-11 19:05:19 +00:00
Lukas Piwowarski f047361da5 Fix escaping of regular expressions in tox.ini
With the new version of tox, the interpretation of escaping in the
command section changed [1]. For example, the `tox -e smoke` runs the
following command to execute tempest tests when tox==4.3.5. is installed:

tempest run --regex '[.*\bsmoke\b.*]'
(missing '\' in front of '[', ']') ^^

The issue can be fixed either by adding another backslash ('\\[') or
moving the regular expressions to separate variables. The first solution
won't, however, be backwards compatible with the older version of tox
therefore this patch uses the second approach.

[1] https://tox.wiki/en/latest/config.html#substitutions

Change-Id: Ie5ea7f9305c7e7611f205d2e0703849bd6321a68
2023-01-31 14:18:47 +01: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
Ghanshyam Mann ea6644ce45 Fix tox4 error
tox.ini started failing with Tox4 which had some
incompatible changes. One is passenv where we need
to pass each value in newline otherwise, it fails with
error:

 failed with pass_env values cannot contain whitespace,
 use comma to have multiple values in a single line,
 invalid values found.....

Also adding tempest in allowlist_externals as it is required
by unit test also.

Fixing tox.ini for tox4 changes.

Change-Id: I55cd9855d8232c007b012c19755c837e97823aea
2022-12-26 18:25:32 +00:00
Ghanshyam Mann 5c075ccef2 Switch back the tox constraint to master
Tempest 33.0.0 release hash is prepared[1] so we can
revert back to use the master constraints by default.

[1] https://review.opendev.org/c/openstack/tempest/+/864372/

Change-Id: I1a3cea4cc543aabe61483a32f71b2b9db178cecf
2022-12-07 00:37:54 +00:00
Ghanshyam Mann 633bd0d13a Pin stable/zed constraint in tox to release 33.0.0
We are going to release Tempest new tag 33.0.0 to declare
the end of support for stable/wallaby. stable/zed constraint
is latest stable constraints tested with current tempest hash
which is going to be used for 33.0.0 release.

Further information:
 https://docs.openstack.org/tempest/latest/requirement_upper_constraint_for_tempest.html

Change-Id: Ia8536e783df945a273b8697b128a5115104d3c12
2022-12-07 00:37:48 +00:00
Clark Boylan a673bd93cb Cleanup tox.ini
We remove install_command because the value set here is basically the
default but with one small difference. It doesn't run using `python -m
pip` which means we could potentially find a global pip install which
installs to the wrong python by default. Using python -m pip as the tox
default does should ensure it consistently finds the venv pip.

Additionally we stop allowlisting all external commands to make problems
like this more apparent.

Change-Id: I75a6bd7985fce66b3e8a4cb81320b22d71f6bc4a
2022-11-22 09:30:23 -08:00
ghanshyam mann b39bbcc0bc Switch to the master constraint in tox.ini
To releas a new tag for Tempest Zed, we modified the
compatible constraint in tox.ini
- https://review.opendev.org/c/openstack/tempest/+/857602/2

As new tag is released now so we can switch back to the master
constraint in tox.ini.

Change-Id: I20f8d726d5b9adf9e5b7669c1b3ff8b28d46f0ac
2022-09-14 15:21:08 +05:30
ghanshyam mann 979f05a03b Use stable constraint in tox to release new tag for Zed
We are going to release Tempest new tag to declare the start of
support for stable/zed. So that new tag use stable/zed
constraint in the tox env.

For example: if anyone use Tempest new tag (32.0.0) in future say
1 year later then tox env also should use the zed contstraint for
compatibility instead master.

These need to be move back to master constraint once release is done.

Change-Id: I188a23bf77855358535986256b17fcc4cc6405f9
2022-09-14 15:12:03 +05:30
Martin Kopec c008dd256a Switch the tox contraints back to master
Tempest 31.1.0 is released so we can switch the tox constraints
back to master.

Change-Id: I6c590ed2f0872ee49c6ae7ad82eb872c65fe6ef4
2022-06-27 16:53:06 +02:00
Martin Kopec 9bda35d94b Use yoga stable contraint in tox to release 31.1.0
We are going to release a new tempest tag 31.1.0 cut an
intermediate release during the Zed development cycle to
make bug fixes available for plugins and other consumers.

Change-Id: Iebd6d6412537959e3e59bf899c3670601733cef3
2022-06-27 16:49:11 +02:00
Ghanshyam Mann 1791e5d871 Switch back the tox constraint to master
Tempest 31.0.0 is released so we can
switch back the tox constraints to master.

Change-Id: Iee98fc45e44c5795875858918b630b70e6251eed
2022-05-31 01:09:30 +00:00
Ghanshyam Mann d2192f8059 Use yoga stable constraint in tox to release 31.0.0
We are going to release Tempest new tag 31.0.0 to declare
the end of support for stable/ussuri. Pinning constraints
in tox.ini with stable/yoga constraint because Tempest is tested
with stable/yoga and master constraints. It did not use master constraints
as master dev cycle is in progress and so does their constraints also
is in progress and keep getting modified.

Further information:
 https://docs.openstack.org/tempest/latest/requirement_upper_constraint_for_tempest.html

Change-Id: Ief33c3ebb527b81ae8fbd222237ad5605fad045a
2022-05-31 01:09:25 +00:00
Ghanshyam Mann 87661fcef7 Drop py3.6 and py3.7 from Tempest
In zed cycle, OpenStack projects and oslo lib
has dropped the py3.6 and py3.7 support

- https://governance.openstack.org/tc/reference/runtimes/zed.html

With oslo not supporting the py3.6 and py3.7, Tempest master is
failing and cannot be run on py3.6|7 env.

- https://bugs.launchpad.net/tempest/+bug/1975036

We discussed about how to solve it in ML[1] and QA meeting[2] and
decided to drop it from Tempest too. Stable branches testing from
stable/victoria to stable/yoga (currently supported branch by Tempest
master) can be tested on py3.8 or if cloud run those releases on py3.6
then Tempest can be run in virtual env with py38.

Closes-Bug: #1975036

[1] http://lists.openstack.org/pipermail/openstack-discuss/2022-May/028622.html
[2] https://meetings.opendev.org/irclogs/%23openstack-qa/%23openstack-qa.2022-05-24.log.html#t2022-05-24T15:31:51

Change-Id: Ie844887a798a006794729e733748ceaa5e06d2db
2022-05-31 01:09:20 +00:00
Ghanshyam Mann 6853f8da03 Switch to the master constraint in tox.ini
To releas a new tag for Tempest Yoga, we modified the
compatible constraint in tox.ini
- https://review.opendev.org/c/openstack/tempest/+/832739/1

As new tag is released now so we can switch back to the master
constraint in tox.ini.

Change-Id: I4330b958970c28ed373e6385c8ac9b813c1257a8
2022-03-09 17:10:02 +00:00
Ghanshyam Mann e4d7182d68 Use stable constraint in tox to release new tag for Yoga
We are going to release Tempest new tag to declare the start of
support for stable/yoga. So that new tag use stable/yoga
constraint in the tox env.

For example: if anyone use Tempest new tag (30.0.0) in future say
1 year later then tox env also should use the yoga contstraint for
compatibility instead master.

These need to be move back to master constraint once release is done.

By using master constraint in tox for all the old tag is problem and
we faced the issue of constraint incompatibility due to that and we
have to work around it all over the devstack, tempest role, grenade to
set the stable constraint cia env var.

Change-Id: Ie3159da1b9b73652f52cf22d87ab1dd0ae6411d9
2022-03-09 17:09:38 +00:00
Zuul 8758c3aac0 Merge "Use LOG.warning instead of deprecated LOG.warn" 2022-03-02 13:15:05 +00:00
Takashi Kajinami 2a5ef1b933 Use LOG.warning instead of deprecated LOG.warn
The LOG.warn method is deprecated[1] and the LOG.warning method should
be used instead.

[1] https://docs.python.org/3/library/logging.html#logging.warning

Change-Id: I43e2269d4b1c425119c86919eb869941d621c6de
2022-01-19 13:38:21 +09:00
Zuul 322b60153b Merge "Define default OS_TEST_TIMEOUT for every tempest tox env" 2021-12-01 20:14:23 +00:00
Zuul 74b037fabf Merge "hacking: Ignore H405" 2021-11-30 15:07:26 +00:00
Ghanshyam Mann 1aac05c7b2 Test all supported python version for stable branch
As Tempest is branchless and needs to support older
supported stable branches, let's test it with all the
python version supported in those supported stable branches.
For that, we need to explicitly dd the py jobs instead of using
the template. This way, we will explicitly know that we are testing
all supported python versions when the new release template bumps the
min python version in the template.

In Yoga testing, we are making py3.9 job to run as voting, so
adding py3.9 job as voting.

Change-Id: I422da8da06509e529f4091e21cdc3d392d3cf910
2021-11-03 15:08:44 -05:00
Artom Lifshitz 7bd4c3aaed hacking: Ignore H405
This patch proposes to ignore hacking H405, "multi line docstring
summary not separated with an empty line". This arbitrarily enforces
"title" lines for docstring that are more than 1 line, meaning a
simple doctring that needs just 2 lines will either need to be
condensed into a single line, or expanded to include a "title" and a
longer explanation paragraph underneath. This does not appear to bring
much value.

Change-Id: I1978c73ab6eda1dce85c96b612c4c5bff286efc6
2021-10-14 10:46:47 -04:00
Martin Kopec 6b841273b6 Use the master constraint in tox.ini again
While releasing a new tag for Tempest, we modified the
constraint in tox.ini so that they are set to xena instead of
master - https://review.opendev.org/c/openstack/tempest/+/808031

Now the new tag is released and we can bring back the master
constraint in tox.ini so that Tempest master uses master constraint.

Change-Id: Iaf9eaaf60ea3c2d15b1225f713364ebede25768a
2021-09-09 09:33:50 +00:00
Martin Kopec c43ce23cdc Use stable constraint in tox to release new tag for Xena
We are going to release Tempest a new tag to declare the start of
support for stable/xena so the new tag should use stable/xena
constraint in the tox env.

For example: if anyone uses Tempest 29.0.0 in the future, say 1 year
later, then tox env also should use the xena contstraint instead
master for the compatibility.

These changes need to be moved back to master constraint once the
release is done. Using master constraint in tox.ini for all the older
tags is a problem and we faced the issue of constraint
incompatibility. Therefore, we have to work around it all over the
devstack, tempest, grenade and set the stable constraints via the
env var.

Change-Id: I2bbf550294e7873eb07598b204ccc8d63ff6b5eb
2021-09-09 09:28:57 +00:00
Ghanshyam Mann ba28d78c30 Add experimental job to run test with 'latest' microversion
API microversions are inhertied in nature from features points
of view, means higher microversion will have all the features/
changes done in lower microversion.

In Tempest we write the microversion tests by capping
the min and max microversion so that they can request
the API with correct microversion.

But for non microversion tests we do not test if they are
run-able for all the configured microversion in Tempest config
file. To test it at some extend this commit adds a experimental
job to run the API tests (compute and volume) with 'latest'
microversion to know if that run successfully or need modification.

This job is experimental as now as I expect lot of test failure
with the 'latest' microversion and as we keep fixing those and all
the tests pass then we can move it to voting job in check/gate pipeline.

Change-Id: Ie840dd0997519d7e11a661853f9376f43c6e7905
2021-09-03 10:21:54 -05:00
Ghanshyam Mann 46b59eea70 Switch back the tox constraint to master
Tempest 28.0.0 is released so we can
switch back the tox constraints to master.

Change-Id: Ieb1dd427ce3a7b1319a03bed5aa74739da6b3fab
2021-07-17 00:34:22 +00:00