Commit Graph

47 Commits

Author SHA1 Message Date
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
Bas de Bruijne 530a88a434 Make user role logging optional
Not in every cloud does tempest have permissions to list the
role assignments. Since it is not critial for running the tests,
the logging of the user roles should be configurable.

Change-Id: I8aea2b597b9dd9bbdc5a1527fae03e86364aab4c
2023-01-03 17:41:29 +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
Zuul 67ecd6757d Merge "Update tests for scoped tokens and default roles" 2021-04-15 18:49:22 +00: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 54225ad231 Fix testing IPv6 VIP network connectivity
The IPv6 VIP subnet used in the tests is created using devstack's
default IPv6 subnetpool.
Devstack ensures that any CIDR from this subnetpool is routable from the
devstack node if the subnet is plugged into devstack's router1.

Change-Id: Iaf3113087a344787add3405208fb229838a56d0b
2021-03-16 15:33:20 +01:00
Michael Johnson 2735735e64 Install test_server.bin in well known location
This patch installs and uses test_server.bin from
/opt/octavia-tempest-plugin as a well known location on the
filesystem. This way tests, like grenade, that run the devstack
plugins once in /old paths, can find the binary when running from
/new paths.

Change-Id: Ia78f16fde026269dec01f4dceb202842ad12a557
2020-11-13 14:41:08 -08: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
Michael Johnson 7bd2f97221 Add an optional amphora admin log offloading test
This patch adds an optional amphora admin log offloading scenario
test.

Change-Id: I90e3ed23cdd2aa1125de18dc332c30a9d9cca0a2
2020-08-13 10:13:17 +00:00
Zuul bf6cc40956 Merge "Add an optional tenant flow log offload test" 2020-08-13 09:57:51 +00:00
Michael Johnson 6fbfed03d3 Add skip_if_not_implemented to the service client
This patch adds a decorator that wraps the service client methods adding
the ability to raise a skipException if a call to the API returns a
NotImplementedError or UnsupportedOptionError exception.

This is useful for running the tests against provider drivers that do
not support all of the Octavia API features.

Change-Id: I17d4be65130fadf97d6170d22fb07c72672b7573
2020-08-04 21:53:06 +00:00
Michael Johnson b1ba3b373c Add an optional tenant flow log offload test
This patch adds an optional tenant flow log offload scenario test
that checks the tenant flow logging offload and format.

Change-Id: I8a7ed4e1bc3d567c4807726c684ad86cd281096f
2020-07-13 15:27:24 +00:00
Michael Johnson a1862ff5cc Fix availability zone API tests
Currently, if you run the availability zone API tests when not using
the no-op drivers, the API tests will fail as they had hard-coded
availability zone names that do not exist.
Since creating availability zones requires reconfiguration of the nova
host deployments, it is not practical to create nova availability zones
for these tests.

This patch adds tempest configuration settings for the required
availability zones, and if not configured will skip the tests that
require the availability zones be present.

Change-Id: I53d5d33ae9a181b79e1d971d56452eeee5dd7759
2020-06-24 15:57:51 +00:00
Adam Harwell c2aa20c24a Test the Availability Zone [Profile] admin API
Depends-On: https://review.opendev.org/#/c/693765/
Change-Id: Ifc2965152c1bca8e899cf3c84153203ddb85712f
2019-12-09 11:41:58 +11:00
Zuul da3b30f9d2 Merge "Add an option to reuse connections" 2019-11-06 06:25:30 +00:00
Ann Taraday 7d0b582128 Add amphorav2 to provider list
Change-Id: I10112d871a5628c99c3f2374c8451d936ab9bedb
Story: 2005072
2019-11-01 07:54:19 +00:00
Maciej Józefczyk 6a508ce44a Add an option to reuse connections
While using requests.session TCP connections are
reused. OVN Load Balancing algorithm uses hash with source port
to route clients requests. In that terms if connection is reused
the load is not spread across members. This patch adds an option
to disable reusing connections.

Change-Id: I61a202a2c1a6d15d714464d519de39f5f2acb2a6
Story: 2006264
Task: 35992
2019-10-24 13:29:59 +02:00
Zuul 4738618817 Merge "Fix positional formatting and add skip check" 2019-10-23 04:13:16 +00:00
Zuul 353e74c237 Merge "Add an active/standby scenario test" 2019-10-05 15:05:38 +00:00
Gregory Thiemonge e037eb82f3 Fix spare_pool_enabled option type
spare_pool_enable option should be a boolean value, as used in
SparePoolTest.skip_checks method.

