Fix credential naming

Change-Id: Ica935f22ed30792033c6c36742abead20de66363
This commit is contained in:
Graham Hayes 2018-02-15 14:40:54 +00:00
parent 83974a75d1
commit bbc01e3510
No known key found for this signature in database
GPG Key ID: 1B263DC59F4AEFD5
23 changed files with 64 additions and 63 deletions

View File

@ -40,7 +40,7 @@ class QuotasAdminTest(BaseQuotasTest):
def setup_clients(cls):
super(QuotasAdminTest, cls).setup_clients()
cls.admin_client = cls.os_adm.quotas_client
cls.admin_client = cls.os_admin.quotas_client
@decorators.idempotent_id('ed42f367-e5ba-40d7-a08d-366ad787d21c')
def test_show_quotas(self):

View File

@ -27,7 +27,7 @@ class DnsDomainsTest(base.BaseDnsV1Test):
def setup_clients(cls):
super(DnsDomainsTest, cls).setup_clients()
cls.client = cls.os.domains_client
cls.client = cls.os_primary.domains_client
@classmethod
def resource_setup(cls):

View File

@ -26,7 +26,7 @@ class RecordsTest(base.BaseDnsV1Test):
def setup_clients(cls):
super(RecordsTest, cls).setup_clients()
cls.client = cls.os.records_client
cls.client = cls.os_primary.records_client
@classmethod
def resource_setup(cls):
@ -36,7 +36,8 @@ class RecordsTest(base.BaseDnsV1Test):
cls.setup_records = list()
name = data_utils.rand_name('domain') + '.com.'
email = data_utils.rand_name('dns') + '@testmail.com'
_, cls.domain = cls.os.domains_client.create_domain(name, email)
_, cls.domain = cls.os_primary.domains_client.create_domain(
name, email)
# Creates a record with type as A
r_name = 'www.' + name
data1 = "192.0.2.3"
@ -55,7 +56,7 @@ class RecordsTest(base.BaseDnsV1Test):
def resource_cleanup(cls):
for record in cls.setup_records:
cls.client.delete_record(cls.domain['id'], record['id'])
cls.os.domains_client.delete_domain(cls.domain['id'])
cls.os_primary.domains_client.delete_domain(cls.domain['id'])
super(RecordsTest, cls).resource_cleanup()
def _delete_record(self, domain_id, record_id):

View File

@ -36,7 +36,7 @@ class ServersAdminTest(base.BaseDnsV1Test):
def setup_clients(cls):
super(ServersAdminTest, cls).setup_clients()
cls.client = cls.os_adm.servers_client
cls.client = cls.os_admin.servers_client
@classmethod
def skip_checks(cls):

View File

@ -33,7 +33,7 @@ class BlacklistsAdminTest(BaseBlacklistsTest):
@classmethod
def setup_clients(cls):
super(BlacklistsAdminTest, cls).setup_clients()
cls.admin_client = cls.os_adm.blacklists_client
cls.admin_client = cls.os_admin.blacklists_client
@decorators.idempotent_id('3a7f7564-6bdd-446e-addc-a3475b4c3f71')
def test_create_blacklist(self):
@ -111,7 +111,7 @@ class TestBlacklistNotFoundAdmin(BaseBlacklistsTest):
@classmethod
def setup_clients(cls):
super(TestBlacklistNotFoundAdmin, cls).setup_clients()
cls.admin_client = cls.os_adm.blacklists_client
cls.admin_client = cls.os_admin.blacklists_client
@decorators.idempotent_id('9d65b638-fe98-47a8-853f-fa9244d144cc')
def test_show_blacklist_404(self):
@ -148,7 +148,7 @@ class TestBlacklistInvalidIdAdmin(BaseBlacklistsTest):
@classmethod
def setup_clients(cls):
super(TestBlacklistInvalidIdAdmin, cls).setup_clients()
cls.admin_client = cls.os_adm.blacklists_client
cls.admin_client = cls.os_admin.blacklists_client
@decorators.idempotent_id('c7bae53f-2edc-45d8-b254-8a81482728c1')
def test_show_blacklist_invalid_uuid(self):

