This patch updates the Designate tempest plugin to accommodate stable
branches that still have keystone scoped tokens. The "Direction
change"[1] means scoped tokens were dropped in the Bobcat (2023.2)
release. However the stable branches back to Wallaby will still have
scoped tokens available as a configuration option.
[1] https://governance.openstack.org/tc/goals/selected/consistent-and-secure-rbac.html#direction-change
Change-Id: Ia57b5126dbc9fbe98cbcaa7ad0e11d36c21a14da
Tempest is fixing the bug#1964509 (depends-on) where
project_reader user will be created under the same project
as primary, project_member, project_admin users.
'primary', 'project_admin', 'project_member', and 'project_reader'
creds will be created in same projects. All the alt creds will be
created under the new projects. non alt and alt creds will use
different project, for example, 'project_alt_member' and
'project_member' creds will be created in different project.
Related-Bug: #1964509
Depends-On: https://review.opendev.org/c/openstack/tempest/+/871018
Change-Id: I143e69c1e150ddf7fa1757dea7bced6bff6739a9
This patch adds a method that allows us to get the current Designate API version under test for use in test classes to skip tests against new features introduced in a specific API version.
This patch also centralizes the "primary" zones client to be instantiated once and updates the tests to use a standardized name for the client.
Finally, it adds a missing requirement of oslo.serialization to requirements.txt.
Change-Id: I240911c0ab9b9bad7851268865d6a8e867627673
This patch adds RBAC testing for allowed and disallowed credentials.
This is one of a series of patches adding testing. This patch covers the
zone export API.
Change-Id: Ia3effe23eac22b56bab20314750c5b3bbace27c8
Currently there are intermittent test failures due to inconsistent
management of TLDs across the test classes. This is due to some test
classes using the same TLD and cleaning them up or cases where a TLD is
expected to exist, but may not have been created yet.
This patch established a dedicated TLD for each test class that creates
zones. Inside each test case, a zone name will be created with the test
name and the test class TLD. This creates the required TLD isolation to
allow successful test concurrency.
The patch also changes the base TLD from 'org' to the RFC 2606 reserved 'test'.
This should allow for easier identification of test related resources.
Change-Id: I3509767ec0ce6be6b6f15a1bc15a730a4a144b09
1) "test_show_exported_zonefile_impersonate_another_project"
Admin user is able to impersonate another project
and to "show" created by tenant exports.
Note: based on: 'x-auth-sudo-project-id' HTTP header.
2) "test_show_exported_zonefile_all_projects"
Use admin client to show zone export file of
all tenants.
Note: based on: "x-auth-all-projects" HTTP header.
3) "test_show_exported_zonefile_any_mime_type"
Validate that 200 OK and Content-Type: text/dns
is received when client.
sends "Accept: */*".
4) "test_missing_accept_headers"
Client request is missing Accept header.
The header will be send with empty dict.
Expected: {Content-Type: text/dns}
5) "test_show_zonefile_using_not_existing_zone_export_id"
"404 Not Found" is expected when not existing
ID is used by client.
6)"test_show_zonefile_not_supported_accept_value"
Client sends 'Accept':'image/jpeg' for ShowZoneFile API.
Expected: 406 Not Acceptable.
Change-Id: I8aa5dfe12781f21b9f41e0df19afb0e46eab31d8
This patch makes the API tests compatible with keystone scoped
tokens and the new RBAC defaults.
For example, admin system scoped tokens do not have a project_id associated
with them requiring some tests to be updated to not assume the admin
credential always has a project_id.
This patch also makes some sections consistently ordered across files.
Change-Id: Ie2c7402967f40bb90e0d97dad1c3d59f82cb6d80
All the Designate 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 designate-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] https://github.com/openstack/designate-tempest-plugin/blob/master/designate_tempest_plugin/plugin.py#L78
Change-Id: I4b65ca16cd53ff4c6bece642764a4abe2a469c01
Designate has a fairly small default pagination limit of 20.
Some tests were making list API calls with the all-projects header,
which with parallel test execution could cause the list to exceed the
default pagination limit of 20. This would cause the tests to intermittently
fail.
This patch sets the request parameter "limit" to 1000 for these tests
to allow for parallel test execution which may cause lists to include
more than twenty entries.
Change-Id: Ic074c2c4dc5a5f97c609aac5992f78557722bb71
Filter criteria are respected when listing zone imports and exports
Depends-On: https://review.opendev.org/789711
Change-Id: I06459a6208757b95117af3f270fde60b847f0b97
1) "test_create_zone_export_using_invalid_zone_id"
Zone export should fail if provided UUID is invalid
2) "test_show_zone_export_impersonate_another_project"
Admin user is able to impersonate another project
and to "show" created by tenant exports.
Note: based on: 'x-auth-sudo-project-id' HTTP header.
3) "test_list_zone_exports_all_projects"
Use admin client to list the created exports of
all tenants.
Note: based on: "x-auth-all-projects" HTTP header.
4) "test_export_not_yours_zone"
Each particular tenant should be able to create an export
for his owned zones only.
5) "test_create_zone_export_using_deleted_zone"
Tenant shouldn't be able to create a zone export for
non-existing zone.
Change-Id: I98b860fd270e4fad1ab9cc15b3fa47dcbf0361d4
these tests create zones as part of the test but do clean them up
afterward slowly. This leads to these and following tests in the thread
to fail with over quota when default zone quota is sufficiently low.
Change-Id: Iebe15ca6d0d3101237a92e011b081c38647a8de6
We need to call set_network_resources() from class with API tests, to
avoid creating network resources. Which are not needed for API tests.
Change-Id: Ia93303390d9887722fa2cfde7757e5e9103ae585
Closes-Bug: #1689415
Tempest has deprecated decorator 'tempest.test.attr' and
moved the same as stable interface to 'tempest.lib.decorators
.attr' in version 16.1.0.
Let's use the stable interface for attr decorator.
This will help Tempest to remove the deprecated decorator.
Change-Id: If72deb25a1438470442b153a41303ca6c7cbd22b
This reduces the number of smoke tests to < 10. It includes v1 tests, v2
tests and one scenario test to check that a zone goes to active.
Change-Id: I9233a5d783649fe2bfad8e772f4165bdc4e1c619
Useage of the tempest.lib version is preferred, as it's considered
API stable, unlike the tempest.test version.
Change-Id: Ida2efd9fdd9ce095aaa33ce41c90f93efbcf0970
This renames a couple of the zone export client methods. It also
fixes an issue with the (newly named) `show_exported_zone` function
which wasn't passing the right number of arguments.
Change-Id: Ie0cce8710e0ef17dc391cb5bdd150a63b57d2f72
These are a close to a straight port as was possible, no cleanup was
performed where it wasn't absolutly necessary.
In addition, we add flags to enable V1, V2, Admin API tests, and a
V1 servers API flag, as these tests have proved particularly
susceptible to race conditions.
Change-Id: Idc31c00c95fde96087f4f222ae9c17e554e6b1fc