Change-Id: I6fd3c95aa6e80c35e4edb66eb80f2d90eaf6c747
2019-09-19 16:22:53 +02:00
Carlos Goncalves 9891de0ebb Fix positional formatting and add skip check
This patch fixes an offset positonal argument in a string format that
was throwing an IndexError exception. It also adds a skip check to check
if the required amphora SSH key file is readable.

Additionally, the iptables-based active-standby test has now a better
amphora_ssh_key default value to match with the default path set by the
Octavia Devstack plugin.

Story: 2006259
Task: 35876

Change-Id: Ic887c726dfe151ea582a1bd935ae0b30582f14ea
2019-09-13 14:37:51 +02:00
Michael Johnson 6d99fc65b6 Add an active/standby scenario test
This patch adds a tempest scenario test for the active/standby topology.
It starts an active/standby load balancer, deletes the master amphora,
and validates that the load balancer is still working.

Change-Id: Ibcd5552a67cea650edc72bfaa986357267ca2407
2019-08-08 09:22:36 -07:00
Zuul dc8db9c789 Merge "Sync enabled_provider_drivers config help message" 2019-08-07 02:34:58 +00:00
Zuul 3c941b8117 Merge "Support skipping APP_COOKIE and HTTP_COOKIE" 2019-08-05 23:34:19 +00:00
Michael Johnson 77df0326b8 Adds provider flavor capabilities API tests
This patch adds provider flavor capabilities API tests to the Octavia
tempest plugin.

Change-Id: Ie4f9f72e011ee8aa30e8f9aa35558533839fb8c8
2019-07-30 09:45:34 -07:00
Carlos Goncalves decfc35aa8 Sync enabled_provider_drivers config help message
Update the help message to match the same help message in octavia.conf.
Users were confused because the example was in Python dictionary format.

Change-Id: Ic3f620dcf02c756395da760f8b73874b40318cb6
2019-07-25 19:31:52 +02:00
Carlos Goncalves ee09a1b782 Skip iptables act/stby test based on topology set
Task: 35877
Story: 2006260

Change-Id: I53671c7e93737b0d7bc038b4dd136a179facd34a
2019-07-22 13:03:25 +02: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
Zuul b6fb3d1993 Merge "Add a scenario test for spare pool" 2019-07-19 22:12:06 +00:00
Zuul 9d2c9984fc Merge "Add iptables-based active/standby scenario test" 2019-06-16 13:37:14 +00:00
Carlos Goncalves 5b963c4c21 Add a scenario test for spare pool
This patch adds a scenario test for testing amphora spare pool feature.
It adds new check jobs to test against master as well as stable
branches.

Change-Id: I87249017453628e3d2cd320a02677d81397f1b26
2019-05-14 18:20:29 +02:00
Carlos Goncalves cc7dbcd853 Add config option for pool algorithms
There is at least one provider driver that does not currently support
any other pool algorithm than round-robin. This patch adds a new option
that allows one to toggle enablement of pool algorithms (default is
True/enabled).

Change-Id: I11e1569f91fe66a6bc735a1abd7b1545ca1490a0
2019-04-11 10:29:31 +00:00
Carlos Goncalves c2e1216e8e Add iptables-based active/standby scenario test
This patch adds a tempest scenario test for active/standby topology.

This scenario takes a similar approach to scenario proposed in Change-Id
Ibcd5552a67cea650edc72bfaa986357267ca2407 with the difference that it
does not rely on amphora stats API. Instead, it uses iptables to log VIP
traffic and make assertions based on logging.

Co-Authored-By: Michael Johnson <johnsomor@gmail.com>

Change-Id: I24a6fc3387166ec6cdbd57a5ca9f63743748ec68
2019-04-08 18:57:12 +02:00
Arx Cruz a1c25b3b64 Fix barbican service_available check
Tempest plugins should not explicitly set option from other plugins. The
change I7013888f94261d94e1cd4c3167dc84da7125d1da set
service_available.barbican to false if the barbican plugin doesn't
exist, but cause duplicate error if both are installed. The right way to
check if a service is available or not is checking if the attribute
exists and set the default to false. This patch fix the duplicate error.