View File

@ -40,7 +40,7 @@ class PoolAdminTest(BasePoolTest):
def setup_clients(cls):
super(PoolAdminTest, cls).setup_clients()
cls.admin_client = cls.os_adm.pool_client
cls.admin_client = cls.os_admin.pool_client
@decorators.idempotent_id('69257f7c-b3d5-4e1b-998e-0677ad12f125')
def test_create_pool(self):
@ -124,7 +124,7 @@ class TestPoolNotFoundAdmin(BasePoolTest):
@classmethod
def setup_clients(cls):
super(TestPoolNotFoundAdmin, cls).setup_clients()
cls.admin_client = cls.os_adm.pool_client
cls.admin_client = cls.os_admin.pool_client
@decorators.idempotent_id('56281b2f-dd5a-4376-8c32-aba771062fa5')
def test_show_pool_404(self):
@ -161,7 +161,7 @@ class TestPoolInvalidIdAdmin(BasePoolTest):
@classmethod
def setup_clients(cls):
super(TestPoolInvalidIdAdmin, cls).setup_clients()
cls.admin_client = cls.os_adm.pool_client
cls.admin_client = cls.os_admin.pool_client
@decorators.idempotent_id('081d0188-42a7-4953-af0e-b022960715e2')
def test_show_pool_invalid_uuid(self):

View File

@ -41,8 +41,8 @@ class QuotasV2Test(base.BaseDnsV2Test):
def setup_clients(cls):
super(QuotasV2Test, cls).setup_clients()
cls.quotas_client = cls.os.quotas_client
cls.admin_client = cls.os_adm.quotas_client
cls.quotas_client = cls.os_primary.quotas_client
cls.admin_client = cls.os_admin.quotas_client
@decorators.idempotent_id('1dac991a-9e2e-452c-a47a-26ac37381ec5')
def test_show_quotas(self):

View File

@ -52,8 +52,8 @@ class RecordsetsTest(BaseRecordsetsTest):
def setup_clients(cls):
super(RecordsetsTest, cls).setup_clients()
cls.client = cls.os.recordset_client
cls.zone_client = cls.os.zones_client
cls.client = cls.os_primary.recordset_client
cls.zone_client = cls.os_primary.zones_client
@decorators.attr(type='smoke')
@decorators.idempotent_id('631d74fd-6909-4684-a61b-5c4d2f92c3e7')
@ -205,8 +205,8 @@ class RecordsetsNegativeTest(BaseRecordsetsTest):
def setup_clients(cls):
super(RecordsetsNegativeTest, cls).setup_clients()
cls.client = cls.os.recordset_client
cls.zone_client = cls.os.zones_client
cls.client = cls.os_primary.recordset_client
cls.zone_client = cls.os_primary.zones_client
@decorators.idempotent_id('98c94f8c-217a-4056-b996-b1f856d0753e')
@ddt.file_data("recordset_data_invalid.json")
@ -305,8 +305,8 @@ class RootRecordsetsTests(BaseRecordsetsTest):
def setup_clients(cls):
super(RootRecordsetsTests, cls).setup_clients()
cls.client = cls.os.recordset_client
cls.zone_client = cls.os.zones_client
cls.client = cls.os_primary.recordset_client
cls.zone_client = cls.os_primary.zones_client
@classmethod
def skip_checks(cls):
@ -397,8 +397,8 @@ class RecordsetOwnershipTest(BaseRecordsetsTest):
def setup_clients(cls):
super(RecordsetOwnershipTest, cls).setup_clients()
cls.client = cls.os.recordset_client
cls.zone_client = cls.os.zones_client
cls.client = cls.os_primary.recordset_client
cls.zone_client = cls.os_primary.zones_client
cls.alt_zone_client = cls.os_alt.zones_client
cls.alt_client = cls.os_alt.recordset_client

View File

