designate/designate/tests/unit
Erik Olof Gunnar Andersson 1924abff40 Add unique constraint to service_statuses
In the current implementation, if for any reason a duplicate
service entry gets created, the call to update that service
will fail endlessly, and instead cause the service to create
new entries everytime update_service_status gets called. Causing
it to fill the database with duplicate entries.

This patch adds a unique constraint to the service_statuses
table based on the service_name and hostname, to ensure that
this cannot happen.

In addition we add a new test to the storage driver and further
expanded the central service test coverage.

Change-Id: I307a8f7dd8b8a83effa447a846db3288efa32dba
Closes-Bug: #1768824
2018-05-20 12:41:21 -07:00
..
test_agent Fix unit tests for oslo.config 3.18.0 2016-10-21 14:21:19 -06:00
test_api Replace assertDictEqual() with assertEqual() 2016-08-08 01:47:04 +00:00
test_backend Use designate.utils.generate_uuid instead of str(uuid.uuid4) 2017-01-16 16:12:08 +07:00
test_central Check for multi level tlds 2017-10-17 17:36:55 +01:00
test_mdns Skip test failing after oslo.messaging update 2017-09-09 12:01:11 +00:00
test_metrics Remove translation of log messages 2018-03-14 12:54:05 -07:00
test_objects Ensure we do not pass invalid data for A records 2018-04-11 15:34:15 +01:00
test_pool_manager Implement policy in code (1) 2017-10-24 09:23:25 +00:00
test_producer Fix task tests under py3 2017-06-29 10:02:03 +02:00
test_scheduler Remove usage of parameter enforce_type 2017-05-22 22:45:14 +08:00
README Create unit tests dir, move objects tests there 2015-07-20 14:15:42 +01:00
__init__.py Actually poll for zone deletes 2016-02-16 22:30:37 +00:00
test_pool.py Migrate object to OVO (4) 2018-02-25 16:07:38 +00:00
test_service_status.py Add unique constraint to service_statuses 2018-05-20 12:41:21 -07:00

README

This directory contains pure unit tests.

Examples:

ostestr --regex designate.tests.test_unit

python setup.py testr --coverage -t designate.tests.test_unit