Depends-On: https://review.openstack.org/#/c/639153/
Change-Id: I1ba353328e759391cc6a46d95b74c85c4cea6d92
Closes-Bug: 1817154
2019-03-07 13:54:49 +00:00
Zuul ebbe4ef969 Merge "Adds provider API tests" 2019-02-01 16:56:36 +00:00
Michael Johnson fc223fe16c Adds provider API tests
This patch adds provider API tests to the Octavia tempest plugin.

Change-Id: I25685276e12dd94e866f7db5b501baaa9a38cc84
2019-01-28 22:40:36 +00: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 0a0f9b342a Add a TLS scenario using Barbican
This patch adds a TLS load balancer scenario test using Barbican.

Story: 1627383
Task: 5149

Change-Id: I7013888f94261d94e1cd4c3167dc84da7125d1da
2019-01-08 09:52:04 -08:00
Zuul 1257a29ed5 Merge "Raise build_timeout from 60 to 300" 2018-10-18 15:34:29 +00:00
Reedip f88cffc9b4 Add configuration support for skipping tests
This patch add configuration support in Octavia Tempest Plugin,
in case a provider driver does not support Health Monitors.

Change-Id: I25eb52e9f64a08560c9ea2f664edd9826be6e379
2018-10-16 15:35:03 +00:00
Jacky Hu 2b95f2f421 Raise build_timeout from 60 to 300
A lot of build timeout was seen, for example:
http://logs.openstack.org/17/606417/1/check \
/octavia-v2-dsvm-scenario-centos-7/0b4c23a/testr_results.html.gz

Try to raise the default and see if it helps.

Change-Id: Id6dfd80f04624e845807f2a20f2f4e816a778415
2018-10-01 11:42:47 +08: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
Jude Cross 986e3f543c Create scenario tests for load balancers
This patch implements the tempest plugin for
for testing load balancer creation in Octavia.

Co-Authored-By: Jude Cross <jcross@godaddy.com>
Co-Authored-By: Lingxian Kong <anlin.kong@gmail.com>

Depends-On: https://review.openstack.org/557856
Change-Id: I57064f8e0834efba8859a780394a1c69851cc917
2018-04-10 12:20:01 -07:00
Michael Johnson 0c90ef6972 Revert "Create scenario tests for loadbalancers"
This reverts commit 638c4ef2a1.

Change-Id: Id4e6723d68e35ccdfb34d50485590035808aea2e
2018-03-29 14:52:06 -07:00
Lingxian Kong bf966a9b25 Create floating ip by normal user
In real use case, it should be the end user who will create floating
ip and associate with loadbalancer vip.

Also use config_drive when creating backend server, to keep consistent
with amphora creation in octavia itself.

Tested in devstack.

Change-Id: I2cbee37f494a5775a96f8c285f0e52c0b2550d5b
2018-01-16 00:20:37 +13:00
ZhaoBo 2a69ad079e Enable Qos in gate
Change-Id: Ia08c12c9c82000e4edd9025714b2655c8874c5ca
2017-12-26 09:29:58 +00:00
Jude Cross 638c4ef2a1 Create scenario tests for loadbalancers
This patch implements the tempest plugin for basic load balancer
operations in Octavia. It contains tests for loadbalancer API and
a minimal operation test for loadbalancing functionality.

Steps for testing in devstack environment:

- Clone octavia-tempest-plugin repo, check out this patch, install
  octavia-tempest-plugin project.
- Create a tempest work directory by running 'tempest init <workdir>'.
  In the etc/tempest.conf, add 'loadbalancer = true' in
  'service_available' section.
- Set a big value to 'OS_TEST_TIMEOUT' in .testr.conf
- Add or modify other related config options (image, network, flavor,
  validation, etc).
- Run 'tempest run --regex ^octavia_tempest_plugin'

Co-Authored-By: Lingxian Kong <anlin.kong@gmail.com>
Co-Authored-By: Adam Harwell <flux.adam@gmail.com>
Change-Id: Ibc2904f431b15dfca2ff8e38e0d4d06c1430abea
2017-11-16 14:14:59 -08:00