@ -45,8 +45,8 @@ class RecordsetValidationTest(base.BaseDnsV2Test):
def setup_clients(cls):
super(RecordsetValidationTest, cls).setup_clients()
cls.recordset_client = cls.os.recordset_client
cls.zones_client = cls.os.zones_client
cls.recordset_client = cls.os_primary.recordset_client
cls.zones_client = cls.os_primary.zones_client
@property
def zone(self):

View File

@ -32,7 +32,7 @@ class TldAdminTest(BaseTldTest):
@classmethod
def setup_clients(cls):
super(TldAdminTest, cls).setup_clients()
cls.admin_client = cls.os_adm.tld_client
cls.admin_client = cls.os_admin.tld_client
@classmethod
def resource_setup(cls):
@ -122,7 +122,7 @@ class TestTldNotFoundAdmin(BaseTldTest):
@classmethod
def setup_clients(cls):
super(TestTldNotFoundAdmin, cls).setup_clients()
cls.admin_client = cls.os_adm.tld_client
cls.admin_client = cls.os_admin.tld_client
@decorators.idempotent_id('b237d5ee-0d76-4294-a3b6-c2f8bf4b0e30')
def test_show_tld_404(self):
@ -159,7 +159,7 @@ class TestTldInvalidIdAdmin(BaseTldTest):
@classmethod
def setup_clients(cls):
super(TestTldInvalidIdAdmin, cls).setup_clients()
cls.admin_client = cls.os_adm.tld_client
cls.admin_client = cls.os_admin.tld_client
@decorators.idempotent_id('f9ec0730-57ff-4720-8d06-e11d377c7cfc')
def test_show_tld_invalid_uuid(self):

View File

@ -29,9 +29,9 @@ class TransferAcceptTest(BaseTransferAcceptTest):
def setup_clients(cls):
super(TransferAcceptTest, cls).setup_clients()
cls.zone_client = cls.os.zones_client
cls.request_client = cls.os.transfer_request_client
cls.client = cls.os.transfer_accept_client
cls.zone_client = cls.os_primary.zones_client
cls.request_client = cls.os_primary.transfer_request_client
cls.client = cls.os_primary.transfer_accept_client
@decorators.idempotent_id('1c6baf97-a83e-4d2e-a5d8-9d37fb7808f3')
def test_create_transfer_accept(self):

View File

@ -33,8 +33,8 @@ class TransferRequestTest(BaseTransferRequestTest):
def setup_clients(cls):
super(TransferRequestTest, cls).setup_clients()
cls.zone_client = cls.os.zones_client
cls.client = cls.os.transfer_request_client
cls.zone_client = cls.os_primary.zones_client
cls.client = cls.os_primary.transfer_request_client
cls.alt_client = cls.os_alt.transfer_request_client
@decorators.idempotent_id('2381d489-ad84-403d-b0a2-8b77e4e966bf')
@ -194,7 +194,7 @@ class TestTransferRequestNotFound(BaseTransferRequestTest):
@classmethod
def setup_clients(cls):
super(TestTransferRequestNotFound, cls).setup_clients()
cls.client = cls.os.transfer_request_client
cls.client = cls.os_primary.transfer_request_client
@decorators.idempotent_id('d255f72f-ba24-43df-9dba-011ed7f4625d')
def test_show_transfer_request_404(self):
@ -230,7 +230,7 @@ class TestTransferRequestInvalidId(BaseTransferRequestTest):
@classmethod
def setup_clients(cls):
super(TestTransferRequestInvalidId, cls).setup_clients()
cls.client = cls.os.transfer_request_client
cls.client = cls.os_primary.transfer_request_client
@decorators.idempotent_id('2205dd19-ecc7-4c68-9e89-63c47d642b07')
def test_show_transfer_request_invalid_uuid(self):

View File

