Commit Graph

30 Commits

Author SHA1 Message Date
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 cc8f89b41c Add Designate hacking checks to the tempest plugin
This patch adds the Designate hacking checks to also run against
the Designate tempest plugin code to maintain consistent style
checking across the Designate repositories.

Change-Id: I8f41bb8188ba8442dbf493dac39b8601f5208938
2023-02-15 22:14:16 +00:00
Arkady Shtempler a2b08ee1b1 Recordset scenario test suite changes
1) Re-factoring: replace underscores by index, use constants
2) Moving "test_create_soa_record_not_permitted" from Scenario to API
3) New test: "test_delete_ns_record_not_permitted"
   Primary user is not able to delete NS type recordset
4) New test: "test_update_records_propagated_to_backends"
   Update recordset TTL (all types except NS and SOA) and
   make sure that the updated TTL is propagated to the backends
5) Adding backend validation check to the existing test:
   "test_create_and_delete_records_on_existing_zone"
6) Remove "NS" type record from "recordset_data.json"
   Reason: the test was bogus because it was creating an NS record
   for a sub-zone

Change-Id: I169b3666a941ac61ac56619cdbe0f947340f669f
2022-07-24 11:46:07 +03:00
Zuul 6d5e0a1406 Merge "Remove six" 2022-06-15 18:13:39 +00:00
Michael Johnson 3ff84af052 Expand Designate RBAC testing - zones
This patch adds RBAC testing for allowed and disallowed credentials.
This is one of a series of patches adding testing. This patch covers the
zones API.

Change-Id: I2312e0e4293b60d9644f8c0d3a41e0b5f330c20d
2022-05-24 22:23:00 +00:00
Michael Johnson bf2379bb97 Expand Designate RBAC testing
This patch adds RBAC testing for allowed and disallowed credentials.

Change-Id: I0f7609b45bb21890a86144f74315f1d2f02a6e7d
2022-05-24 22:19:35 +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
Zuul 402767b78c Merge "New scenario test case for TLD + re-factoring" 2022-05-11 15:36:24 +00:00
Takashi Kajinami c136230e7e Remove six
Python 2 is no longer supported, thus usage of six can be removed.

Change-Id: I7b5038fa45de0972da064da384b47ba94785613c
2022-05-10 16:50:09 +09:00
Erik Olof Gunnar Andersson 3bfce9b3f9 Enable unset ptr test and add inactive value to floating ip status
Depends-On: https://review.opendev.org/c/openstack/designate/+/830549

Change-Id: Iba915b4701037b5ab33c57550c5f3dcddf01ccbc
2022-05-06 07:35:11 +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 5260227cc7 Create "A" type recordset using a list of IPs records
Test name: test_create_A_recordset_multiply_ips
Note: this patch is also fixes missing cleanups and adds
the existing constants to be used in code.

Change-Id: I0904803f7e3ac5635babfc82f409a0e38685c9fa
2021-10-28 13:23:22 +03: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 ac961e513f Remove temporary client
This patch removes a temporary client needed to transition the
neutron-tempest-plugin test_dns_integration over to the tempest
registry.

Depends-On: https://review.opendev.org/c/openstack/neutron-tempest-plugin/+/800291
Change-Id: I26da94382b8a66509e2294ffbb3b282847b2c0d0
2021-09-23 21:07:04 +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
Graham Hayes dcfa7c0372 Remove v1 API tests
The V1 API was removed from Designate in the Queens release. It has now been
eight releases since then, so it is time to remove the tests for it. If these
tests are still needed, please use git tag version 0.11.0 (Wallaby) or older.

Change-Id: I496d02c1be165eeaf721dea2eafe5f6a70279e68
2021-07-06 22:33:56 +00:00
Erik Olof Gunnar Andersson fa6f78c1cf Properly clean up transfer requests
Change-Id: I6697c502875f281f0174a46a725d29fadb73c754
2021-06-21 12:55:50 -07: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 c1708fc0c8 Merge "Properly quote TXT/SPF sample data" 2019-03-14 17:51:12 +00:00
Dmitry Galkin 9a0a360be0 Properly quote TXT/SPF sample data
(Check TXT/SPF records for RFC1035 sec. 5.1.)

Adds quotes and escape for quotes across the TXT/SPF data sets and tests.

Needed-By: https://review.openstack.org/#/c/555398
Change-Id: I5c8160a1cd4a41c4931ab852d478753bb98f4b7d
Closes-Bug: 1755788
2019-03-13 14:37:49 +00:00
Maksym Shalamov 2da1d6e6c9 Fix deleting zones after tests
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
2019-02-21 14:26:32 +00: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
Ritesh Anand 6e03c58b7f Do not create networks for API tests
We do not need network resources for these tests.

Change-Id: I3e17a39d64835d49fcd882ec6b7b556b6acc4f17
Closes-Bug: #1689415
2017-12-05 00:47:39 +00:00
Kiall Mac Innes 4a37679fdf Add several negative RecordSet tests
Change-Id: I18a8d0810e1eb83050cba88ed04f8a2902f2fcc0
2016-08-25 11:16:57 +01:00
Graham Hayes c811498e62 Add functional testing for the v2 API quotas endpoint
This is disabled by default, I7a0b828824ad6f274d922748f5f9a68157cd939a
will enable it.

Change-Id: I06180a7402fc45940d4b312666cf2dfd33af1305
2016-07-08 13:06:44 +01: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 d8471de657 Move assertExpected fucntion to base class
Function assertExpected can be used in multiple tests
so moving this to base test class.

Change-Id: I35c3cc2c25af6b96169e926fc68fa74130db8c4b
2016-04-15 09:14:12 +09:00
Kiall Mac Innes 560c89bd67 API tests should be fast, Scenario tests slow
In general, our API tests should aim to be fast - i.e. no waiting around for
zones to become ACTIVE etc.

On the other hand, our scenario tests should cover more real world scenarios,
for example, create a domain, waiting for it to become active, then deleting
it.

Change-Id: Id0779110cebf77db3a36ded1aef81382fbf641e0
2016-04-13 13:10:17 +01:00