Commit Graph

20 Commits

Author SHA1 Message Date
Omer 427701e776 Add missing cleanups after octavia resources creation
In some of the tests, cleanups were missing after creating Octavia
resources.

This patch adds the missing cleanups.

Change-Id: I848e08295580709fa739df2d216dad0efd19a795
2024-02-22 03:17:47 -05:00
Michael Johnson 6dac8ff58f Update Octavia tempest tests for no scoped tokens
There has been a direction change in the "secure-RBAC" goal and scoped
tokens are no longer being implemented[1].
The Octavia tempest tests were updated for the new keystone roles and
scoped tokens at the same time with an (bad) assumption that they would be
turned on at the same time.
This patch updates the Octavia tempest plugin to not assume that scoped
tokens are in use when the RBAC type is set to keystone_default_roles.

[1] https://governance.openstack.org/tc/goals/selected/consistent-and-secure-rbac.html#direction-change

Depends-On: https://review.opendev.org/c/openstack/octavia/+/877433
Change-Id: Ia1c4ca0b675d39bd43640184d6d3deba823fd3f6
2023-03-14 23:21:51 +00:00
Zuul 5b73479a4d Merge "Reduce the number of load balancers in PoolAPITest" 2023-03-03 13:13:20 +00:00
Gleb Zimin 685532377c Fix wrong protocol in UDP pool tests
Change-Id: I5bb7ee389e734c075f10ed38507bade9a442e51b
2021-07-30 18:42:34 +03:00
Michael Johnson 29d8e61ca2 Update service client access in tempest tests
All the load balancer service clients are registered via the plugin interface[1],
that way Tempest register and create the lazy initialization of registered clients
so that they can be access from there in consistent way.

But octavia-tempest-client create a separate instance of those and access instead of
accessing the registered service client in Tempest. This commit makes all the service clients
access from Tempest registry and remove the separate objects.

[1] cac3eefc44/octavia_tempest_plugin/plugin.py (L54)

Change-Id: Ie24909b49baf2c6a886e2ff711e641e36ffe6b50
2021-06-30 23:15:30 +00:00
Gregory Thiemonge 3497f6cb70 Fix owner_or_admin API tests
lb_observer and lb_global_observer don't have any meaning when
admin_or_owner policy override in enabled.
This commit disables client creation for those roles and removes their
uses from API tests (the behavior of the owner_or_admin tests are now
similar to their behavior before the introduction of the new RBAC
tests).

Requires the following configuration in tempest.conf:

[load_balancer]
RBAC_test_type = owner_or_admin
member_role = member
admin_role = admin

Change-Id: I2231384933d5974b962a558e8c0b3bffb1140b5a
2021-04-20 06:19:50 +02:00
Michael Johnson 6006de75a7 Update tests for scoped tokens and default roles
This patch refactors the RBAC enforcement checks in the API tests.
It also updates those test for keystone scoped tokens and default roles.

Change-Id: I6fad03f5a89c213562918ca258884aac34ba7ce7
2021-04-08 22:07:40 +00:00
Gregory Thiemonge 37d2d1b024 Reduce the number of load balancers in PoolAPITest
PoolAPITest creates a new LB in each of its test_*_pool_list functions
(~20 functions), those creations are really time consumming.
Now each test ensures that the pools are deleted on test cleanup, and
that all the test functions use the same LB that has been created in
resource_setup. It speeds up the execution of the test class (from 55min
to 35min in my dev env).

Change-Id: Idb2c45cda4a407c41d314f195af03b4c6a22da07
2021-01-19 10:53:42 +01:00
Brian Haley aaa6fc7fde Change pool create scenario test to wait for operating status
The API test for pool creation has a check to wait for the
operating status of a pool to transition to ONLINE if a
listener has been provided.

The scenario test for pool creation doesn't wait for any
operating status transition after a pool is created with
a listener, and instead always assumes it's OFFLINE.

They should both wait for a transition, since otherwise
drivers that transition to ONLINE quickly, like OVN, can
race and fail the scenario test.

Depends-on: https://review.opendev.org/c/openstack/octavia/+/763530

Change-Id: I9eb3c7ce8af879cd910b06234c99b53670907e49
Story: 2008009
Task: 40659
2020-12-01 14:42:25 -05:00
Gregory Thiemonge 3bc1f4decd Fix scenario tests issue with immutable LBs
Wait for the loadbalancer to become ACTIVE after deleting an
healthmonitor or a listener, to ensure the next test uses a LB in a
non-transitional state.