@ -32,7 +32,7 @@ class TsigkeyAdminTest(BaseTsigkeyTest):
@classmethod
def setup_clients(cls):
super(TsigkeyAdminTest, cls).setup_clients()
cls.zone_client = cls.os.zones_client
cls.zone_client = cls.os_primary.zones_client
cls.admin_client = cls.os_admin.tsigkey_client
@decorators.idempotent_id('e7b484e3-7ed5-4840-89d7-1e696986f8e4')
@ -139,7 +139,7 @@ class TestTsigkeyNotFoundAdmin(BaseTsigkeyTest):
@classmethod
def setup_clients(cls):
super(TestTsigkeyNotFoundAdmin, cls).setup_clients()
cls.admin_client = cls.os_adm.tsigkey_client
cls.admin_client = cls.os_admin.tsigkey_client
@decorators.idempotent_id('824c9b49-edc5-4282-929e-467a158d23e4')
def test_show_tsigkey_404(self):
@ -176,7 +176,7 @@ class TestTsigkeyInvalidIdAdmin(BaseTsigkeyTest):
@classmethod
def setup_clients(cls):
super(TestTsigkeyInvalidIdAdmin, cls).setup_clients()
cls.admin_client = cls.os_adm.tsigkey_client
cls.admin_client = cls.os_admin.tsigkey_client
@decorators.idempotent_id('2a8dfc75-9884-4b1c-8f1f-ed835d96f2fe')
def test_show_tsigkey_invalid_uuid(self):

View File

@ -31,11 +31,11 @@ class TestDnsUnauthed(base.BaseDnsV2Test):
@classmethod
def setup_clients(cls):
super(TestDnsUnauthed, cls).setup_clients()
cls.zones_client = cls.os.zones_client
cls.recordset_client = cls.os.recordset_client
cls.tld_client = cls.os.tld_client
cls.pool_client = cls.os.pool_client
cls.blacklists_client = cls.os.blacklists_client
cls.zones_client = cls.os_primary.zones_client
cls.recordset_client = cls.os_primary.recordset_client
cls.tld_client = cls.os_primary.tld_client
cls.pool_client = cls.os_primary.pool_client
cls.blacklists_client = cls.os_primary.blacklists_client
@decorators.idempotent_id('0f7a6d20-f6f3-4937-8fe6-7a9851227d98')
@ddt.file_data('unauthed_data.json')

View File

@ -32,7 +32,7 @@ class ZonesTest(BaseZonesTest):
def setup_clients(cls):
super(ZonesTest, cls).setup_clients()
cls.client = cls.os.zones_client
cls.client = cls.os_primary.zones_client
@decorators.idempotent_id('9d2e20fc-e56f-4a62-9c61-9752a9ec615c')
def test_create_zone(self):
@ -119,8 +119,8 @@ class ZonesAdminTest(BaseZonesTest):
def setup_clients(cls):
super(ZonesAdminTest, cls).setup_clients()
cls.client = cls.os.zones_client
cls.admin_client = cls.os_adm.zones_client
cls.client = cls.os_primary.zones_client
cls.admin_client = cls.os_admin.zones_client
@decorators.idempotent_id('6477f92d-70ba-46eb-bd6c-fc50c405e222')
def test_get_other_tenant_zone(self):
@ -143,7 +143,7 @@ class ZoneOwnershipTest(BaseZonesTest):
def setup_clients(cls):
super(ZoneOwnershipTest, cls).setup_clients()
cls.client = cls.os.zones_client
cls.client = cls.os_primary.zones_client
cls.alt_client = cls.os_alt.zones_client
@decorators.idempotent_id('5d28580a-a012-4b57-b211-e077b1a01340')

View File

@ -31,8 +31,8 @@ class ZonesExportTest(BaseZoneExportsTest):
def setup_clients(cls):
super(ZonesExportTest, cls).setup_clients()
cls.zone_client = cls.os.zones_client
cls.client = cls.os.zone_exports_client
cls.zone_client = cls.os_primary.zones_client
cls.client = cls.os_primary.zone_exports_client
@decorators.idempotent_id('2dd8a9a0-98a2-4bf6-bb51-286583b30f40')
def test_create_zone_export(self):

View File

