Commit Graph

31 Commits

Author SHA1 Message Date
Tom Weininger c03e9c39d2 Test new HSTS feature
Test HTTP Strict Transport Security with Octavia.

Partial-Bug: #2017972
Change-Id: Ie54714015e943fd1cb75ca95f8cf241fbc99268c
2024-04-23 18:53:25 +02:00
Omer 094f6b56f0 Add TERMINATED_HTTPS listener API tests
So far we did not have TERMINATED_HTTPS API tests in the listener API
tests (we only had scenario tests).

This patch adds the missing API tests.

Change-Id: I90b1c7c00e8642ef7d3b7af63c9bb90ba8855adb
2024-04-23 12:02:50 +02:00
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
Gregory Thiemonge ece5ab4369 Add SCTP protocol listener api tests
Story: 2007884
Task: 41174

Change-Id: I090045a0eac39cb64f0373f932e7b42640ee5ad9
2023-07-11 08:48:53 -04: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 a98cd8787e Merge "Remove skip flag for tests skipped due to inactive bug" 2023-01-04 12:56:52 +00:00
Michael Johnson 8646e5ae97 API and scenario tests for PROMETHEUS listeners.
This patch adds API and scenario tests for PROMETHEUS listeners. This
includes scenario tests that connect to the metrics endpoint.

Depends-On: https://review.opendev.org/c/openstack/octavia/+/812258
Change-Id: Ia46d8c0967bc5b0f7cd11b6e3ca3a4e03c0bc138
2022-11-21 23:29:13 +00:00
Lukáš Piwowarski 5aa216efc7 Remove skip flag for tests skipped due to inactive bug
Several tests are skipped because of story 2007979 [1] even though it
seems that the bug tracked by the story has already been resolved.

This patch removes the skip flag for these tests as the bug has already
been resolved.

[1] https://storyboard.openstack.org/#!/story/2007979

Change-Id: Ibec0bf4fba52a32dd1c9980c5d6bd7afc35d81a3
2022-11-15 17:40:00 +01:00
Zuul 1aeccba999 Merge "Add missing RBAC enforcement tests for Listener API" 2022-05-10 20:17:01 +00:00
Fernando Royo 403216a767 Fix error on listener OPERATING_STATUS check
This patch fixes the check for listeners that
have been created with admin_state_up = False,
when running a driver in non-noop mode.

By error it is checking that the listener
is in ONLINE status, when this particular case
requires checking OFFLINE.

Change-Id: I07a9f6abdef29334d70e30755bb948c5b0b65d54
2022-05-10 10:08:45 +02:00
Vadim Ponomarev f46e53f8e2
Add waiting OPERATION_STATUS for the third listener in tests.
This commit fixes the situation when test _test_listener_list fails
because of a mismatch OPERATION_STATUS. This error can be reproduced
only in really slow environments.

Change-Id: Ie873a59fffda425c60e912abbb0d3aec68e134ed
2022-04-27 13:34:50 +04:00
Gregory Thiemonge 137ca9c803 Add missing RBAC enforcement tests for Listener API
Some checks were missing for the test_*_listener_update and
test_*_listener_delete tests in ListenerAPITest.

Change-Id: I1ee799c56286c687ea2d7c456f84f34103d58d91
2022-03-29 15:36:21 +02: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 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
Carlos Goncalves bb23855ce6 Add tests for allowed CIDRs in listeners
This patch adds API and scenario tests for testing allowed CIDRS in
listeners introduced in API version 2.12 (included in Train release).

Change-Id: Ibe677e046afc16f038ccacb10e5fe62802828581
2020-08-24 11:00:17 +02: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
Gregory Thiemonge 26853ac679 Added tests for creation of listeners on same port
Added a test that:
- creates a UDP listener on port 80, after having created a HTTP
  listener on port 80
- creates a second UDP listener on port 80, and ensures that it fails.
- creates a third listener on port 80 with a conflicting protocol over
  TCP.

Story: 2005070
Task: 34781

Change-Id: I2d1d767c360b402bd1a2d924d75fc85279bf8f1d
2019-10-02 11:35:18 +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
Zuul 6b03191c92 Merge "Add listener stats service client and API test" 2019-02-25 03:59:16 +00:00
Michael Johnson 69cb566d5a Add listener stats service client and API test
This patch adds the listener stats service client and tempest API test.

Change-Id: I008204d5000c9a2fb4852021f0c759a2490c69b7
Story: 2004853
Task: 29079
2019-01-24 13:45:53 -08: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 dfd818a421 Fix tests to honor Octavia API versioning
This patch adds support for Octavia API endpoint versioning.
Previously Rocky API additions were being tested, regardless of the Octavia
API version.
It also fixes a potential race condition when testing the "ONLINE"
operating status.
The patch also makes sure that duplicate fixed IP addresses are not allocated
on subnets.

Story: 2003466
Task: 24726

Change-Id: If0ec777f34326c09c7215d9c7c2ed249571d779e
2018-09-06 13:57:38 +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 446f8be193 Create api+scenario tests for l7policies
This patch implements l7policy tests for the Octavia
Tempest Plugin.

Depends-On: https://review.openstack.org/#/c/571997/
Change-Id: I58061cd69704da80e48c0963b6639ff8d6051c01
Story: 2001387
Task: 5976
2018-06-04 05:08:20 +00: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
Jude Cross fbbd2b4912 Create api+scenario tests for listeners
This patch implements listener tests for the Octavia
Tempest Plugin.

Co-Authored-By: Adam Harwell <flux.adam@gmail.com>
Change-Id: I5c0d3a737ff4cc929573c6fb7fbb5d46f1159d80
Story: 2001387
Task: 5965
2018-05-02 22:04:46 -07:00