This also fixes the cidrs tests that were using the wrong waiter
timeouts.

This patch also moves individual deletion of children resources in class
tear down to a more performant way by cascade deleting the load
balancer.

Story: 2008219
Task: 41008

Depends-On: https://review.opendev.org/#/c/757604/
Depends-On: https://review.opendev.org/#/c/757840/
Depends-On: https://review.opendev.org/#/c/757841/
Depends-On: https://review.opendev.org/#/c/757842/

Co-Authored-By: Carlos Goncalves <cgoncalves@redhat.com>
Change-Id: I6a4eed7269e4f502bd0fc8613cb4ec4da13890e7
2020-10-19 10:30:00 +02:00
Michael Johnson 6a9236ad9a Adjust API tests for NotImplemented skip
This is a patch to restructure the API tests to use the
new skip_if_not_implemented capability.

Depends-On: https://review.opendev.org/745239

Change-Id: I291488e1c9418e51d6fe7ea142eaca13e3c181a0
2020-09-08 16:52:09 -07:00
oschwart 2cdf13c2ef Fix MismatchError in tags API tests
The tags lists are compared unsorted which causes a MismatchError
in some cases.
This commit sorts the tags lists before the assertion.

Story 2008026
Task 40680

Change-Id: I4cc8a663d7d7c853e6286379eea74c90819209cd
2020-08-19 12:13:14 +03:00
oschwart 540bb3b4d0 Add tags API tests
This patch adds some API tests in the create, list and update methods
of the Octavia objects that support Tags.

Tags are supported on Octavia API version 2.5 or later.

Change-Id: Ib14852d57535508fecee2705e704954cfd078474
2020-07-19 12:43:01 +03:00
Maciej Józefczyk b6df5f8143 Run tests with algorithm supported by provider driver
This patch adds map of supported algorithms by
provider drivers. For a first iteration lets select
the first from supported algorithms to be used as
a default and run the tests with it.

In addition this patch splits check_members_balanced()
into subfunctions related to the algorithm
that is validated.

Story: 2006264
Task: 35972

Change-Id: Id055763f35b487da539eddfe802c543a11246503
2019-12-10 10:12:30 +00:00
Reedip Banerjee 2bb585dc6b Support skipping APP_COOKIE and HTTP_COOKIE
Not all provider drivers may support APP_COOKIE/HTTP_COOKIE,
so this patch modifies the test to reflect the same.

Change-Id: Ifea51c1f927947588ac2ed82f25fa35ee56c98f7
2019-07-22 12:09:54 +02:00
Michael Johnson 0f6c647e60 Fix tests not honoring the provider setting.
This patch fixes some tests that were not honoring the configured
provider driver setting.

Change-Id: I14303b62889f5d270db6a8a551b3eac2b8e5a879
2019-05-28 17:19:06 -07:00
Reedip 6626f25a81 Add configuration to enable/disable L7,L4 protocols
Currently not all Provider drivers support L7 in Octavia.
Until the flavors option is not enabled, it is proposed to skip
L7 in favor of L4( specifically TCP ) protocol tests for the provider
drivers.

Change-Id: I07b4f7038d71d684c23885c89257af2711a442a0
2019-01-23 06:35:47 +00:00
Michael Johnson b0573224f5 Add "wait for active" after object delete
Currently we are waiting for the object to finish deleting, but
we are not waiting for the LB to go back to ACTIVE. On fast test
hosts this can lead to an immutable error on the shared parent objects.
This patch adds a "wait for active" after the object "wait for deleted".

Change-Id: Ie4c3ffeb194a779b2e4e04ef423d23e3891ad3ce
2018-06-29 13:17:02 -07:00
Adam Harwell 60ed9d9cde Create api+scenario tests for healthmonitors
This patch implements healthmonitor tests for the Octavia
Tempest Plugin.

Depends-On: https://review.openstack.org/#/c/571107/
Change-Id: Ib7cd9eef7c9aeb705c56df3f88612d1bf2039163
Story: 2001387
Task: 5975
2018-06-01 09:02:14 +00:00
Adam Harwell 8ffce3e8c3 Create api+scenario tests for pools
This patch implements pool tests for the Octavia
Tempest Plugin.

Change-Id: Id8dadfa292a698273240a4d3513288053e7c62c5
Story: 2001387
Task: 5969
2018-05-18 16:08:21 -07:00