Unskip and fix handler tests in py3
This also removes from the blacklist tests passing. Change-Id: Ic530fc9c60932cbd3742cc6026261734da7c4add
This commit is contained in:
parent
0c62a69eba
commit
9282ae8b0d
|
@ -379,7 +379,11 @@ class Service(service.RPCService, service.Service):
|
||||||
Check to make sure that the records in the recordset
|
Check to make sure that the records in the recordset
|
||||||
follow the rules, and won't blow up on the nameserver.
|
follow the rules, and won't blow up on the nameserver.
|
||||||
"""
|
"""
|
||||||
if hasattr(recordset, 'records'):
|
try:
|
||||||
|
recordset.records
|
||||||
|
except (AttributeError, exceptions.RelationNotLoaded):
|
||||||
|
pass
|
||||||
|
else:
|
||||||
if len(recordset.records) > 1 and recordset.type == 'CNAME':
|
if len(recordset.records) > 1 and recordset.type == 'CNAME':
|
||||||
raise exceptions.BadRequest(
|
raise exceptions.BadRequest(
|
||||||
'CNAME recordsets may not have more than 1 record'
|
'CNAME recordsets may not have more than 1 record'
|
||||||
|
|
|
@ -113,7 +113,7 @@ class RequestHandler(xfr.XFRMixin):
|
||||||
question = request.question[0]
|
question = request.question[0]
|
||||||
|
|
||||||
criterion = {
|
criterion = {
|
||||||
'name': question.name.to_text(),
|
'name': question.name.to_text().decode('utf-8'),
|
||||||
'type': 'SECONDARY',
|
'type': 'SECONDARY',
|
||||||
'deleted': False
|
'deleted': False
|
||||||
}
|
}
|
||||||
|
@ -349,7 +349,7 @@ class RequestHandler(xfr.XFRMixin):
|
||||||
# TODO(vinod) once validation is separated from the api,
|
# TODO(vinod) once validation is separated from the api,
|
||||||
# validate the parameters
|
# validate the parameters
|
||||||
criterion = {
|
criterion = {
|
||||||
'name': q_rrset.name.to_text(),
|
'name': q_rrset.name.to_text().decode('utf-8'),
|
||||||
'type': dns.rdatatype.to_text(q_rrset.rdtype),
|
'type': dns.rdatatype.to_text(q_rrset.rdtype),
|
||||||
'zones_deleted': False
|
'zones_deleted': False
|
||||||
}
|
}
|
||||||
|
|
|
@ -429,7 +429,7 @@ class MdnsRequestHandlerTest(MdnsTestCase):
|
||||||
# ;AUTHORITY
|
# ;AUTHORITY
|
||||||
# ;ADDITIONAL
|
# ;ADDITIONAL
|
||||||
|
|
||||||
expected_response = "d2f5850000010001000000010474657874076578616d706c6503636f6d0000100001c00c0010000100000e10000b0a666f6f747874646174610000292000000000000000" # noqa
|
expected_response = b"d2f5850000010001000000010474657874076578616d706c6503636f6d0000100001c00c0010000100000e10000b0a666f6f747874646174610000292000000000000000" # noqa
|
||||||
|
|
||||||
# This creates an TXT record for mail.example.com
|
# This creates an TXT record for mail.example.com
|
||||||
zone = self.create_zone()
|
zone = self.create_zone()
|
||||||
|
@ -445,7 +445,7 @@ class MdnsRequestHandlerTest(MdnsTestCase):
|
||||||
# query is for text.example.com. IN TXT
|
# query is for text.example.com. IN TXT
|
||||||
payload = "d2f5012000010000000000010474657874076578616d706c6503636f6d00001000010000291000000000000000" # noqa
|
payload = "d2f5012000010000000000010474657874076578616d706c6503636f6d00001000010000291000000000000000" # noqa
|
||||||
|
|
||||||
expected_response = "d2f5850000010001000000010474657874076578616d706c6503636f6d0000100001c00c0010000100000e10000d03666f6f0362617204626c61680000292000000000000000" # noqa
|
expected_response = b"d2f5850000010001000000010474657874076578616d706c6503636f6d0000100001c00c0010000100000e10000d03666f6f0362617204626c61680000292000000000000000" # noqa
|
||||||
# expected_response is NOERROR. The other fields are
|
# expected_response is NOERROR. The other fields are
|
||||||
# response: id 54005
|
# response: id 54005
|
||||||
# opcode QUERY
|
# opcode QUERY
|
||||||
|
|
|
@ -1,15 +1,8 @@
|
||||||
# Blacklist of tests failing on Python 3
|
# Blacklist of tests failing on Python 3
|
||||||
designate.tests.test_api.test_v1.test_records
|
|
||||||
designate.tests.test_api.test_v2.test_floatingips
|
designate.tests.test_api.test_v2.test_floatingips
|
||||||
designate.tests.test_api.test_v2.test_recordsets
|
|
||||||
designate.tests.test_api.test_v2.test_zones
|
designate.tests.test_api.test_v2.test_zones
|
||||||
designate.tests.test_central.test_service
|
designate.tests.test_central.test_service
|
||||||
designate.tests.test_dnsutils
|
|
||||||
designate.tests.test_mdns.test_handler
|
|
||||||
designate.tests.test_notification_handler.test_neutron
|
|
||||||
designate.tests.test_notification_handler.test_nova
|
|
||||||
designate.tests.test_pool_manager.test_service
|
designate.tests.test_pool_manager.test_service
|
||||||
designate.tests.test_storage.test_sqlalchemy
|
|
||||||
designate.tests.unit.test_central.test_basic
|
designate.tests.unit.test_central.test_basic
|
||||||
designate.tests.unit.test_pool
|
designate.tests.unit.test_pool
|
||||||
designate.tests.unit.test_producer.test_tasks
|
designate.tests.unit.test_producer.test_tasks
|
||||||
|
|
Loading…
Reference in New Issue