Commit Graph

20 Commits

Author SHA1 Message Date
Michael Johnson f4935ea128 Accommodate stable branches with scoped tokens
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
2023-04-11 17:07:07 +00:00
Michael Johnson 288cdcf697 Update designate-tempest-plugin "direction change"
The RBAC goal has changed[1] and system scope is no longer going to be
used. This patch updates Designate tempest plugin to align to this change in
direction by removing the system scope from the policy tests.

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

Change-Id: I4e5c56630d5cca96278fe67232519c067356da23
2023-03-31 16:24:24 +00:00
Michael Johnson 73065cdaca Add API version check capabilities
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
2023-02-19 18:11:49 +02:00
Michael Johnson 0fbbccdfd4 Expand Designate RBAC testing - TLDs
This patch adds RBAC testing for allowed and disallowed credentials.
This is one of a series of patches adding testing. This patch covers the
tld API.

Change-Id: I85d1f7013f1596c4998486bb6539725fb20770ef
2022-05-25 19:32:49 +00:00
Michael Johnson ade263cd1e Fix TLD issues for test concurrency
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
2022-05-23 21:07:16 +00:00
Arkady Shtempler 6d6b27d537 New scenario test case for TLD + re-factoring
1) Moving "test_create_zone_for_not_existing_tld" from API
   to scenario: "test_create_zone_using_not_existing_tld"
   Create a Zone using not existing TLD is supposed to FAIL
2) New test case: "test_create_zone_using_existing_tld"
   Create a Zone using existing TLD is supposed to PASS
3) Using indexes instead of underscores variables
4) Adding "tld_suffix" parameter into configuration (default is: 'com')
   to avoid (Non existing TLD) issues. All tests will be using
   the same(common) TLD suffix.

Change-Id: Ie9fca2598a3eab66f9cbd718e52e575744def160
2022-04-20 11:18:47 +03:00
zahlabut d6a6de5da8 New test cases for TLD tests suite
1) test_create_duplicated_tlds
   Try to create the same TLD twice, first attempt should PASS
   while second fails with 409 Conflict.
2) test_create_multiply_tlds
   Create 3 diferent TLDs, expected should PASS.
3) test_create_invalid_tld
   Attempts to create TLD using invalid values and
   huge size description. Expected 400 BadRequest
4) test_create_zone_for_not_existing_tld
   Create a zone with non existing TLD, should fail with
   400 BadRequest.
5) test_create_tld_as_primary_user
   Try to create a TLD usig Primary tenant.
   Expected: should fail with 403 Forbidden

Change-Id: Id01a1fc5eaf9d08039696795c6121e20fbe42bc7
2021-10-06 21:38:49 +00:00
Michael Johnson a3a236331c Make the API tests compatible with scoped tokens
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
2021-09-23 21:48:41 +00:00
Michael Johnson df9fda1c88 Update service client access in tempest tests
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
2021-09-23 21:02:30 +00:00
Erik Olof Gunnar Andersson e8ba5cc266 Fixed multiple leaking tests
- Fixed multiple issues with cleanups.
- Fixed tld never being removed.
- Added some additional waiters.

Change-Id: I2a83c7c2c276be6c0d4fac82e0beaa157362dca0
2021-06-15 00:30:49 -07:00
Zuul 8a3b02adbd Merge "Do not create network resources for API tests" 2018-03-16 08:41:02 +00:00
Graham Hayes bbc01e3510
Fix credential naming
Change-Id: Ica935f22ed30792033c6c36742abead20de66363
2018-02-15 18:12:05 +00:00
Ritesh Anand f015ecb1de Do not create network resources for API tests
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
2018-01-12 18:41:21 -08:00
Emilien Macchi ddb13fe2c5 Reduce the number of "smoke" tests
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
2016-07-07 14:33:28 +00:00
Paul Glass ec7ec7fefb Migrate negative tests for pools, tlds, blacklists
This adds tests that check Designate's behavior on an invalid uuid and
on a valid but not found uuid.

Change-Id: Ic93b8c1bbfc30792cbb071df797e11e17cc99033
2016-06-13 15:38:04 +00:00
Kiall Mac Innes 24df485be7 Replace idempotent_id decorator with tempest.lib version
Useage of the tempest.lib version is preferred, as it's considered
API stable, unlike the tempest.test version.

Change-Id: Ida2efd9fdd9ce095aaa33ce41c90f93efbcf0970
2016-06-09 16:13:10 +01:00
Jenkins d9ebd5ce89 Merge "Remove unintended comment" 2016-05-16 21:51:46 +00:00
sonu.kumar bbba362bec Remove unintended comment
This patch removes unintended comment from test case.

Change-Id: I87e83e7dff1fbe247b10d1a6edb068acdd783dcd
2016-05-13 09:37:22 +09:00
Kiall Mac Innes 8ae796c691 Port V1 Tempest test from designate's contrib folder
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
2016-05-12 14:44:08 +01:00
sonu.kumar 2de01bef40 Add tld_client's methods and tests to Designate tempest plugin
Partially-Implements: blueprint designate-tempest-plugin

Change-Id: Ic23a9249d0cf5c34e5c2c083b465200fa6c5da66
2016-05-12 05:15:07 +09:00