Merge "Remove more tests migrated to tempest plugin"

This commit is contained in:
Jenkins 2016-05-12 19:22:49 +00:00 committed by Gerrit Code Review
commit f48a1492c4
3 changed files with 0 additions and 101 deletions

View File

@ -21,42 +21,10 @@ from tempest_lib import exceptions
from functionaltests.common import datagen from functionaltests.common import datagen
from functionaltests.api.v2.base import DesignateV2Test from functionaltests.api.v2.base import DesignateV2Test
from functionaltests.api.v2.clients.blacklist_client import BlacklistClient from functionaltests.api.v2.clients.blacklist_client import BlacklistClient
from functionaltests.api.v2.fixtures import BlacklistFixture
class BlacklistTest(DesignateV2Test): 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): def test_get_blacklist_404(self):
client = BlacklistClient.as_user('admin') client = BlacklistClient.as_user('admin')
self._assert_exception( self._assert_exception(

View File

@ -21,43 +21,10 @@ from tempest_lib import exceptions
from functionaltests.common import datagen from functionaltests.common import datagen
from functionaltests.api.v2.base import DesignateV2Test from functionaltests.api.v2.base import DesignateV2Test
from functionaltests.api.v2.clients.pool_client import PoolClient from functionaltests.api.v2.clients.pool_client import PoolClient
from functionaltests.api.v2.fixtures import PoolFixture
class PoolTest(DesignateV2Test): 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): def test_get_pool_404(self):
client = PoolClient.as_user('admin') client = PoolClient.as_user('admin')
self._assert_exception( self._assert_exception(

View File

@ -32,42 +32,6 @@ class TLDTest(DesignateV2Test):
self.client = TLDClient.as_user('admin') self.client = TLDClient.as_user('admin')
self.fixture = self.useFixture(TLDFixture()) 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): def test_get_tld_404(self):
self._assert_exception( self._assert_exception(
exceptions.NotFound, 'tld_not_found', 404, self.client.get_tld, exceptions.NotFound, 'tld_not_found', 404, self.client.get_tld,