Commit Graph

105 Commits

Author SHA1 Message Date
Graham Hayes 9f5de18bcc Remove old functional tests
Change-Id: Id7f0fd8d30f1f3baa33da574ed6ff531b4914d2c
2017-03-08 12:46:26 +00:00
Cuong Nguyen b136cdbe20 Use modules for import not objects
As stated by the document [1], imports should use modules, not objects

[1] http://docs.openstack.org/developer/hacking/#imports

Change-Id: If37db5b501ffc297f583406e01a692379450ee47
2016-12-09 17:11:30 +07:00
Jenkins b3e7bdeb0c Merge "Remove tests ported to tempest plugin" 2016-11-06 15:20:49 +00:00
Kiall Mac Innes 9e05e45951 Remove tests ported to tempest plugin
Change-Id: Iedf816dddd39f08502898d927770c742a6276593
Depends-On: I587aced635f869ef828b31e35095a019154abf3b
Depends-On: I7bc21a055866c211a151008f60f3101dc8244ac9
Depends-On: I843701655f3fd07245b79e37fa286f05f20bf7a3
2016-11-04 09:52:10 +01:00
zhangyanxian 366807f706 Fix typos in models.py & bind9.filters
TrivialFix

Change-Id: I2019823fff85661ac70531e448c82187fecb541c
2016-09-29 08:59:26 +00:00
sonu.kumar 49a0182cb2 Remove recordset tests migrated to designate_tempest_plugin
Change-Id: I677cd62af3b36ffa564c2a535f03d1a460f93c25
2016-08-29 03:06:47 +00:00
Jenkins 7bb1b45919 Merge "Use tempest.lib instead of tempest-lib" 2016-08-21 14:56:17 +00:00
Ken'ichi Ohmichi 56dc9af410 Remove unnecessary __init__ from functionaltests
The __init__ just passes the same arguments, so it is not necessary
to implement it. This patch removes it for the cleanup.

Change-Id: Ib465356c47d06bfc66bef69126b089be24d19474
2016-08-12 15:58:00 -07:00
Ken'ichi Ohmichi 0bf62b9395 Use tempest.lib instead of tempest-lib
tempest-lib is marked as deprecated now.
The library is not maintained and Tempest itself provides the stable
interfaces under tempest.lib as [1] said.
So this patch makes the project use tempest.lib for long-term maintenance.

[1]: https://github.com/openstack/tempest-lib/blob/master/README.rst#tempest-lib

Change-Id: Ic45028c2fd803fca5e82a0caa85914414f511022
2016-08-12 11:01:26 -07:00
Graham Hayes 619b4753cd Add v2/quotas
This adds the quotas api from /admin to /v2 with some changes.

All users can GET /v2/quotas/<project_id>

Users with "All-Projects" permission can view other projects
(by setting X-Auth-All-Projects:True in the HTTP Headers)

Users with "All-Projects" and "set-quotas" can set other
projects quotas

Moved the API rendering to Designate Object based rendering

Change-Id: I7a0b828824ad6f274d922748f5f9a68157cd939a
Depends-On: I06180a7402fc45940d4b312666cf2dfd33af1305
2016-07-06 20:06:17 +01:00
Jenkins ba1ee308d7 Merge "Remove migrated "unauthed" functional tests" 2016-06-14 18:15:10 +00:00
Paul Glass ad39f0b038 Remove migrated "unauthed" functional tests
These tests are moved to the designate-tempest-plugin in
https://review.openstack.org/#/c/329187/

Change-Id: I399d4018f78d59c61c5bd5cc3be57bf678a3a75b
Depends-On: I9752685afccee5dcd009f76b5242fd6f12f0fc37
2016-06-14 13:37:54 +00:00
Paul Glass 5067eb8539 Remove migrated negative tests for pools, tlds, blacklists
These tests have been migrated to designate-tempest-plugin in
https://review.openstack.org/329062

Change-Id: I0c52bc66e67928f98cfa367277ec1f2c429a02a8
Depends-On: Ic93b8c1bbfc30792cbb071df797e11e17cc99033
2016-06-14 12:33:10 +00:00
sonu.kumar 7406212e2b Remove test cases which are moved to designate_tempest_plugin
Change-Id: I48e3ef586a1a8bd0ca733fe845922f209551e800
2016-05-18 12:36:16 +00:00
sonu.kumar 696503281b Remove zone import and export client methods + tests
This patch removes zone_import and zone_export client's methods and
tests as they have been moved to designate-tempest-plugin.

Change-Id: I38258c1bdfd32b7719f25df795acde2af5e66eec
2016-05-17 18:07:33 +09:00
Jenkins f48a1492c4 Merge "Remove more tests migrated to tempest plugin" 2016-05-12 19:22:50 +00:00
Kiall Mac Innes d4f53037f7 Remove more tests migrated to tempest plugin
These tests now have equivilant tests in the designate tempest
plugin, we should remove the old copy.

Change-Id: I0b55891d25880da8974f4fdb02d4c31e7b85fe6b
2016-05-12 14:05:20 +01:00
James Li 3c325b0699 Expose /v2/recordsets api endpoint
APIImpact
DocImpact

