Remove migrated "unauthed" functional tests
These tests are moved to the designate-tempest-plugin in https://review.openstack.org/#/c/329187/ Change-Id: I399d4018f78d59c61c5bd5cc3be57bf678a3a75b Depends-On: I9752685afccee5dcd009f76b5242fd6f12f0fc37
This commit is contained in:
parent
2a1e34762b
commit
ad39f0b038
|
@ -1,68 +0,0 @@
|
||||||
"""
|
|
||||||
Copyright 2015 Rackspace
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
"""
|
|
||||||
|
|
||||||
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 setUp(self):
|
|
||||||
super(BlacklistTest, self).setUp()
|
|
||||||
self.increase_quotas(user='admin')
|
|
||||||
self.client = BlacklistClient.as_user('admin', with_token=False)
|
|
||||||
self.fixture = self.useFixture(BlacklistFixture(user='admin'))
|
|
||||||
|
|
||||||
def test_create_blacklist(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.post_blacklist,
|
|
||||||
datagen.random_blacklist_data())
|
|
||||||
|
|
||||||
def test_get_fake_blacklist(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.get_blacklist, 'junk')
|
|
||||||
|
|
||||||
def test_get_existing_blacklist(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.get_blacklist,
|
|
||||||
self.fixture.created_blacklist.id)
|
|
||||||
|
|
||||||
def test_list_blacklists(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.list_blacklists)
|
|
||||||
|
|
||||||
def test_update_fake_blacklist(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.patch_blacklist, 'junk',
|
|
||||||
datagen.random_blacklist_data())
|
|
||||||
|
|
||||||
def test_update_existing_blacklist(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.patch_blacklist,
|
|
||||||
self.fixture.created_blacklist.id, datagen.random_blacklist_data())
|
|
||||||
|
|
||||||
def test_delete_fake_blacklist(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.delete_blacklist, 'junk')
|
|
||||||
|
|
||||||
def test_delete_existing_blacklist(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.delete_blacklist,
|
|
||||||
self.fixture.created_blacklist.id)
|
|
|
@ -1,68 +0,0 @@
|
||||||
"""
|
|
||||||
Copyright 2015 Rackspace
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
"""
|
|
||||||
|
|
||||||
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 setUp(self):
|
|
||||||
super(PoolTest, self).setUp()
|
|
||||||
self.increase_quotas(user='admin')
|
|
||||||
self.client = PoolClient.as_user('admin', with_token=False)
|
|
||||||
self.fixture = self.useFixture(PoolFixture(user='admin'))
|
|
||||||
|
|
||||||
def test_create_pool(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.post_pool,
|
|
||||||
datagen.random_pool_data())
|
|
||||||
|
|
||||||
def test_get_fake_pool(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.get_pool, 'junk')
|
|
||||||
|
|
||||||
def test_get_existing_pool(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.get_pool,
|
|
||||||
self.fixture.created_pool.id)
|
|
||||||
|
|
||||||
def test_list_pools(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.list_pools)
|
|
||||||
|
|
||||||
def test_update_fake_pool(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.patch_pool, 'junk',
|
|
||||||
datagen.random_pool_data())
|
|
||||||
|
|
||||||
def test_update_existing_pool(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.patch_pool,
|
|
||||||
self.fixture.created_pool.id, datagen.random_pool_data())
|
|
||||||
|
|
||||||
def test_delete_fake_pool(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.delete_pool, 'junk')
|
|
||||||
|
|
||||||
def test_delete_existing_pool(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.delete_pool,
|
|
||||||
self.fixture.created_pool.id)
|
|
|
@ -1,91 +0,0 @@
|
||||||
"""
|
|
||||||
Copyright 2015 Rackspace
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
"""
|
|
||||||
|
|
||||||
from tempest_lib import exceptions
|
|
||||||
|
|
||||||
from functionaltests.common import datagen
|
|
||||||
from functionaltests.common import utils
|
|
||||||
from functionaltests.api.v2.base import DesignateV2Test
|
|
||||||
from functionaltests.api.v2.clients.recordset_client import RecordsetClient
|
|
||||||
from functionaltests.api.v2.clients.zone_client import ZoneClient
|
|
||||||
|
|
||||||
|
|
||||||
@utils.parameterized_class
|
|
||||||
class RecordsetTest(DesignateV2Test):
|
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
super(RecordsetTest, self).setUp()
|
|
||||||
self.increase_quotas(user='default')
|
|
||||||
self.ensure_tld_exists('com')
|
|
||||||
resp, self.zone = ZoneClient.as_user('default').post_zone(
|
|
||||||
datagen.random_zone_data())
|
|
||||||
ZoneClient.as_user('default').wait_for_zone(self.zone.id)
|
|
||||||
self.client = RecordsetClient.as_user('default', with_token=False)
|
|
||||||
|
|
||||||
def tearDown(self):
|
|
||||||
super(RecordsetTest, self).tearDown()
|
|
||||||
resp, self.zone = ZoneClient.as_user('default').delete_zone(
|
|
||||||
self.zone.id)
|
|
||||||
|
|
||||||
def test_create_a_recordset(self):
|
|
||||||
post_model = datagen.random_a_recordset(self.zone.name)
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.post_recordset, self.zone.id,
|
|
||||||
post_model)
|
|
||||||
|
|
||||||
def test_get_fake_recordset(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.get_recordset, self.zone.id,
|
|
||||||
'junk')
|
|
||||||
|
|
||||||
def test_get_existing_recordset(self):
|
|
||||||
post_model = datagen.random_a_recordset(self.zone.name)
|
|
||||||
resp, resp_model = RecordsetClient.as_user('default') \
|
|
||||||
.post_recordset(self.zone.id, post_model)
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.get_recordset, self.zone.id,
|
|
||||||
resp_model.id)
|
|
||||||
|
|
||||||
def test_list_recordsets(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.list_recordsets, self.zone.id)
|
|
||||||
|
|
||||||
def test_update_fake_recordset(self):
|
|
||||||
put_model = datagen.random_a_recordset(self.zone.name)
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.put_recordset, self.zone.id,
|
|
||||||
'junk', put_model)
|
|
||||||
|
|
||||||
def test_update_existing_recordset(self):
|
|
||||||
post_model = datagen.random_a_recordset(self.zone.name)
|
|
||||||
resp, resp_model = RecordsetClient.as_user('default') \
|
|
||||||
.post_recordset(self.zone.id, post_model)
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.put_recordset, self.zone.id,
|
|
||||||
resp_model.id, post_model)
|
|
||||||
|
|
||||||
def test_delete_fake_recordset(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.delete_recordset,
|
|
||||||
self.zone.id, 'junk')
|
|
||||||
|
|
||||||
def test_delete_existing_recordset(self):
|
|
||||||
post_model = datagen.random_a_recordset(self.zone.name)
|
|
||||||
resp, resp_model = RecordsetClient.as_user('default') \
|
|
||||||
.post_recordset(self.zone.id, post_model)
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.delete_recordset,
|
|
||||||
self.zone.id, resp_model.id)
|
|
|
@ -1,68 +0,0 @@
|
||||||
"""
|
|
||||||
Copyright 2015 Rackspace
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
"""
|
|
||||||
|
|
||||||
from tempest_lib import exceptions
|
|
||||||
|
|
||||||
from functionaltests.common import datagen
|
|
||||||
from functionaltests.api.v2.base import DesignateV2Test
|
|
||||||
from functionaltests.api.v2.clients.zone_client import ZoneClient
|
|
||||||
from functionaltests.api.v2.fixtures import ZoneFixture
|
|
||||||
|
|
||||||
|
|
||||||
class ZoneTest(DesignateV2Test):
|
|
||||||
|
|
||||||
def setUp(self):
|
|
||||||
super(ZoneTest, self).setUp()
|
|
||||||
self.increase_quotas(user='default')
|
|
||||||
self.client = ZoneClient.as_user('default', with_token=False)
|
|
||||||
self.fixture = self.useFixture(ZoneFixture(user='default'))
|
|
||||||
|
|
||||||
def test_create_zone(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.post_zone,
|
|
||||||
datagen.random_zone_data())
|
|
||||||
|
|
||||||
def test_get_fake_zone(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.get_zone, 'junk')
|
|
||||||
|
|
||||||
def test_get_existing_zone(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.get_zone,
|
|
||||||
self.fixture.created_zone.id)
|
|
||||||
|
|
||||||
def test_list_zones(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.list_zones)
|
|
||||||
|
|
||||||
def test_update_fake_zone(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.patch_zone, 'junk',
|
|
||||||
datagen.random_zone_data())
|
|
||||||
|
|
||||||
def test_update_existing_zone(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.patch_zone,
|
|
||||||
self.fixture.created_zone.id, datagen.random_zone_data())
|
|
||||||
|
|
||||||
def test_delete_fake_zone(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.delete_zone, 'junk')
|
|
||||||
|
|
||||||
def test_delete_existing_zone(self):
|
|
||||||
self.assertRaises(
|
|
||||||
exceptions.Unauthorized, self.client.delete_zone,
|
|
||||||
self.fixture.created_zone.id)
|
|
Loading…
Reference in New Issue