@ -30,7 +30,7 @@ class ZonesImportTest(BaseZonesImportTest):
@classmethod
def setup_clients(cls):
super(ZonesImportTest, cls).setup_clients()
cls.client = cls.os.zone_imports_client
cls.client = cls.os_primary.zone_imports_client
@decorators.idempotent_id('2e2d907d-0609-405b-9c96-3cb2b87e3dce')
def test_create_zone_import(self):

View File

@ -60,8 +60,8 @@ class BaseDnsTest(test.BaseTestCase):
# at class setup time. Credential types can be 'primary', 'alt', 'admin' or
# a list of roles - the first element of the list being a label, and the
# rest the actual roles.
# NOTE(kiall) primary will result in a manager @ cls.os, alt will have
# cls.os_alt, and admin will have cls.os_adm.
# NOTE(kiall) primary will result in a manager @ cls.os_primary, alt will
# have cls.os_alt, and admin will have cls.os_admin.
# NOTE(kiall) We should default to only primary, and request additional
# credentials in the tests that require them.
credentials = ['primary']

View File

@ -29,8 +29,8 @@ class ZonesTest(base.BaseDnsV2Test):
def setup_clients(cls):
super(ZonesTest, cls).setup_clients()
cls.client = cls.os.zones_client
cls.query_client = cls.os.query_client
cls.client = cls.os_primary.zones_client
cls.query_client = cls.os_primary.query_client
@decorators.attr(type='smoke')
@decorators.attr(type='slow')

View File

@ -28,8 +28,8 @@ class ZonesExportTest(BaseZoneExportsTest):
def setup_clients(cls):
super(ZonesExportTest, cls).setup_clients()
cls.zones_client = cls.os.zones_client
cls.client = cls.os.zone_exports_client
cls.zones_client = cls.os_primary.zones_client
cls.client = cls.os_primary.zone_exports_client
@decorators.attr(type='slow')
@decorators.idempotent_id('0484c3c4-df57-458e-a6e5-6eb63e0475e0')

View File

@ -27,8 +27,8 @@ class ZonesImportTest(BaseZonesImportTest):
@classmethod
def setup_clients(cls):
super(ZonesImportTest, cls).setup_clients()
cls.client = cls.os.zone_imports_client
cls.zones_client = cls.os.zones_client
cls.client = cls.os_primary.zone_imports_client
cls.zones_client = cls.os_primary.zones_client
@decorators.attr(type='slow')
@decorators.idempotent_id('679f38d0-2f2f-49c5-934e-8fe0c452f56e')

View File

@ -26,11 +26,11 @@ class ZonesTransferTest(base.BaseDnsV2Test):
@classmethod
def setup_clients(cls):
super(ZonesTransferTest, cls).setup_clients()
cls.zones_client = cls.os.zones_client
cls.zones_client = cls.os_primary.zones_client
cls.alt_zones_client = cls.os_alt.zones_client
cls.request_client = cls.os.transfer_request_client
cls.request_client = cls.os_primary.transfer_request_client
cls.alt_request_client = cls.os_alt.transfer_request_client
cls.accept_client = cls.os.transfer_accept_client
cls.accept_client = cls.os_primary.transfer_accept_client
cls.alt_accept_client = cls.os_alt.transfer_accept_client
@decorators.idempotent_id('60bd80ac-c979-4686-9a03-f2f775f272ab')

View File

@ -166,7 +166,7 @@ included below:
def setup_clients(cls):
super(ZonesTest, cls).setup_clients()
cls.client = cls.os.zones_client
cls.client = cls.os_primary.zones_client
@decorators.attr(type='smoke')
@decorators.idempotent_id('fbabd6af-238a-462e-b923-de4d736b90a7')
@ -200,8 +200,8 @@ credentials are available using the class level "credentials" property like so:
def setup_clients(cls):
super(ZonesAdminTest, cls).setup_clients()
cls.client = cls.os.zones_client
cls.adm_client = cls.os_adm.zones_client
cls.client = cls.os_primary.zones_client
cls.adm_client = cls.os_admin.zones_client
@decorators.idempotent_id('6477f92d-70ba-46eb-bd6c-fc50c405e222')
def test_get_other_tenant_zone(self):