Implements blueprint expose-recordsets-api

Change-Id: I05f534d2fa0f40e6ec376b335591e6ec485079b2
2016-05-11 16:36:21 +00:00
Eric Larson 281b4f9f2e Fix parameterized class decorator
The decorator use the types.MethodType to attach the parameterized
test to the test class, but the function changed in python 3.x. This
uses six to do the right thing so this can be used outside the tempest
tests that are always run with python 2.x.

Change-Id: I56fee078d3fa718536208fd3bd5228cc45d24444
2016-05-06 09:16:11 -05:00
Jenkins deaff20d76 Merge "Remove tests moved to tempest" 2016-04-21 18:42:49 +00:00
James Li 5879c90098 Fix data filtering with pagination
When listing recordsets with filtering on record data,
designate makes a first filtering against recordsets table
to retrieve a list of recordsets belonging to the specified
zone, followed by the second filtering against records table
on record data (e.g. IPs), then intersects the two.
Check https://github.com/openstack/designate/blob/master/designate/api/v2/controllers/recordsets.py

This approach does not work properly when pagination happens.
Imagine a zone has 21 A records with 10.* like IPs,
and 9 A records with 192.* like IPs. When requesting
"/v2/zone/{zone_id}/recordsets?data=10.*", designate makes
the first filtering and get the first page (i.e. 20 recordsets) which may
have both 192.* and 10.* records mixed together,
the second filtering actually excludes all 192.* records from the first page.
But that ends up with a page less than 20 records, so designate won't
include a 'next' link in the response.

This patch fixes the problem.

Closes-bug: #1561746
Change-Id: Ib06dd288d129ff4b39c388d80f24d179c6af28d8
2016-04-20 15:01:35 +00:00
Kiall Mac Innes 1ec3b58fa9 Remove tests moved to tempest
Remove tests which have now been moved to the Designate tempest plugin, for
each test, I checked to ensure the new test was functionally the same - and
added or updated tests where there was a gap.

Change-Id: Iff08cc5bf77f64824165c72612f0783cb85be211
Depends-On: I3f0efe61452186c7399fd6196ff3509872c77a80
2016-04-15 14:29:49 +00:00
Tim Simmons 2ce080d36c Do not allow GET /resource.json
By _default_, Pecan exposes the functionality
to try and "use the extension in the URL for
guessing the content type to return."

I'm not even kidding:
http://pecan.readthedocs.org/en/latest/pecan_core.html#pecan.core.Pecan
`guess_content_type_from_ext`.

So this allowed an API user to GET /v2/zones.json that returned
the same thing as /v2/zones. Similarly for /zones/id.json.

So this turns that off.

Change-Id: I38a2e35f58cf7619bee64247d7ac01a50b0dcc58
2016-03-14 18:58:44 +00:00
Jenkins 57c29fdb3f Merge "Actually poll for zone deletes" 2016-02-22 18:11:37 +00:00
Jenkins 1a4eb3d4e7 Merge "A request hook interface for the functional test client" 2016-02-17 15:08:19 +00:00
Tim Simmons defe3a8f29 Actually poll for zone deletes
- This implements a few `TODO`s in the code around actually polling
nameservers for zone deletes. I found this necessary for changes
that were truing up missed DELETEs, and wanted to make a poll/
update_status call to verify deletion across a fleet of nameservers
when one was down.
- This originally failed in PowerDNS, because in older versions
that are still in all the distro repos, PDNS responded with a
NOERROR and empty answer section when it got a query for a zone
it knew nothing about. NEAT.
http://blog.powerdns.com/2015/03/02/from-noerror-to-refused/

- NOTE: This increases timeout for functional tests and we maybe
shouldn't do that.

Change-Id: Ied1e5daf4798127e00a06265164759d98fc9ba72
2016-02-16 22:30:37 +00:00
Paul Glass 81cd2994a9 A request hook interface for the functional test client
This lets us write custom hooks out of tree that are called whenever a
request is made in the functional tests.

The hook gets notified:

1. Just before a request, with the request args
2. Just after a request, with the resp and resp_body
3. When a request causes an exception, with the exception object (which
contains the resp and resp_body if it came from tempest_lib)

This is useful for maintaining certain out-of-tree test modifications,
like:

    1. Rate limiting client requests
    2. Additional custom logging
    3. ???

Change-Id: Ie2ca4ee85972aa8f9b22c402ed8fad368d2ff7d9
2016-02-15 10:23:03 -06:00
Paul Glass 47fc8f58c3 Functional tests for MX, TXT, SPF, SSHFP validation
* Test trailing slashes in SPF, TXT recordsets
* Test negative values in MX, SSHFP records
* Move recordset validation tests to a new module

