As our internal QE reported to us, ddt is producing more consistent
names of the same tests with different variables then testscenarios.
With testscenarios it is something like:
foo_tempest_plugin.tests.something.SomeClass.test_foo[id-123456](c1,c2)
and with ddt is more similar to tests without scenarios:
foo_tempest_plugin.tests.something.SomeClass.test_foo_1[id-123456]
Apparently due to this inconsistency results of some tests couldn't be
properly reported properly to some tools which we are using downstream.
So this patch proposes to remove usage of testscenarios in
neutron_tempest_plugin and replace it with ddt where it is needed.
Actually ddt was already used in some of the tests here so this will
make it also more consistent across the tests in that repo.
Also as part of this effort I relalised that in some cases testscenarios
where used, tests were running e.g. 2 times but actually variable set to
different value in different scenarios were not used at all. So in such
case I simply dropped usage of testscenarios and left only one variant
of the test to be run.
Change-Id: Ieabab4ccaa0e2a365939425dff0c0776839251eb
Library "distutils" will be marked as deprecated in Python 3.10:
https://peps.python.org/pep-0386/
This patch does the following replacements, that provide the same
functionality and API:
- distutils.version.StrictVersion -> packaging.version.Version
Change-Id: I0fc0c2ac7a545b8250e05586f48226953f3595df
Closes-Bug: #1973780
api/test_extension_driver_port_security.py imports ddt, which
fails locally running pep8 with:
import ddt
from nose.tools import nottest
ModuleNotFoundError: No module named 'nose'
Adding nose to requirements.txt fixes this.
Trivialfix
Change-Id: Ie5387a10fc18ecad53dc5dda2df3dcdaf641cd2f
This is step 1 of the movement of the tempest plugin for
neutron-dynamic-routing.
Co-Authored-By: Slawek Kaplonski <skaplons@redhat.com>
Change-Id: I35984bb3ad3673b7a54982657c1ac6fdc3ed6de0
In case of SSH timeout (TimeoutException, TimeoutError), the
tenacity.retry decorator retries the execution of the SSH
"execute" method up to 10 times.
Some SSH execute calls, related to QoS scenario tests, have been
enhanced by setting a relatively small timeout value. The commands
executed should be quick enough to be executed in this amount of time.
In case of timeout (due to communication problems), the retry decorator
will send again the command to be executed.
Change-Id: Idc0d55b776f499a4bc5d8c9d9a549f0af8f3fac0
Closes-Bug: #1844516
When using SSH client to execute a command a Paramiko
client is created, it is connected to server and then the
client reference is forgot without closing socket.
This produces a leak of SSH connections. It also slow
down test executions when more than one command has to
be executed with the same SSH client (for example when
executing ping between VMs).
This change also add convenience methods to SSH client:
- connect() method allows to create and connect Paramiko
client to be used by tests directly (for exaple to open
a command like socat, cat, nc and redirect STDIN/STDOUT
to generate or receive network traffic. The method is
going to return the same Paramiko client instance
until close() method is called.
- close() method allows to close paramiko client socket and
release resources.
- execute_script() spawn a script interpreter (Bash by default) on
a remote machinge to execute a script provided as a string.
For convenience by default it combines STDOUT and STDERR to LOG
an human friendly message when the script fails.
Change-Id: I3a70131f03aea342c8e8a04038000bd974cca921
Add new 'debtcollector' dependency with the purpose of deprecating methods
that are going to be removed.
Mark BaseTempestTestCase.create_and_associate_floatingip for removal.
Replace create_and_associate_floatingip with create_floatingip in
BaseTempestTestCase class.
Change-Id: I5c5fd143a5cb4e138c46d13445f8225444bd2f58
Neutron-lib 1.18.0 is our Rocky RC and is already being used by neutron
[1]. This patch updates the neutron-lib required version to match
neutron [1] in prep for the Rocky release.
[1] https://review.openstack.org/#/c/583671/
Change-Id: Iee7a1ab3559b3ef58354f90774c2854e41dc18ae
Add test coverage for the integration with designate, confirming that
the correct DNS records are generated for
- floating IP created with dns_(domain|name) attributes
- instances that have a floating IP assigned
Add neutron-tempest-plugin-designate-scenario job, this will run the new
tests with Neutron DNS integration enabled.
Depends-On: Ib380d8a98e991a475b20140f5c37e3747aa5fc0c
Change-Id: Ib56531952cb70d8878631bbc0cb74a9b652d8c3a
This tempest plugin is being split out of the main neutron project in
accordance with Queens goal "Split Tempest Plugins into Separate
Repos/Projects"[1]. This patch applies the standard boilerplate files
for OpenStack projects so that it can stand on its own.
[1] https://governance.openstack.org/tc/goals/queens/split-tempest-plugins.html