Commit Graph

18 Commits

Author SHA1 Message Date
Slawek Kaplonski ec162e0f56 Remove usage of testscenarios and replace it with ddt library
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
2024-03-06 14:27:39 +01:00
elajkat 352a6411b4 Remove nose from dependencies
Nose library not only deprecated but Debian now removed it, see [1], so
it is time to get rid of all referencies in our code.

[1]: https://lists.openstack.org/pipermail/openstack-discuss/2022-August/030165.html

Change-Id: Ib56d19af2e1d0240a2ac044cd857b24480f27608
2022-08-29 13:18:14 +02:00
Rodolfo Alonso Hernandez 13546b825e Remove "distutils" library
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
2022-05-13 00:00:10 +00:00
elajkat 4a1357b86d QoS min pps API tests
Co-Authored-By: Przemyslaw Szczerbik <przemyslaw.szczerbik@est.tech>
Partial-Bug: #1922237
Change-Id: I39f521a11de4e9ff4d447d7a6e85f9cbee6ee62a
2022-01-13 08:56:52 +00:00
wangzihao 8e4c6dd8f2 Remove six
Remove six Replace the following items with Python 3 style code.
- six.moves.urllib
- six.iteritems
- six.PY2
- six.assertCountEqual
- six.next

Change-Id: I75e52c74116517aeb9f6031a8734bb47c31aabca
2020-11-06 09:23:01 +08:00
Brian Haley e3a0cdc857 Add nose to requirements.txt
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
2020-05-12 11:12:03 -04:00
Ghanshyam 42aac38cc8 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

neutron-tempest-plugin is ready with python 3 and ok to drop the
python 2.7 support.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Depends-On: https://review.opendev.org/#/c/705184/

Change-Id: I9daafef0847a9a9baa45382b87da71fe8d1fffd0
2020-02-26 15:35:20 +00:00
Ryan Tidwell 2201953759
Move neutron-dynamic-routing BGP tests from stadium
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
2019-09-24 08:56:13 -05:00
Rodolfo Alonso Hernandez aa65dfb526 Add retry decorator to SSH "execute" method
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
2019-09-20 10:13:29 +00:00
Doug Wiegley 5b85ad8c3f
Add tempest api tests for security groups RBAC
Partial-Bug: #1817119
Depends-On: https://review.openstack.org/635311
Change-Id: I806d0c1763a0abc4f07a7c85922949b056ad78d8
2019-03-05 22:12:16 -07:00
Federico Ressi 6f0644e271 Reuse SSH connections for executing multiple commands.
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
2018-08-27 15:27:07 +00:00
Federico Ressi bf877c84b3 Deprecate BaseTempestTestCase.create_and_associate_floatingip method
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
2018-08-24 09:00:42 +02:00
Boden R c2fd6d954c update requirements for neutron-lib 1.18.0
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
2018-07-23 07:25:56 -06:00
Doug Hellmann c163eb0ac5 uncap eventlet
We will manage the eventlet version using constraints now. See the
thread starting at
http://lists.openstack.org/pipermail/openstack-dev/2018-April/129096.html
for more details.

Change-Id: I018f0eec71bd0e062074081dd411c990a33a9ac3
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-11 11:52:26 -04:00
OpenStack Proposal Bot cf28ac2dc1 Updated from global requirements
Change-Id: I10ca771c181ca3f4f9d29150211ed70486fa3c4e
2018-03-15 07:23:59 +00:00
OpenStack Proposal Bot 1cf8cec6c0 Updated from global requirements
Change-Id: Ia11ef30448a5ca48dd6d9e1c5acd23918e199f65
2018-01-27 20:11:19 +00:00
Jens Harbott 860b46aa09 Tests for DNS integration
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
2017-12-22 11:42:59 +00:00
Chandan Kumar 5e6198734b Apply cookiecutter to newly split project
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
2017-09-07 22:23:55 +05:30