Change-Id: I3f3ee09df45ddbefda66591c1937d733eaaf5ef3
2016-02-10 23:55:10 +00:00
Paul Glass d0676765ae Change the name of the test_create_wildcard_NS test
Change-Id: I243ef9fbd494113f8cedd7817eecce3f822fccb8
2016-02-08 14:05:02 -06:00
Jenkins 8a94af953e Merge "Log stacktraces of MultipleExceptions in functionaltests" 2016-02-05 20:51:41 +00:00
Paul Glass 079b562d73 Log stacktraces of MultipleExceptions in functionaltests
Change-Id: I28fed7243a92bab569da05e7c6b1757142c9cf88
2016-02-03 10:59:25 -06:00
Jenkins 90eafa8d0f Merge "Update functional test TLDCLient" 2016-02-02 20:53:00 +00:00
James Li fe3f7df4df Fix wildcard NS record
BIND does not allow a NS record having a wildcard name,
e.g. *.example.com.

Change-Id: I358d26a10129305bcfef91f5577c1f6ae08701d2
Closes-Bug: #1533299
2016-01-29 22:23:40 +00:00
Paul Glass 4e738a6791 Update functional test TLDCLient
This client now supports the `v2_path_pattern` config option, and now
allows you to pass in filters when listing tlds.

Change-Id: If6e1a343c1a0252f9f9d19f50c5d4c9772fa638c
2016-01-29 14:30:53 -06:00
James Li 4ff9965bcb Fix _assert_exception()
_assert_exception() is expected to catch the case where an exception
with certain data must be thrown out. But it misses the case that no
exception is thrown. This patch fixes the bug.

Change-Id: Ia51e12d171512db4e9bc6fc1dd3eb66c951051e8
Closes-bug: #1537892
2016-01-25 22:52:50 +00:00
Jenkins 49d7ce254b Merge "Replace assertEqual(None, *) with assertIsNone in tests" 2016-01-19 17:48:33 +00:00
vishal mahajan e45a5b10aa Replace assertEqual(None, *) with assertIsNone in tests
Replace assertEqual(None, *) with assertIsNone in tests to have more
clear messages in case of failure.

Change-Id: I471f34681f1bac78b9a6b4fe2e39f79670f5f25c
Closes-Bug:#1280522
2016-01-18 18:46:16 +05:30
Endre Karlson 84bb7226ce Fix CI Tempest jobs
After merge of change [1] to devstack project, preconfigured creds for
Tempest cannot be used anymore. But Manila requires such.
For the moment, latest Tempest interfaces cannot allow us to use
preconfigured creds because of bug #1524717.
So, until this bug fixed, we should workaround Devstack changes and
set legacy opts explicitly.

[1] I65b56ff681d6c27094380693c953fbc3664eceb0

Related-Bug: #1531049
Closes-Bug: #1531189
Change-Id: I4dc266713ec06bc6e98616a1277c8ae6cadf199d
2016-01-06 17:13:05 +01:00
Jenkins a1fae38903 Merge "Add support for interface and service" 2015-11-23 16:16:48 +00:00
Graham Hayes c5949ccb28 Rename all references of Domain to Zone
This is a pretty invasive change :)

A non complete list of changes:

* Database Tables
* Database Columns
* Designate Objects and fields on Objects
* Designate Objects Adaptors stop doing some of the renames
* All RPCAPI versions are bumped - totally backward
  incompatable (function names have changed)

Change-Id: Ib99e918998a3909fa4aa92bf1ee0475f8a519196
2015-11-17 15:22:16 +00:00
Endre Karlson ad6bb2221c Add support for interface and service
Change-Id: I79af53c779e7b31e943cd3d3b3e3e446bce59707
2015-11-12 14:24:12 +01:00
Jenkins 6232567f8d Merge "Add functional tests for TLDs" 2015-11-09 18:54:23 +00:00
Jenkins 5295a39769 Merge "Fix argument order in assertEqual to (expect, obs)" 2015-11-09 18:39:59 +00:00
Shuquan Huang dcb1ae9f89 remove default=None for config options
In the cfg module default=None is set as the default value.

Change-Id: I8bb9142ae506584ccc4099024b588ad639c2a242
Closes-bug: #1323975
2015-11-08 20:43:07 +08:00
Bertrand Lallau 63d1b2a590 Fix argument order in assertEqual to (expect, obs)
assertEqual expects that the arguments provided to it should be
(expected, observed). If a particular order is kept as a convention,
then it helps to provide a cleaner message to the developer if Unit Tests
fail. There are several Unit Test files where the arguments for assertEqual
have been swapped.

Change-Id: I6fdedcde67f76883257d35d1b812ab8a0e3e0733
Related-Bug: #1259292
2015-11-05 21:39:38 +01:00
Jenkins e01e9c549d Merge "Fix order of argument in assertEqual" 2015-10-14 13:53:38 +00:00
Endre Karlson 5813493932 Add functional tests for TLDs
Change-Id: Ic5c25f40cf19d0f1915f89698468090bf6eb743b
2015-10-13 15:06:53 +00:00
Jenkins 8db99252d2 Merge "Unauthed tests for Zones (Security)" 2015-10-13 01:50:22 +00:00
Jenkins 6efc44ebb4 Merge "Unauthed tests for Blacklists (Security)" 2015-10-13 01:49:01 +00:00
Jenkins 3a2c4f3b19 Merge "Unauthed tests for Pools (Security)" 2015-10-13 01:48:52 +00:00