From d4f53037f7923fe7d6261489a1d2cbb8680a369b Mon Sep 17 00:00:00 2001 From: Kiall Mac Innes Date: Thu, 12 May 2016 14:02:19 +0100 Subject: [PATCH] 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 --- functionaltests/api/v2/test_blacklist.py | 32 --------------------- functionaltests/api/v2/test_pool.py | 33 ---------------------- functionaltests/api/v2/test_tld.py | 36 ------------------------ 3 files changed, 101 deletions(-) diff --git a/functionaltests/api/v2/test_blacklist.py b/functionaltests/api/v2/test_blacklist.py index 99eae63b1..c9729c8f0 100644 --- a/functionaltests/api/v2/test_blacklist.py +++ b/functionaltests/api/v2/test_blacklist.py @@ -21,42 +21,10 @@ from tempest_lib import exceptions from functionaltests.common import datagen from functionaltests.api.v2.base import DesignateV2Test from functionaltests.api.v2.clients.blacklist_client import BlacklistClient -from functionaltests.api.v2.fixtures import BlacklistFixture class BlacklistTest(DesignateV2Test): - def test_list_blacklists(self): - self.useFixture(BlacklistFixture()) - resp, model = BlacklistClient.as_user('admin').list_blacklists() - self.assertEqual(200, resp.status) - self.assertGreater(len(model.blacklists), 0) - - def test_create_blacklist(self): - fixture = self.useFixture(BlacklistFixture()) - self.assertEqual(fixture.post_model.pattern, - fixture.created_blacklist.pattern) - - def test_update_blacklist(self): - old_model = self.useFixture(BlacklistFixture()).created_blacklist - - patch_model = datagen.random_blacklist_data() - resp, new_model = BlacklistClient.as_user('admin').patch_blacklist( - old_model.id, patch_model) - self.assertEqual(200, resp.status) - - resp, model = BlacklistClient.as_user('admin').get_blacklist( - new_model.id) - self.assertEqual(200, resp.status) - self.assertEqual(old_model.id, new_model.id) - self.assertEqual(model.pattern, new_model.pattern) - - def test_delete_blacklist(self): - fixture = self.useFixture(BlacklistFixture()) - resp, model = BlacklistClient.as_user('admin').delete_blacklist( - fixture.created_blacklist.id) - self.assertEqual(204, resp.status) - def test_get_blacklist_404(self): client = BlacklistClient.as_user('admin') self._assert_exception( diff --git a/functionaltests/api/v2/test_pool.py b/functionaltests/api/v2/test_pool.py index 04e129a4a..d146092ef 100644 --- a/functionaltests/api/v2/test_pool.py +++ b/functionaltests/api/v2/test_pool.py @@ -21,43 +21,10 @@ from tempest_lib import exceptions from functionaltests.common import datagen from functionaltests.api.v2.base import DesignateV2Test from functionaltests.api.v2.clients.pool_client import PoolClient -from functionaltests.api.v2.fixtures import PoolFixture class PoolTest(DesignateV2Test): - def test_list_pools(self): - self.useFixture(PoolFixture()) - resp, model = PoolClient.as_user('admin').list_pools() - self.assertEqual(200, resp.status) - self.assertGreater(len(model.pools), 0) - - def test_create_pool(self): - fixture = self.useFixture(PoolFixture()) - post_model = fixture.post_model - created_pool = fixture.created_pool - - self.assertEqual(post_model.name, created_pool.name) - self.assertEqual(post_model.ns_records, created_pool.ns_records) - - def test_update_pool(self): - old_model = self.useFixture(PoolFixture()).created_pool - - patch_model = datagen.random_pool_data() - resp, new_model = PoolClient.as_user('admin').patch_pool( - old_model.id, patch_model) - self.assertEqual(202, resp.status) - - resp, model = PoolClient.as_user('admin').get_pool(new_model.id) - self.assertEqual(200, resp.status) - self.assertEqual(old_model.id, new_model.id) - self.assertEqual(patch_model.name, new_model.name) - - def test_delete_pool(self): - pool = self.useFixture(PoolFixture()).created_pool - resp, model = PoolClient.as_user('admin').delete_pool(pool.id) - self.assertEqual(204, resp.status) - def test_get_pool_404(self): client = PoolClient.as_user('admin') self._assert_exception( diff --git a/functionaltests/api/v2/test_tld.py b/functionaltests/api/v2/test_tld.py index b94bfdf67..f33e9e850 100644 --- a/functionaltests/api/v2/test_tld.py +++ b/functionaltests/api/v2/test_tld.py @@ -32,42 +32,6 @@ class TLDTest(DesignateV2Test): self.client = TLDClient.as_user('admin') self.fixture = self.useFixture(TLDFixture()) - def test_list_tlds(self): - resp, model = self.client.list_tlds() - self.assertEqual(resp.status, 200) - self.assertGreater(len(model.tlds), 0) - - def test_create_tld(self): - self.assertEqual(self.fixture.post_resp.status, 201) - resp, tld = self.client.get_tld(self.fixture.created_tld.id) - self.assertEqual(resp.status, 200) - - self.assertEqual(tld.name, self.fixture.created_tld.name) - self.assertEqual(tld.id, self.fixture.created_tld.id) - self.assertEqual(tld.created_at, self.fixture.created_tld.created_at) - self.assertEqual(tld.updated_at, self.fixture.created_tld.updated_at) - self.assertEqual(tld.description, self.fixture.created_tld.description) - - def test_update_tld(self): - old_model = self.fixture.created_tld - - patch_model = datagen.random_tld_data() - resp, new_model = self.client.patch_tld(old_model.id, patch_model) - self.assertEqual(resp.status, 200) - self.assertEqual(new_model.id, old_model.id) - self.assertEqual(new_model.name, patch_model.name) - - resp, new_model = self.client.get_tld(new_model.id) - self.assertEqual(resp.status, 200) - self.assertEqual(new_model.id, old_model.id) - self.assertEqual(new_model.name, patch_model.name) - - def test_delete_tld(self): - resp, model = self.client.delete_tld(self.fixture.created_tld.id) - self.assertEqual(resp.status, 204) - self.assertRaises(exceptions.NotFound, self.client.get_tld, - self.fixture.created_tld.id) - def test_get_tld_404(self): self._assert_exception( exceptions.NotFound, 'tld_not_found', 404, self.client.get_tld,