Remove tempest.test usage from manila tests
Manila tempest tests should be independent from tempest code as much as possible. The decorator test.attr is widely used in all tests to set testcase attrs. This decorator doesn't really do anyting else than calling testtools.testcase.attr. Change-Id: If10beb9ae7562524f602a6fd7254aa95ef24d70e Partially-Implements: bp tempest-no-deps
This commit is contained in:
parent
f25fb7132e
commit
a0163f4c20
@ -14,8 +14,8 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -39,13 +39,13 @@ class AdminActionsTest(base.BaseSharesAdminTest):
|
|||||||
if CONF.share.run_snapshot_tests:
|
if CONF.share.run_snapshot_tests:
|
||||||
cls.sn = cls.create_snapshot_wait_for_active(cls.sh["id"])
|
cls.sn = cls.create_snapshot_wait_for_active(cls.sh["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_reset_share_state(self):
|
def test_reset_share_state(self):
|
||||||
for status in self.states:
|
for status in self.states:
|
||||||
self.shares_v2_client.reset_state(self.sh["id"], status=status)
|
self.shares_v2_client.reset_state(self.sh["id"], status=status)
|
||||||
self.shares_v2_client.wait_for_share_status(self.sh["id"], status)
|
self.shares_v2_client.wait_for_share_status(self.sh["id"], status)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_reset_share_instance_state(self):
|
def test_reset_share_instance_state(self):
|
||||||
id = self.sh_instance["id"]
|
id = self.sh_instance["id"]
|
||||||
for status in self.states:
|
for status in self.states:
|
||||||
@ -53,7 +53,7 @@ class AdminActionsTest(base.BaseSharesAdminTest):
|
|||||||
id, s_type="share_instances", status=status)
|
id, s_type="share_instances", status=status)
|
||||||
self.shares_v2_client.wait_for_share_instance_status(id, status)
|
self.shares_v2_client.wait_for_share_instance_status(id, status)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
def test_reset_snapshot_state_to_error(self):
|
def test_reset_snapshot_state_to_error(self):
|
||||||
@ -63,7 +63,7 @@ class AdminActionsTest(base.BaseSharesAdminTest):
|
|||||||
self.shares_v2_client.wait_for_snapshot_status(
|
self.shares_v2_client.wait_for_snapshot_status(
|
||||||
self.sn["id"], status)
|
self.sn["id"], status)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_force_delete_share(self):
|
def test_force_delete_share(self):
|
||||||
share = self.create_share()
|
share = self.create_share()
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ class AdminActionsTest(base.BaseSharesAdminTest):
|
|||||||
self.shares_v2_client.force_delete(share["id"])
|
self.shares_v2_client.force_delete(share["id"])
|
||||||
self.shares_v2_client.wait_for_resource_deletion(share_id=share["id"])
|
self.shares_v2_client.wait_for_resource_deletion(share_id=share["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_force_delete_share_instance(self):
|
def test_force_delete_share_instance(self):
|
||||||
share = self.create_share(cleanup_in_class=False)
|
share = self.create_share(cleanup_in_class=False)
|
||||||
instances = self.shares_v2_client.get_instances_of_share(share["id"])
|
instances = self.shares_v2_client.get_instances_of_share(share["id"])
|
||||||
@ -101,7 +101,7 @@ class AdminActionsTest(base.BaseSharesAdminTest):
|
|||||||
self.shares_v2_client.wait_for_resource_deletion(
|
self.shares_v2_client.wait_for_resource_deletion(
|
||||||
share_instance_id=instance["id"])
|
share_instance_id=instance["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
def test_force_delete_snapshot(self):
|
def test_force_delete_snapshot(self):
|
||||||
@ -119,7 +119,7 @@ class AdminActionsTest(base.BaseSharesAdminTest):
|
|||||||
self.shares_v2_client.force_delete(sn["id"], s_type="snapshots")
|
self.shares_v2_client.force_delete(sn["id"], s_type="snapshots")
|
||||||
self.shares_v2_client.wait_for_resource_deletion(snapshot_id=sn["id"])
|
self.shares_v2_client.wait_for_resource_deletion(snapshot_id=sn["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@base.skip_if_microversion_lt("2.22")
|
@base.skip_if_microversion_lt("2.22")
|
||||||
def test_reset_share_task_state(self):
|
def test_reset_share_task_state(self):
|
||||||
for task_state in self.task_states:
|
for task_state in self.task_states:
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
import ddt
|
import ddt
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -39,13 +39,13 @@ class AdminActionsNegativeTest(base.BaseSharesMixedTest):
|
|||||||
cls.sn = cls.create_snapshot_wait_for_active(
|
cls.sn = cls.create_snapshot_wait_for_active(
|
||||||
cls.sh["id"], client=cls.admin_client)
|
cls.sh["id"], client=cls.admin_client)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_reset_share_state_to_unacceptable_state(self):
|
def test_reset_share_state_to_unacceptable_state(self):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
self.admin_client.reset_state,
|
self.admin_client.reset_state,
|
||||||
self.sh["id"], status="fake")
|
self.sh["id"], status="fake")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_reset_share_instance_state_to_unacceptable_state(self):
|
def test_reset_share_instance_state_to_unacceptable_state(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.BadRequest,
|
lib_exc.BadRequest,
|
||||||
@ -55,7 +55,7 @@ class AdminActionsNegativeTest(base.BaseSharesMixedTest):
|
|||||||
status="fake"
|
status="fake"
|
||||||
)
|
)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
def test_reset_snapshot_state_to_unacceptable_state(self):
|
def test_reset_snapshot_state_to_unacceptable_state(self):
|
||||||
@ -63,21 +63,21 @@ class AdminActionsNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.admin_client.reset_state,
|
self.admin_client.reset_state,
|
||||||
self.sn["id"], s_type="snapshots", status="fake")
|
self.sn["id"], s_type="snapshots", status="fake")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_try_reset_share_state_with_member(self):
|
def test_try_reset_share_state_with_member(self):
|
||||||
# Even if member from another tenant, it should be unauthorized
|
# Even if member from another tenant, it should be unauthorized
|
||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.member_client.reset_state,
|
self.member_client.reset_state,
|
||||||
self.sh["id"])
|
self.sh["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_try_reset_share_instance_state_with_member(self):
|
def test_try_reset_share_instance_state_with_member(self):
|
||||||
# Even if member from another tenant, it should be unauthorized
|
# Even if member from another tenant, it should be unauthorized
|
||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.member_client.reset_state,
|
self.member_client.reset_state,
|
||||||
self.sh_instance["id"], s_type="share_instances")
|
self.sh_instance["id"], s_type="share_instances")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
def test_try_reset_snapshot_state_with_member(self):
|
def test_try_reset_snapshot_state_with_member(self):
|
||||||
@ -86,21 +86,21 @@ class AdminActionsNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.member_client.reset_state,
|
self.member_client.reset_state,
|
||||||
self.sn["id"], s_type="snapshots")
|
self.sn["id"], s_type="snapshots")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_try_force_delete_share_with_member(self):
|
def test_try_force_delete_share_with_member(self):
|
||||||
# If a non-admin tries to do force_delete, it should be unauthorized
|
# If a non-admin tries to do force_delete, it should be unauthorized
|
||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.member_client.force_delete,
|
self.member_client.force_delete,
|
||||||
self.sh["id"])
|
self.sh["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_try_force_delete_share_instance_with_member(self):
|
def test_try_force_delete_share_instance_with_member(self):
|
||||||
# If a non-admin tries to do force_delete, it should be unauthorized
|
# If a non-admin tries to do force_delete, it should be unauthorized
|
||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.member_client.force_delete,
|
self.member_client.force_delete,
|
||||||
self.sh_instance["id"], s_type="share_instances")
|
self.sh_instance["id"], s_type="share_instances")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
def test_try_force_delete_snapshot_with_member(self):
|
def test_try_force_delete_snapshot_with_member(self):
|
||||||
@ -109,14 +109,14 @@ class AdminActionsNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.member_client.force_delete,
|
self.member_client.force_delete,
|
||||||
self.sn["id"], s_type="snapshots")
|
self.sn["id"], s_type="snapshots")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_try_get_share_instance_with_member(self):
|
def test_try_get_share_instance_with_member(self):
|
||||||
# If a non-admin tries to get instance, it should be unauthorized
|
# If a non-admin tries to get instance, it should be unauthorized
|
||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.member_client.get_share_instance,
|
self.member_client.get_share_instance,
|
||||||
self.sh_instance["id"])
|
self.sh_instance["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_try_get_instances_of_share_with_member(self):
|
def test_try_get_instances_of_share_with_member(self):
|
||||||
# If a non-admin tries to list instances of given share, it should be
|
# If a non-admin tries to list instances of given share, it should be
|
||||||
# unauthorized
|
# unauthorized
|
||||||
@ -124,7 +124,7 @@ class AdminActionsNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.member_client.get_instances_of_share,
|
self.member_client.get_instances_of_share,
|
||||||
self.sh['id'])
|
self.sh['id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@base.skip_if_microversion_lt("2.22")
|
@base.skip_if_microversion_lt("2.22")
|
||||||
def test_reset_task_state_invalid_state(self):
|
def test_reset_task_state_invalid_state(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
@ -141,20 +141,20 @@ class AdminActionsAPIOnlyNegativeTest(base.BaseSharesMixedTest):
|
|||||||
cls.admin_client = cls.admin_shares_v2_client
|
cls.admin_client = cls.admin_shares_v2_client
|
||||||
cls.member_client = cls.shares_v2_client
|
cls.member_client = cls.shares_v2_client
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_list_share_instance_with_member(self):
|
def test_try_list_share_instance_with_member(self):
|
||||||
# If a non-admin tries to list instances, it should be unauthorized
|
# If a non-admin tries to list instances, it should be unauthorized
|
||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.member_client.list_share_instances)
|
self.member_client.list_share_instances)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
@base.skip_if_microversion_lt("2.22")
|
@base.skip_if_microversion_lt("2.22")
|
||||||
def test_reset_task_state_share_not_found(self):
|
def test_reset_task_state_share_not_found(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.NotFound, self.admin_client.reset_task_state,
|
lib_exc.NotFound, self.admin_client.reset_task_state,
|
||||||
'fake_share', 'migration_error')
|
'fake_share', 'migration_error')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
def test_force_delete_nonexistent_snapshot(self):
|
def test_force_delete_nonexistent_snapshot(self):
|
||||||
@ -163,36 +163,36 @@ class AdminActionsAPIOnlyNegativeTest(base.BaseSharesMixedTest):
|
|||||||
"fake",
|
"fake",
|
||||||
s_type="snapshots")
|
s_type="snapshots")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_force_delete_nonexistent_share(self):
|
def test_force_delete_nonexistent_share(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.admin_client.force_delete, "fake")
|
self.admin_client.force_delete, "fake")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_force_delete_nonexistent_share_instance(self):
|
def test_force_delete_nonexistent_share_instance(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.admin_client.force_delete,
|
self.admin_client.force_delete,
|
||||||
"fake",
|
"fake",
|
||||||
s_type="share_instances")
|
s_type="share_instances")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_reset_nonexistent_share_state(self):
|
def test_reset_nonexistent_share_state(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.admin_client.reset_state, "fake")
|
self.admin_client.reset_state, "fake")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_reset_nonexistent_share_instance_state(self):
|
def test_reset_nonexistent_share_instance_state(self):
|
||||||
self.assertRaises(lib_exc.NotFound, self.admin_client.reset_state,
|
self.assertRaises(lib_exc.NotFound, self.admin_client.reset_state,
|
||||||
"fake", s_type="share_instances")
|
"fake", s_type="share_instances")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
def test_reset_nonexistent_snapshot_state(self):
|
def test_reset_nonexistent_snapshot_state(self):
|
||||||
self.assertRaises(lib_exc.NotFound, self.admin_client.reset_state,
|
self.assertRaises(lib_exc.NotFound, self.admin_client.reset_state,
|
||||||
"fake", s_type="snapshots")
|
"fake", s_type="snapshots")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
@ddt.data('migrate_share', 'migration_complete', 'reset_task_state',
|
@ddt.data('migrate_share', 'migration_complete', 'reset_task_state',
|
||||||
'migration_get_progress', 'migration_cancel')
|
'migration_get_progress', 'migration_cancel')
|
||||||
def test_migration_API_invalid_microversion(self, method_name):
|
def test_migration_API_invalid_microversion(self, method_name):
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ class ConsistencyGroupActionsTest(base.BaseSharesAdminTest):
|
|||||||
cls.consistency_group = cls.shares_v2_client.get_consistency_group(
|
cls.consistency_group = cls.shares_v2_client.get_consistency_group(
|
||||||
cls.consistency_group['id'])
|
cls.consistency_group['id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
def test_create_cg_from_cgsnapshot_with_multiple_share_types_v2_4(self):
|
def test_create_cg_from_cgsnapshot_with_multiple_share_types_v2_4(self):
|
||||||
# Create cgsnapshot
|
# Create cgsnapshot
|
||||||
cgsnapshot = self.create_cgsnapshot_wait_for_active(
|
cgsnapshot = self.create_cgsnapshot_wait_for_active(
|
||||||
@ -68,7 +68,7 @@ class ConsistencyGroupActionsTest(base.BaseSharesAdminTest):
|
|||||||
'Expected share types of %s, but got %s.' % (
|
'Expected share types of %s, but got %s.' % (
|
||||||
expected_types, actual_types))
|
expected_types, actual_types))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
def test_create_cg_from_multi_typed_populated_cgsnapshot_v2_4(self):
|
def test_create_cg_from_multi_typed_populated_cgsnapshot_v2_4(self):
|
||||||
share_name = data_utils.rand_name("tempest-share-name")
|
share_name = data_utils.rand_name("tempest-share-name")
|
||||||
share_desc = data_utils.rand_name("tempest-share-description")
|
share_desc = data_utils.rand_name("tempest-share-description")
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ class ConsistencyGroupsTest(base.BaseSharesAdminTest):
|
|||||||
share_type = cls.create_share_type(name, extra_specs=extra_specs)
|
share_type = cls.create_share_type(name, extra_specs=extra_specs)
|
||||||
cls.share_type2 = share_type['share_type']
|
cls.share_type2 = share_type['share_type']
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_create_cg_with_multiple_share_types_v2_4(self):
|
def test_create_cg_with_multiple_share_types_v2_4(self):
|
||||||
# Create a consistency group
|
# Create a consistency group
|
||||||
consistency_group = self.create_consistency_group(
|
consistency_group = self.create_consistency_group(
|
||||||
@ -67,7 +67,7 @@ class ConsistencyGroupsTest(base.BaseSharesAdminTest):
|
|||||||
expected_share_types,
|
expected_share_types,
|
||||||
actual_share_types))
|
actual_share_types))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipIf(
|
@testtools.skipIf(
|
||||||
not CONF.share.multitenancy_enabled, "Only for multitenancy.")
|
not CONF.share.multitenancy_enabled, "Only for multitenancy.")
|
||||||
def test_create_cg_from_cgsnapshot_verify_share_server_information(self):
|
def test_create_cg_from_cgsnapshot_verify_share_server_information(self):
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest.lib import exceptions
|
from tempest.lib import exceptions
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -59,14 +59,14 @@ class ConsistencyGroupsNegativeTest(base.BaseSharesAdminTest):
|
|||||||
name=cls.cgsnap_name,
|
name=cls.cgsnap_name,
|
||||||
description=cls.cgsnap_desc)
|
description=cls.cgsnap_desc)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_delete_share_type_in_use_by_cg(self):
|
def test_delete_share_type_in_use_by_cg(self):
|
||||||
# Attempt delete of share type
|
# Attempt delete of share type
|
||||||
self.assertRaises(exceptions.BadRequest,
|
self.assertRaises(exceptions.BadRequest,
|
||||||
self.shares_client.delete_share_type,
|
self.shares_client.delete_share_type,
|
||||||
self.share_type['id'])
|
self.share_type['id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_create_share_of_unsupported_type_in_cg_v2_4(self):
|
def test_create_share_of_unsupported_type_in_cg_v2_4(self):
|
||||||
# Attempt to create share of default type in the cg
|
# Attempt to create share of default type in the cg
|
||||||
self.assertRaises(exceptions.BadRequest,
|
self.assertRaises(exceptions.BadRequest,
|
||||||
@ -75,7 +75,7 @@ class ConsistencyGroupsNegativeTest(base.BaseSharesAdminTest):
|
|||||||
consistency_group_id=self.consistency_group['id'],
|
consistency_group_id=self.consistency_group['id'],
|
||||||
version='2.4')
|
version='2.4')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_create_share_in_cg_that_is_not_available_v2_4(self):
|
def test_create_share_in_cg_that_is_not_available_v2_4(self):
|
||||||
consistency_group = self.create_consistency_group(
|
consistency_group = self.create_consistency_group(
|
||||||
cleanup_in_class=False, version='2.4')
|
cleanup_in_class=False, version='2.4')
|
||||||
@ -117,7 +117,7 @@ class ConsistencyGroupsNegativeTest(base.BaseSharesAdminTest):
|
|||||||
cleanup_in_class=False,
|
cleanup_in_class=False,
|
||||||
version='2.4')
|
version='2.4')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_create_cgsnapshot_of_cg_that_is_not_available_v2_4(self):
|
def test_create_cgsnapshot_of_cg_that_is_not_available_v2_4(self):
|
||||||
consistency_group = self.create_consistency_group(
|
consistency_group = self.create_consistency_group(
|
||||||
cleanup_in_class=False, version='2.4')
|
cleanup_in_class=False, version='2.4')
|
||||||
@ -156,7 +156,7 @@ class ConsistencyGroupsNegativeTest(base.BaseSharesAdminTest):
|
|||||||
cleanup_in_class=False,
|
cleanup_in_class=False,
|
||||||
version='2.4')
|
version='2.4')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_create_cgsnapshot_of_cg_with_share_in_error_state_v2_4(self):
|
def test_create_cgsnapshot_of_cg_with_share_in_error_state_v2_4(self):
|
||||||
consistency_group = self.create_consistency_group(version='2.4')
|
consistency_group = self.create_consistency_group(version='2.4')
|
||||||
share_name = data_utils.rand_name("tempest-share-name")
|
share_name = data_utils.rand_name("tempest-share-name")
|
||||||
@ -176,7 +176,7 @@ class ConsistencyGroupsNegativeTest(base.BaseSharesAdminTest):
|
|||||||
cleanup_in_class=False,
|
cleanup_in_class=False,
|
||||||
version='2.4')
|
version='2.4')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_delete_cgsnapshot_not_in_available_or_error_v2_4(self):
|
def test_delete_cgsnapshot_not_in_available_or_error_v2_4(self):
|
||||||
cgsnapshot = self.create_cgsnapshot_wait_for_active(
|
cgsnapshot = self.create_cgsnapshot_wait_for_active(
|
||||||
self.consistency_group['id'],
|
self.consistency_group['id'],
|
||||||
@ -209,7 +209,7 @@ class ConsistencyGroupsNegativeTest(base.BaseSharesAdminTest):
|
|||||||
cgsnapshot['id'],
|
cgsnapshot['id'],
|
||||||
version='2.4')
|
version='2.4')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_delete_cg_not_in_available_or_error_v2_4(self):
|
def test_delete_cg_not_in_available_or_error_v2_4(self):
|
||||||
consistency_group = self.create_consistency_group(
|
consistency_group = self.create_consistency_group(
|
||||||
cleanup_in_class=False, version='2.4')
|
cleanup_in_class=False, version='2.4')
|
||||||
@ -236,7 +236,7 @@ class ConsistencyGroupsNegativeTest(base.BaseSharesAdminTest):
|
|||||||
consistency_group['id'],
|
consistency_group['id'],
|
||||||
version='2.4')
|
version='2.4')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_create_cg_with_conflicting_share_types_v2_4(self):
|
def test_create_cg_with_conflicting_share_types_v2_4(self):
|
||||||
# Create conflicting share types
|
# Create conflicting share types
|
||||||
name = data_utils.rand_name("tempest-manila")
|
name = data_utils.rand_name("tempest-manila")
|
||||||
@ -256,7 +256,7 @@ class ConsistencyGroupsNegativeTest(base.BaseSharesAdminTest):
|
|||||||
cleanup_in_class=False,
|
cleanup_in_class=False,
|
||||||
version='2.4')
|
version='2.4')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_create_cg_with_multi_tenant_share_type_and_no_share_network_v2_4(
|
def test_create_cg_with_multi_tenant_share_type_and_no_share_network_v2_4(
|
||||||
self):
|
self):
|
||||||
# Create multi tenant share type
|
# Create multi tenant share type
|
||||||
@ -280,7 +280,7 @@ class ConsistencyGroupsNegativeTest(base.BaseSharesAdminTest):
|
|||||||
|
|
||||||
self.assertRaises(exceptions.BadRequest, create_cg)
|
self.assertRaises(exceptions.BadRequest, create_cg)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_update_cg_share_types(self):
|
def test_update_cg_share_types(self):
|
||||||
consistency_group = self.create_consistency_group(
|
consistency_group = self.create_consistency_group(
|
||||||
cleanup_in_class=False, version='2.4')
|
cleanup_in_class=False, version='2.4')
|
||||||
|
@ -18,7 +18,7 @@ from oslo_utils import timeutils
|
|||||||
from oslo_utils import uuidutils
|
from oslo_utils import uuidutils
|
||||||
import six
|
import six
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
from manila_tempest_tests import utils
|
from manila_tempest_tests import utils
|
||||||
@ -100,7 +100,7 @@ class ExportLocationsTest(base.BaseSharesMixedTest):
|
|||||||
# it making assertion that it has proper date value.
|
# it making assertion that it has proper date value.
|
||||||
timeutils.parse_strtime(time)
|
timeutils.parse_strtime(time)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@utils.skip_if_microversion_not_supported('2.13')
|
@utils.skip_if_microversion_not_supported('2.13')
|
||||||
def test_list_share_export_locations(self):
|
def test_list_share_export_locations(self):
|
||||||
export_locations = self.admin_client.list_share_export_locations(
|
export_locations = self.admin_client.list_share_export_locations(
|
||||||
@ -109,7 +109,7 @@ class ExportLocationsTest(base.BaseSharesMixedTest):
|
|||||||
self._verify_export_location_structure(export_locations,
|
self._verify_export_location_structure(export_locations,
|
||||||
version='2.13')
|
version='2.13')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@utils.skip_if_microversion_not_supported('2.14')
|
@utils.skip_if_microversion_not_supported('2.14')
|
||||||
def test_list_share_export_locations_with_preferred_flag(self):
|
def test_list_share_export_locations_with_preferred_flag(self):
|
||||||
export_locations = self.admin_client.list_share_export_locations(
|
export_locations = self.admin_client.list_share_export_locations(
|
||||||
@ -118,7 +118,7 @@ class ExportLocationsTest(base.BaseSharesMixedTest):
|
|||||||
self._verify_export_location_structure(export_locations,
|
self._verify_export_location_structure(export_locations,
|
||||||
version='2.14')
|
version='2.14')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_get_share_export_location(self):
|
def test_get_share_export_location(self):
|
||||||
export_locations = self.admin_client.list_share_export_locations(
|
export_locations = self.admin_client.list_share_export_locations(
|
||||||
self.share['id'])
|
self.share['id'])
|
||||||
@ -128,14 +128,14 @@ class ExportLocationsTest(base.BaseSharesMixedTest):
|
|||||||
self.share['id'], export_location['id'])
|
self.share['id'], export_location['id'])
|
||||||
self._verify_export_location_structure(el, format='detail')
|
self._verify_export_location_structure(el, format='detail')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_share_export_locations_by_member(self):
|
def test_list_share_export_locations_by_member(self):
|
||||||
export_locations = self.member_client.list_share_export_locations(
|
export_locations = self.member_client.list_share_export_locations(
|
||||||
self.share['id'])
|
self.share['id'])
|
||||||
|
|
||||||
self._verify_export_location_structure(export_locations, role='member')
|
self._verify_export_location_structure(export_locations, role='member')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_get_share_export_location_by_member(self):
|
def test_get_share_export_location_by_member(self):
|
||||||
export_locations = self.admin_client.list_share_export_locations(
|
export_locations = self.admin_client.list_share_export_locations(
|
||||||
self.share['id'])
|
self.share['id'])
|
||||||
@ -148,7 +148,7 @@ class ExportLocationsTest(base.BaseSharesMixedTest):
|
|||||||
self._verify_export_location_structure(el, role='member',
|
self._verify_export_location_structure(el, role='member',
|
||||||
format='detail')
|
format='detail')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@utils.skip_if_microversion_not_supported('2.13')
|
@utils.skip_if_microversion_not_supported('2.13')
|
||||||
def test_list_share_instance_export_locations(self):
|
def test_list_share_instance_export_locations(self):
|
||||||
for share_instance in self.share_instances:
|
for share_instance in self.share_instances:
|
||||||
@ -158,7 +158,7 @@ class ExportLocationsTest(base.BaseSharesMixedTest):
|
|||||||
self._verify_export_location_structure(export_locations,
|
self._verify_export_location_structure(export_locations,
|
||||||
version='2.13')
|
version='2.13')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@utils.skip_if_microversion_not_supported('2.14')
|
@utils.skip_if_microversion_not_supported('2.14')
|
||||||
def test_list_share_instance_export_locations_with_preferred_flag(self):
|
def test_list_share_instance_export_locations_with_preferred_flag(self):
|
||||||
for share_instance in self.share_instances:
|
for share_instance in self.share_instances:
|
||||||
@ -168,7 +168,7 @@ class ExportLocationsTest(base.BaseSharesMixedTest):
|
|||||||
self._verify_export_location_structure(export_locations,
|
self._verify_export_location_structure(export_locations,
|
||||||
version='2.14')
|
version='2.14')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_get_share_instance_export_location(self):
|
def test_get_share_instance_export_location(self):
|
||||||
for share_instance in self.share_instances:
|
for share_instance in self.share_instances:
|
||||||
export_locations = (
|
export_locations = (
|
||||||
@ -179,7 +179,7 @@ class ExportLocationsTest(base.BaseSharesMixedTest):
|
|||||||
share_instance['id'], el['id'])
|
share_instance['id'], el['id'])
|
||||||
self._verify_export_location_structure(el, format='detail')
|
self._verify_export_location_structure(el, format='detail')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_share_contains_all_export_locations_of_all_share_instances(self):
|
def test_share_contains_all_export_locations_of_all_share_instances(self):
|
||||||
share_export_locations = self.admin_client.list_share_export_locations(
|
share_export_locations = self.admin_client.list_share_export_locations(
|
||||||
self.share['id'])
|
self.share['id'])
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ class ExportLocationsNegativeTest(base.BaseSharesMixedTest):
|
|||||||
cls.share_instances = cls.admin_client.get_instances_of_share(
|
cls.share_instances = cls.admin_client.get_instances_of_share(
|
||||||
cls.share['id'])
|
cls.share['id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_get_inexistent_share_export_location(self):
|
def test_get_inexistent_share_export_location(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.NotFound,
|
lib_exc.NotFound,
|
||||||
@ -44,7 +44,7 @@ class ExportLocationsNegativeTest(base.BaseSharesMixedTest):
|
|||||||
"fake-inexistent-share-instance-id",
|
"fake-inexistent-share-instance-id",
|
||||||
)
|
)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_get_inexistent_share_instance_export_location(self):
|
def test_get_inexistent_share_instance_export_location(self):
|
||||||
for share_instance in self.share_instances:
|
for share_instance in self.share_instances:
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
@ -54,7 +54,7 @@ class ExportLocationsNegativeTest(base.BaseSharesMixedTest):
|
|||||||
"fake-inexistent-share-instance-id",
|
"fake-inexistent-share-instance-id",
|
||||||
)
|
)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_share_instance_export_locations_by_member(self):
|
def test_list_share_instance_export_locations_by_member(self):
|
||||||
for share_instance in self.share_instances:
|
for share_instance in self.share_instances:
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
@ -63,7 +63,7 @@ class ExportLocationsNegativeTest(base.BaseSharesMixedTest):
|
|||||||
"fake-inexistent-share-instance-id",
|
"fake-inexistent-share-instance-id",
|
||||||
)
|
)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_get_share_instance_export_location_by_member(self):
|
def test_get_share_instance_export_location_by_member(self):
|
||||||
for share_instance in self.share_instances:
|
for share_instance in self.share_instances:
|
||||||
export_locations = (
|
export_locations = (
|
||||||
@ -80,7 +80,7 @@ class ExportLocationsNegativeTest(base.BaseSharesMixedTest):
|
|||||||
@base.skip_if_microversion_not_supported("2.9")
|
@base.skip_if_microversion_not_supported("2.9")
|
||||||
class ExportLocationsAPIOnlyNegativeTest(base.BaseSharesAdminTest):
|
class ExportLocationsAPIOnlyNegativeTest(base.BaseSharesAdminTest):
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_get_export_locations_by_nonexistent_share(self):
|
def test_get_export_locations_by_nonexistent_share(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.NotFound,
|
lib_exc.NotFound,
|
||||||
@ -88,7 +88,7 @@ class ExportLocationsAPIOnlyNegativeTest(base.BaseSharesAdminTest):
|
|||||||
"fake-inexistent-share-id",
|
"fake-inexistent-share-id",
|
||||||
)
|
)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_get_export_locations_by_nonexistent_share_instance(self):
|
def test_get_export_locations_by_nonexistent_share_instance(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.NotFound,
|
lib_exc.NotFound,
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
import ddt
|
import ddt
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.common import constants
|
from manila_tempest_tests.common import constants
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
@ -74,7 +74,7 @@ class MigrationNFSTest(base.BaseSharesAdminTest):
|
|||||||
extra_specs=utils.get_configured_extra_specs(
|
extra_specs=utils.get_configured_extra_specs(
|
||||||
variation='opposite_driver_modes'))
|
variation='opposite_driver_modes'))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
@base.skip_if_microversion_lt("2.22")
|
@base.skip_if_microversion_lt("2.22")
|
||||||
@ddt.data(True, False)
|
@ddt.data(True, False)
|
||||||
def test_migration_cancel(self, force_host_assisted):
|
def test_migration_cancel(self, force_host_assisted):
|
||||||
@ -111,7 +111,7 @@ class MigrationNFSTest(base.BaseSharesAdminTest):
|
|||||||
dest_pool, share, constants.TASK_STATE_MIGRATION_CANCELLED,
|
dest_pool, share, constants.TASK_STATE_MIGRATION_CANCELLED,
|
||||||
complete=False)
|
complete=False)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
@base.skip_if_microversion_lt("2.22")
|
@base.skip_if_microversion_lt("2.22")
|
||||||
@ddt.data(True, False)
|
@ddt.data(True, False)
|
||||||
def test_migration_opposite_driver_modes(self, force_host_assisted):
|
def test_migration_opposite_driver_modes(self, force_host_assisted):
|
||||||
@ -171,7 +171,7 @@ class MigrationNFSTest(base.BaseSharesAdminTest):
|
|||||||
complete=True, share_network_id=new_share_network_id,
|
complete=True, share_network_id=new_share_network_id,
|
||||||
share_type_id=new_share_type_id)
|
share_type_id=new_share_type_id)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
@base.skip_if_microversion_lt("2.22")
|
@base.skip_if_microversion_lt("2.22")
|
||||||
@ddt.data(True, False)
|
@ddt.data(True, False)
|
||||||
def test_migration_2phase(self, force_host_assisted):
|
def test_migration_2phase(self, force_host_assisted):
|
||||||
|
@ -18,8 +18,8 @@ import ddt
|
|||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.common import constants
|
from manila_tempest_tests.common import constants
|
||||||
from manila_tempest_tests import share_exceptions
|
from manila_tempest_tests import share_exceptions
|
||||||
@ -75,14 +75,14 @@ class MigrationTest(base.BaseSharesAdminTest):
|
|||||||
cleanup_in_class=True,
|
cleanup_in_class=True,
|
||||||
extra_specs=utils.get_configured_extra_specs(variation='invalid'))
|
extra_specs=utils.get_configured_extra_specs(variation='invalid'))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@base.skip_if_microversion_lt("2.22")
|
@base.skip_if_microversion_lt("2.22")
|
||||||
def test_migration_cancel_invalid(self):
|
def test_migration_cancel_invalid(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.BadRequest, self.shares_v2_client.migration_cancel,
|
lib_exc.BadRequest, self.shares_v2_client.migration_cancel,
|
||||||
self.share['id'])
|
self.share['id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@base.skip_if_microversion_lt("2.22")
|
@base.skip_if_microversion_lt("2.22")
|
||||||
def test_migration_get_progress_None(self):
|
def test_migration_get_progress_None(self):
|
||||||
self.shares_v2_client.reset_task_state(self.share["id"], None)
|
self.shares_v2_client.reset_task_state(self.share["id"], None)
|
||||||
@ -92,35 +92,35 @@ class MigrationTest(base.BaseSharesAdminTest):
|
|||||||
lib_exc.BadRequest, self.shares_v2_client.migration_get_progress,
|
lib_exc.BadRequest, self.shares_v2_client.migration_get_progress,
|
||||||
self.share['id'])
|
self.share['id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@base.skip_if_microversion_lt("2.22")
|
@base.skip_if_microversion_lt("2.22")
|
||||||
def test_migration_complete_invalid(self):
|
def test_migration_complete_invalid(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.BadRequest, self.shares_v2_client.migration_complete,
|
lib_exc.BadRequest, self.shares_v2_client.migration_complete,
|
||||||
self.share['id'])
|
self.share['id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@base.skip_if_microversion_lt("2.22")
|
@base.skip_if_microversion_lt("2.22")
|
||||||
def test_migration_cancel_not_found(self):
|
def test_migration_cancel_not_found(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.NotFound, self.shares_v2_client.migration_cancel,
|
lib_exc.NotFound, self.shares_v2_client.migration_cancel,
|
||||||
'invalid_share_id')
|
'invalid_share_id')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@base.skip_if_microversion_lt("2.22")
|
@base.skip_if_microversion_lt("2.22")
|
||||||
def test_migration_get_progress_not_found(self):
|
def test_migration_get_progress_not_found(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.NotFound, self.shares_v2_client.migration_get_progress,
|
lib_exc.NotFound, self.shares_v2_client.migration_get_progress,
|
||||||
'invalid_share_id')
|
'invalid_share_id')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@base.skip_if_microversion_lt("2.22")
|
@base.skip_if_microversion_lt("2.22")
|
||||||
def test_migration_complete_not_found(self):
|
def test_migration_complete_not_found(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.NotFound, self.shares_v2_client.migration_complete,
|
lib_exc.NotFound, self.shares_v2_client.migration_complete,
|
||||||
'invalid_share_id')
|
'invalid_share_id')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@base.skip_if_microversion_lt("2.22")
|
@base.skip_if_microversion_lt("2.22")
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
@ -132,21 +132,21 @@ class MigrationTest(base.BaseSharesAdminTest):
|
|||||||
self.shares_client.delete_snapshot(snap['id'])
|
self.shares_client.delete_snapshot(snap['id'])
|
||||||
self.shares_client.wait_for_resource_deletion(snapshot_id=snap["id"])
|
self.shares_client.wait_for_resource_deletion(snapshot_id=snap["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@base.skip_if_microversion_lt("2.22")
|
@base.skip_if_microversion_lt("2.22")
|
||||||
def test_migrate_share_same_host(self):
|
def test_migrate_share_same_host(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.BadRequest, self.shares_v2_client.migrate_share,
|
lib_exc.BadRequest, self.shares_v2_client.migrate_share,
|
||||||
self.share['id'], self.share['host'])
|
self.share['id'], self.share['host'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@base.skip_if_microversion_lt("2.22")
|
@base.skip_if_microversion_lt("2.22")
|
||||||
def test_migrate_share_host_invalid(self):
|
def test_migrate_share_host_invalid(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.NotFound, self.shares_v2_client.migrate_share,
|
lib_exc.NotFound, self.shares_v2_client.migrate_share,
|
||||||
self.share['id'], 'invalid_host')
|
self.share['id'], 'invalid_host')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@base.skip_if_microversion_lt("2.22")
|
@base.skip_if_microversion_lt("2.22")
|
||||||
def test_migrate_share_host_assisted_not_allowed(self):
|
def test_migrate_share_host_assisted_not_allowed(self):
|
||||||
self.shares_v2_client.migrate_share(
|
self.shares_v2_client.migrate_share(
|
||||||
@ -157,7 +157,7 @@ class MigrationTest(base.BaseSharesAdminTest):
|
|||||||
self.share['id'], self.dest_pool,
|
self.share['id'], self.dest_pool,
|
||||||
constants.TASK_STATE_MIGRATION_ERROR)
|
constants.TASK_STATE_MIGRATION_ERROR)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@base.skip_if_microversion_lt("2.22")
|
@base.skip_if_microversion_lt("2.22")
|
||||||
def test_migrate_share_change_type_no_valid_host(self):
|
def test_migrate_share_change_type_no_valid_host(self):
|
||||||
if not CONF.share.multitenancy_enabled:
|
if not CONF.share.multitenancy_enabled:
|
||||||
@ -175,14 +175,14 @@ class MigrationTest(base.BaseSharesAdminTest):
|
|||||||
self.share['id'], self.dest_pool,
|
self.share['id'], self.dest_pool,
|
||||||
constants.TASK_STATE_MIGRATION_ERROR)
|
constants.TASK_STATE_MIGRATION_ERROR)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@base.skip_if_microversion_lt("2.22")
|
@base.skip_if_microversion_lt("2.22")
|
||||||
def test_migrate_share_not_found(self):
|
def test_migrate_share_not_found(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.NotFound, self.shares_v2_client.migrate_share,
|
lib_exc.NotFound, self.shares_v2_client.migrate_share,
|
||||||
'invalid_share_id', self.dest_pool)
|
'invalid_share_id', self.dest_pool)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@base.skip_if_microversion_lt("2.22")
|
@base.skip_if_microversion_lt("2.22")
|
||||||
def test_migrate_share_not_available(self):
|
def test_migrate_share_not_available(self):
|
||||||
self.shares_client.reset_state(self.share['id'],
|
self.shares_client.reset_state(self.share['id'],
|
||||||
@ -197,7 +197,7 @@ class MigrationTest(base.BaseSharesAdminTest):
|
|||||||
self.shares_client.wait_for_share_status(self.share['id'],
|
self.shares_client.wait_for_share_status(self.share['id'],
|
||||||
constants.STATUS_AVAILABLE)
|
constants.STATUS_AVAILABLE)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@base.skip_if_microversion_lt("2.22")
|
@base.skip_if_microversion_lt("2.22")
|
||||||
def test_migrate_share_invalid_share_network(self):
|
def test_migrate_share_invalid_share_network(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
@ -205,7 +205,7 @@ class MigrationTest(base.BaseSharesAdminTest):
|
|||||||
self.share['id'], self.dest_pool,
|
self.share['id'], self.dest_pool,
|
||||||
new_share_network_id='invalid_net_id')
|
new_share_network_id='invalid_net_id')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@base.skip_if_microversion_lt("2.22")
|
@base.skip_if_microversion_lt("2.22")
|
||||||
def test_migrate_share_invalid_share_type(self):
|
def test_migrate_share_invalid_share_type(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
@ -213,7 +213,7 @@ class MigrationTest(base.BaseSharesAdminTest):
|
|||||||
self.share['id'], self.dest_pool,
|
self.share['id'], self.dest_pool,
|
||||||
new_share_type_id='invalid_type_id')
|
new_share_type_id='invalid_type_id')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@base.skip_if_microversion_lt("2.22")
|
@base.skip_if_microversion_lt("2.22")
|
||||||
def test_migrate_share_opposite_type_share_network_invalid(self):
|
def test_migrate_share_opposite_type_share_network_invalid(self):
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -56,14 +56,14 @@ class ShareMultiBackendTest(base.BaseSharesAdminTest):
|
|||||||
# Create shares using precreated share types
|
# Create shares using precreated share types
|
||||||
cls.shares = cls.create_shares(share_data_list)
|
cls.shares = cls.create_shares(share_data_list)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_share_backend_name_reporting(self):
|
def test_share_backend_name_reporting(self):
|
||||||
# Share's 'host' should be like "hostname@backend_name"
|
# Share's 'host' should be like "hostname@backend_name"
|
||||||
for share in self.shares:
|
for share in self.shares:
|
||||||
get = self.shares_client.get_share(share['id'])
|
get = self.shares_client.get_share(share['id'])
|
||||||
self.assertTrue(len(get["host"].split("@")) == 2)
|
self.assertTrue(len(get["host"].split("@")) == 2)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_share_share_type(self):
|
def test_share_share_type(self):
|
||||||
# Share type should be the same as provided with share creation
|
# Share type should be the same as provided with share creation
|
||||||
for i in [0, 1]:
|
for i in [0, 1]:
|
||||||
@ -71,7 +71,7 @@ class ShareMultiBackendTest(base.BaseSharesAdminTest):
|
|||||||
version="2.5")
|
version="2.5")
|
||||||
self.assertEqual(self.sts[i]["name"], get["share_type"])
|
self.assertEqual(self.sts[i]["name"], get["share_type"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_share_share_type_v_2_6(self):
|
def test_share_share_type_v_2_6(self):
|
||||||
# Share type should be the same as provided with share creation
|
# Share type should be the same as provided with share creation
|
||||||
for i in [0, 1]:
|
for i in [0, 1]:
|
||||||
@ -80,7 +80,7 @@ class ShareMultiBackendTest(base.BaseSharesAdminTest):
|
|||||||
self.assertEqual(self.sts[i]["id"], get["share_type"])
|
self.assertEqual(self.sts[i]["id"], get["share_type"])
|
||||||
self.assertEqual(self.sts[i]["name"], get["share_type_name"])
|
self.assertEqual(self.sts[i]["name"], get["share_type_name"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_share_backend_name_distinction(self):
|
def test_share_backend_name_distinction(self):
|
||||||
# Different share backends should have different host records
|
# Different share backends should have different host records
|
||||||
if CONF.share.backend_names[0] == CONF.share.backend_names[1]:
|
if CONF.share.backend_names[0] == CONF.share.backend_names[1]:
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ class SharesAdminQuotasTest(base.BaseSharesAdminTest):
|
|||||||
cls.user_id = cls.shares_v2_client.user_id
|
cls.user_id = cls.shares_v2_client.user_id
|
||||||
cls.tenant_id = cls.shares_v2_client.tenant_id
|
cls.tenant_id = cls.shares_v2_client.tenant_id
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_default_quotas(self):
|
def test_default_quotas(self):
|
||||||
quotas = self.shares_v2_client.default_quotas(self.tenant_id)
|
quotas = self.shares_v2_client.default_quotas(self.tenant_id)
|
||||||
self.assertGreater(int(quotas["gigabytes"]), -2)
|
self.assertGreater(int(quotas["gigabytes"]), -2)
|
||||||
@ -41,7 +41,7 @@ class SharesAdminQuotasTest(base.BaseSharesAdminTest):
|
|||||||
self.assertGreater(int(quotas["snapshots"]), -2)
|
self.assertGreater(int(quotas["snapshots"]), -2)
|
||||||
self.assertGreater(int(quotas["share_networks"]), -2)
|
self.assertGreater(int(quotas["share_networks"]), -2)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_show_quotas(self):
|
def test_show_quotas(self):
|
||||||
quotas = self.shares_v2_client.show_quotas(self.tenant_id)
|
quotas = self.shares_v2_client.show_quotas(self.tenant_id)
|
||||||
self.assertGreater(int(quotas["gigabytes"]), -2)
|
self.assertGreater(int(quotas["gigabytes"]), -2)
|
||||||
@ -50,7 +50,7 @@ class SharesAdminQuotasTest(base.BaseSharesAdminTest):
|
|||||||
self.assertGreater(int(quotas["snapshots"]), -2)
|
self.assertGreater(int(quotas["snapshots"]), -2)
|
||||||
self.assertGreater(int(quotas["share_networks"]), -2)
|
self.assertGreater(int(quotas["share_networks"]), -2)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_show_quotas_for_user(self):
|
def test_show_quotas_for_user(self):
|
||||||
quotas = self.shares_v2_client.show_quotas(
|
quotas = self.shares_v2_client.show_quotas(
|
||||||
self.tenant_id, self.user_id)
|
self.tenant_id, self.user_id)
|
||||||
@ -80,7 +80,7 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
|
|||||||
self.tenant_id = self.client.tenant_id
|
self.tenant_id = self.client.tenant_id
|
||||||
self.user_id = self.client.user_id
|
self.user_id = self.client.user_id
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_update_tenant_quota_shares(self):
|
def test_update_tenant_quota_shares(self):
|
||||||
# get current quotas
|
# get current quotas
|
||||||
quotas = self.client.show_quotas(self.tenant_id)
|
quotas = self.client.show_quotas(self.tenant_id)
|
||||||
@ -90,7 +90,7 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
|
|||||||
updated = self.client.update_quotas(self.tenant_id, shares=new_quota)
|
updated = self.client.update_quotas(self.tenant_id, shares=new_quota)
|
||||||
self.assertEqual(new_quota, int(updated["shares"]))
|
self.assertEqual(new_quota, int(updated["shares"]))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_update_user_quota_shares(self):
|
def test_update_user_quota_shares(self):
|
||||||
# get current quotas
|
# get current quotas
|
||||||
quotas = self.client.show_quotas(self.tenant_id, self.user_id)
|
quotas = self.client.show_quotas(self.tenant_id, self.user_id)
|
||||||
@ -101,7 +101,7 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
|
|||||||
self.tenant_id, self.user_id, shares=new_quota)
|
self.tenant_id, self.user_id, shares=new_quota)
|
||||||
self.assertEqual(new_quota, int(updated["shares"]))
|
self.assertEqual(new_quota, int(updated["shares"]))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_update_tenant_quota_snapshots(self):
|
def test_update_tenant_quota_snapshots(self):
|
||||||
# get current quotas
|
# get current quotas
|
||||||
quotas = self.client.show_quotas(self.tenant_id)
|
quotas = self.client.show_quotas(self.tenant_id)
|
||||||
@ -112,7 +112,7 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
|
|||||||
self.tenant_id, snapshots=new_quota)
|
self.tenant_id, snapshots=new_quota)
|
||||||
self.assertEqual(new_quota, int(updated["snapshots"]))
|
self.assertEqual(new_quota, int(updated["snapshots"]))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_update_user_quota_snapshots(self):
|
def test_update_user_quota_snapshots(self):
|
||||||
# get current quotas
|
# get current quotas
|
||||||
quotas = self.client.show_quotas(self.tenant_id, self.user_id)
|
quotas = self.client.show_quotas(self.tenant_id, self.user_id)
|
||||||
@ -123,7 +123,7 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
|
|||||||
self.tenant_id, self.user_id, snapshots=new_quota)
|
self.tenant_id, self.user_id, snapshots=new_quota)
|
||||||
self.assertEqual(new_quota, int(updated["snapshots"]))
|
self.assertEqual(new_quota, int(updated["snapshots"]))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_update_tenant_quota_gigabytes(self):
|
def test_update_tenant_quota_gigabytes(self):
|
||||||
# get current quotas
|
# get current quotas
|
||||||
custom = self.client.show_quotas(self.tenant_id)
|
custom = self.client.show_quotas(self.tenant_id)
|
||||||
@ -136,7 +136,7 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
|
|||||||
self.tenant_id, gigabytes=gigabytes)
|
self.tenant_id, gigabytes=gigabytes)
|
||||||
self.assertEqual(gigabytes, int(updated["gigabytes"]))
|
self.assertEqual(gigabytes, int(updated["gigabytes"]))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_update_tenant_quota_snapshot_gigabytes(self):
|
def test_update_tenant_quota_snapshot_gigabytes(self):
|
||||||
# get current quotas
|
# get current quotas
|
||||||
custom = self.client.show_quotas(self.tenant_id)
|
custom = self.client.show_quotas(self.tenant_id)
|
||||||
@ -151,7 +151,7 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
|
|||||||
self.assertEqual(snapshot_gigabytes,
|
self.assertEqual(snapshot_gigabytes,
|
||||||
int(updated["snapshot_gigabytes"]))
|
int(updated["snapshot_gigabytes"]))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_update_user_quota_gigabytes(self):
|
def test_update_user_quota_gigabytes(self):
|
||||||
# get current quotas
|
# get current quotas
|
||||||
custom = self.client.show_quotas(self.tenant_id, self.user_id)
|
custom = self.client.show_quotas(self.tenant_id, self.user_id)
|
||||||
@ -164,7 +164,7 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
|
|||||||
self.tenant_id, self.user_id, gigabytes=gigabytes)
|
self.tenant_id, self.user_id, gigabytes=gigabytes)
|
||||||
self.assertEqual(gigabytes, int(updated["gigabytes"]))
|
self.assertEqual(gigabytes, int(updated["gigabytes"]))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_update_user_quota_snapshot_gigabytes(self):
|
def test_update_user_quota_snapshot_gigabytes(self):
|
||||||
# get current quotas
|
# get current quotas
|
||||||
custom = self.client.show_quotas(self.tenant_id, self.user_id)
|
custom = self.client.show_quotas(self.tenant_id, self.user_id)
|
||||||
@ -179,7 +179,7 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
|
|||||||
self.assertEqual(snapshot_gigabytes,
|
self.assertEqual(snapshot_gigabytes,
|
||||||
int(updated["snapshot_gigabytes"]))
|
int(updated["snapshot_gigabytes"]))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_update_tenant_quota_share_networks(self):
|
def test_update_tenant_quota_share_networks(self):
|
||||||
# get current quotas
|
# get current quotas
|
||||||
quotas = self.client.show_quotas(self.tenant_id)
|
quotas = self.client.show_quotas(self.tenant_id)
|
||||||
@ -190,7 +190,7 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
|
|||||||
self.tenant_id, share_networks=new_quota)
|
self.tenant_id, share_networks=new_quota)
|
||||||
self.assertEqual(new_quota, int(updated["share_networks"]))
|
self.assertEqual(new_quota, int(updated["share_networks"]))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_update_user_quota_share_networks(self):
|
def test_update_user_quota_share_networks(self):
|
||||||
# get current quotas
|
# get current quotas
|
||||||
quotas = self.client.show_quotas(
|
quotas = self.client.show_quotas(
|
||||||
@ -203,7 +203,7 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
|
|||||||
share_networks=new_quota)
|
share_networks=new_quota)
|
||||||
self.assertEqual(new_quota, int(updated["share_networks"]))
|
self.assertEqual(new_quota, int(updated["share_networks"]))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_reset_tenant_quotas(self):
|
def test_reset_tenant_quotas(self):
|
||||||
# get default_quotas
|
# get default_quotas
|
||||||
default = self.client.default_quotas(self.tenant_id)
|
default = self.client.default_quotas(self.tenant_id)
|
||||||
@ -244,7 +244,7 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
|
|||||||
self.assertEqual(int(default["share_networks"]),
|
self.assertEqual(int(default["share_networks"]),
|
||||||
int(reseted["share_networks"]))
|
int(reseted["share_networks"]))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_unlimited_quota_for_shares(self):
|
def test_unlimited_quota_for_shares(self):
|
||||||
self.client.update_quotas(self.tenant_id, shares=-1)
|
self.client.update_quotas(self.tenant_id, shares=-1)
|
||||||
|
|
||||||
@ -252,7 +252,7 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
|
|||||||
|
|
||||||
self.assertEqual(-1, quotas.get('shares'))
|
self.assertEqual(-1, quotas.get('shares'))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_unlimited_user_quota_for_shares(self):
|
def test_unlimited_user_quota_for_shares(self):
|
||||||
self.client.update_quotas(
|
self.client.update_quotas(
|
||||||
self.tenant_id, self.user_id, shares=-1)
|
self.tenant_id, self.user_id, shares=-1)
|
||||||
@ -261,7 +261,7 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
|
|||||||
|
|
||||||
self.assertEqual(-1, quotas.get('shares'))
|
self.assertEqual(-1, quotas.get('shares'))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_unlimited_quota_for_snapshots(self):
|
def test_unlimited_quota_for_snapshots(self):
|
||||||
self.client.update_quotas(self.tenant_id, snapshots=-1)
|
self.client.update_quotas(self.tenant_id, snapshots=-1)
|
||||||
|
|
||||||
@ -269,7 +269,7 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
|
|||||||
|
|
||||||
self.assertEqual(-1, quotas.get('snapshots'))
|
self.assertEqual(-1, quotas.get('snapshots'))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_unlimited_user_quota_for_snapshots(self):
|
def test_unlimited_user_quota_for_snapshots(self):
|
||||||
self.client.update_quotas(
|
self.client.update_quotas(
|
||||||
self.tenant_id, self.user_id, snapshots=-1)
|
self.tenant_id, self.user_id, snapshots=-1)
|
||||||
@ -278,7 +278,7 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
|
|||||||
|
|
||||||
self.assertEqual(-1, quotas.get('snapshots'))
|
self.assertEqual(-1, quotas.get('snapshots'))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_unlimited_quota_for_gigabytes(self):
|
def test_unlimited_quota_for_gigabytes(self):
|
||||||
self.client.update_quotas(self.tenant_id, gigabytes=-1)
|
self.client.update_quotas(self.tenant_id, gigabytes=-1)
|
||||||
|
|
||||||
@ -286,7 +286,7 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
|
|||||||
|
|
||||||
self.assertEqual(-1, quotas.get('gigabytes'))
|
self.assertEqual(-1, quotas.get('gigabytes'))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_unlimited_quota_for_snapshot_gigabytes(self):
|
def test_unlimited_quota_for_snapshot_gigabytes(self):
|
||||||
self.client.update_quotas(
|
self.client.update_quotas(
|
||||||
self.tenant_id, snapshot_gigabytes=-1)
|
self.tenant_id, snapshot_gigabytes=-1)
|
||||||
@ -295,7 +295,7 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
|
|||||||
|
|
||||||
self.assertEqual(-1, quotas.get('snapshot_gigabytes'))
|
self.assertEqual(-1, quotas.get('snapshot_gigabytes'))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_unlimited_user_quota_for_gigabytes(self):
|
def test_unlimited_user_quota_for_gigabytes(self):
|
||||||
self.client.update_quotas(
|
self.client.update_quotas(
|
||||||
self.tenant_id, self.user_id, gigabytes=-1)
|
self.tenant_id, self.user_id, gigabytes=-1)
|
||||||
@ -304,7 +304,7 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
|
|||||||
|
|
||||||
self.assertEqual(-1, quotas.get('gigabytes'))
|
self.assertEqual(-1, quotas.get('gigabytes'))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_unlimited_user_quota_for_snapshot_gigabytes(self):
|
def test_unlimited_user_quota_for_snapshot_gigabytes(self):
|
||||||
self.client.update_quotas(
|
self.client.update_quotas(
|
||||||
self.tenant_id, self.user_id, snapshot_gigabytes=-1)
|
self.tenant_id, self.user_id, snapshot_gigabytes=-1)
|
||||||
@ -313,7 +313,7 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
|
|||||||
|
|
||||||
self.assertEqual(-1, quotas.get('snapshot_gigabytes'))
|
self.assertEqual(-1, quotas.get('snapshot_gigabytes'))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_unlimited_quota_for_share_networks(self):
|
def test_unlimited_quota_for_share_networks(self):
|
||||||
self.client.update_quotas(self.tenant_id, share_networks=-1)
|
self.client.update_quotas(self.tenant_id, share_networks=-1)
|
||||||
|
|
||||||
@ -321,7 +321,7 @@ class SharesAdminQuotasUpdateTest(base.BaseSharesAdminTest):
|
|||||||
|
|
||||||
self.assertEqual(-1, quotas.get('share_networks'))
|
self.assertEqual(-1, quotas.get('share_networks'))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_unlimited_user_quota_for_share_networks(self):
|
def test_unlimited_user_quota_for_share_networks(self):
|
||||||
self.client.update_quotas(
|
self.client.update_quotas(
|
||||||
self.tenant_id, self.user_id, share_networks=-1)
|
self.tenant_id, self.user_id, share_networks=-1)
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -35,18 +35,18 @@ class SharesAdminQuotasNegativeTest(base.BaseSharesAdminTest):
|
|||||||
cls.user_id = cls.shares_client.user_id
|
cls.user_id = cls.shares_client.user_id
|
||||||
cls.tenant_id = cls.shares_client.tenant_id
|
cls.tenant_id = cls.shares_client.tenant_id
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_get_quotas_with_empty_tenant_id(self):
|
def test_get_quotas_with_empty_tenant_id(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.shares_client.show_quotas, "")
|
self.shares_client.show_quotas, "")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_reset_quotas_with_empty_tenant_id(self):
|
def test_reset_quotas_with_empty_tenant_id(self):
|
||||||
client = self.get_client_with_isolated_creds()
|
client = self.get_client_with_isolated_creds()
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
client.reset_quotas, "")
|
client.reset_quotas, "")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_update_shares_quota_with_wrong_data(self):
|
def test_update_shares_quota_with_wrong_data(self):
|
||||||
# -1 is acceptable value as unlimited
|
# -1 is acceptable value as unlimited
|
||||||
client = self.get_client_with_isolated_creds()
|
client = self.get_client_with_isolated_creds()
|
||||||
@ -55,7 +55,7 @@ class SharesAdminQuotasNegativeTest(base.BaseSharesAdminTest):
|
|||||||
client.tenant_id,
|
client.tenant_id,
|
||||||
shares=-2)
|
shares=-2)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_update_snapshots_quota_with_wrong_data(self):
|
def test_update_snapshots_quota_with_wrong_data(self):
|
||||||
# -1 is acceptable value as unlimited
|
# -1 is acceptable value as unlimited
|
||||||
client = self.get_client_with_isolated_creds()
|
client = self.get_client_with_isolated_creds()
|
||||||
@ -64,7 +64,7 @@ class SharesAdminQuotasNegativeTest(base.BaseSharesAdminTest):
|
|||||||
client.tenant_id,
|
client.tenant_id,
|
||||||
snapshots=-2)
|
snapshots=-2)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_update_gigabytes_quota_with_wrong_data(self):
|
def test_update_gigabytes_quota_with_wrong_data(self):
|
||||||
# -1 is acceptable value as unlimited
|
# -1 is acceptable value as unlimited
|
||||||
client = self.get_client_with_isolated_creds()
|
client = self.get_client_with_isolated_creds()
|
||||||
@ -73,7 +73,7 @@ class SharesAdminQuotasNegativeTest(base.BaseSharesAdminTest):
|
|||||||
client.tenant_id,
|
client.tenant_id,
|
||||||
gigabytes=-2)
|
gigabytes=-2)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_update_snapshot_gigabytes_quota_with_wrong_data(self):
|
def test_update_snapshot_gigabytes_quota_with_wrong_data(self):
|
||||||
# -1 is acceptable value as unlimited
|
# -1 is acceptable value as unlimited
|
||||||
client = self.get_client_with_isolated_creds()
|
client = self.get_client_with_isolated_creds()
|
||||||
@ -82,7 +82,7 @@ class SharesAdminQuotasNegativeTest(base.BaseSharesAdminTest):
|
|||||||
client.tenant_id,
|
client.tenant_id,
|
||||||
snapshot_gigabytes=-2)
|
snapshot_gigabytes=-2)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_update_share_networks_quota_with_wrong_data(self):
|
def test_update_share_networks_quota_with_wrong_data(self):
|
||||||
# -1 is acceptable value as unlimited
|
# -1 is acceptable value as unlimited
|
||||||
client = self.get_client_with_isolated_creds()
|
client = self.get_client_with_isolated_creds()
|
||||||
@ -91,7 +91,7 @@ class SharesAdminQuotasNegativeTest(base.BaseSharesAdminTest):
|
|||||||
client.tenant_id,
|
client.tenant_id,
|
||||||
share_networks=-2)
|
share_networks=-2)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_create_share_with_size_bigger_than_quota(self):
|
def test_create_share_with_size_bigger_than_quota(self):
|
||||||
quotas = self.shares_client.show_quotas(
|
quotas = self.shares_client.show_quotas(
|
||||||
self.shares_client.tenant_id)
|
self.shares_client.tenant_id)
|
||||||
@ -102,7 +102,7 @@ class SharesAdminQuotasNegativeTest(base.BaseSharesAdminTest):
|
|||||||
self.create_share,
|
self.create_share,
|
||||||
size=overquota)
|
size=overquota)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_set_user_quota_shares_bigger_than_tenant_quota(self):
|
def test_try_set_user_quota_shares_bigger_than_tenant_quota(self):
|
||||||
client = self.get_client_with_isolated_creds()
|
client = self.get_client_with_isolated_creds()
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ class SharesAdminQuotasNegativeTest(base.BaseSharesAdminTest):
|
|||||||
client.user_id,
|
client.user_id,
|
||||||
shares=bigger_value)
|
shares=bigger_value)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_set_user_quota_snaps_bigger_than_tenant_quota(self):
|
def test_try_set_user_quota_snaps_bigger_than_tenant_quota(self):
|
||||||
client = self.get_client_with_isolated_creds()
|
client = self.get_client_with_isolated_creds()
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ class SharesAdminQuotasNegativeTest(base.BaseSharesAdminTest):
|
|||||||
client.user_id,
|
client.user_id,
|
||||||
snapshots=bigger_value)
|
snapshots=bigger_value)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_set_user_quota_gigabytes_bigger_than_tenant_quota(self):
|
def test_try_set_user_quota_gigabytes_bigger_than_tenant_quota(self):
|
||||||
client = self.get_client_with_isolated_creds()
|
client = self.get_client_with_isolated_creds()
|
||||||
|
|
||||||
@ -147,7 +147,7 @@ class SharesAdminQuotasNegativeTest(base.BaseSharesAdminTest):
|
|||||||
client.user_id,
|
client.user_id,
|
||||||
gigabytes=bigger_value)
|
gigabytes=bigger_value)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_set_user_quota_snap_gigabytes_bigger_than_tenant_quota(self):
|
def test_try_set_user_quota_snap_gigabytes_bigger_than_tenant_quota(self):
|
||||||
client = self.get_client_with_isolated_creds()
|
client = self.get_client_with_isolated_creds()
|
||||||
|
|
||||||
@ -162,7 +162,7 @@ class SharesAdminQuotasNegativeTest(base.BaseSharesAdminTest):
|
|||||||
client.user_id,
|
client.user_id,
|
||||||
snapshot_gigabytes=bigger_value)
|
snapshot_gigabytes=bigger_value)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_set_user_quota_share_networks_bigger_than_tenant_quota(self):
|
def test_try_set_user_quota_share_networks_bigger_than_tenant_quota(self):
|
||||||
client = self.get_client_with_isolated_creds()
|
client = self.get_client_with_isolated_creds()
|
||||||
|
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.common import constants
|
from manila_tempest_tests.common import constants
|
||||||
from manila_tempest_tests import share_exceptions
|
from manila_tempest_tests import share_exceptions
|
||||||
@ -68,7 +68,7 @@ class ReplicationAdminTest(base.BaseSharesMixedTest):
|
|||||||
return [replica['id'] for replica in replica_list
|
return [replica['id'] for replica in replica_list
|
||||||
if replica['replica_state'] == r_state]
|
if replica['replica_state'] == r_state]
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
def test_promote_out_of_sync_share_replica(self):
|
def test_promote_out_of_sync_share_replica(self):
|
||||||
"""Test promote 'out_of_sync' share replica to active state."""
|
"""Test promote 'out_of_sync' share replica to active state."""
|
||||||
if (self.replication_type
|
if (self.replication_type
|
||||||
@ -120,7 +120,7 @@ class ReplicationAdminTest(base.BaseSharesMixedTest):
|
|||||||
replica_list, constants.REPLICATION_STATE_ACTIVE)
|
replica_list, constants.REPLICATION_STATE_ACTIVE)
|
||||||
self.assertEqual(1, len(new_active_replicas))
|
self.assertEqual(1, len(new_active_replicas))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
def test_force_delete_share_replica(self):
|
def test_force_delete_share_replica(self):
|
||||||
"""Test force deleting a replica that is in 'error_deleting' status."""
|
"""Test force deleting a replica that is in 'error_deleting' status."""
|
||||||
replica = self.create_share_replica(self.share['id'],
|
replica = self.create_share_replica(self.share['id'],
|
||||||
@ -134,7 +134,7 @@ class ReplicationAdminTest(base.BaseSharesMixedTest):
|
|||||||
self.admin_client.force_delete_share_replica(replica['id'])
|
self.admin_client.force_delete_share_replica(replica['id'])
|
||||||
self.admin_client.wait_for_resource_deletion(replica_id=replica['id'])
|
self.admin_client.wait_for_resource_deletion(replica_id=replica['id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
def test_reset_share_replica_status(self):
|
def test_reset_share_replica_status(self):
|
||||||
"""Test resetting a replica's 'status' attribute."""
|
"""Test resetting a replica's 'status' attribute."""
|
||||||
replica = self.create_share_replica(self.share['id'],
|
replica = self.create_share_replica(self.share['id'],
|
||||||
@ -146,7 +146,7 @@ class ReplicationAdminTest(base.BaseSharesMixedTest):
|
|||||||
self.admin_client.wait_for_share_replica_status(
|
self.admin_client.wait_for_share_replica_status(
|
||||||
replica['id'], constants.STATUS_ERROR)
|
replica['id'], constants.STATUS_ERROR)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
def test_reset_share_replica_state(self):
|
def test_reset_share_replica_state(self):
|
||||||
"""Test resetting a replica's 'replica_state' attribute."""
|
"""Test resetting a replica's 'replica_state' attribute."""
|
||||||
replica = self.create_share_replica(self.share['id'],
|
replica = self.create_share_replica(self.share['id'],
|
||||||
@ -158,7 +158,7 @@ class ReplicationAdminTest(base.BaseSharesMixedTest):
|
|||||||
self.admin_client.wait_for_share_replica_status(
|
self.admin_client.wait_for_share_replica_status(
|
||||||
replica['id'], constants.STATUS_ERROR, status_attr='replica_state')
|
replica['id'], constants.STATUS_ERROR, status_attr='replica_state')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
def test_resync_share_replica(self):
|
def test_resync_share_replica(self):
|
||||||
"""Test resyncing a replica."""
|
"""Test resyncing a replica."""
|
||||||
replica = self.create_share_replica(self.share['id'],
|
replica = self.create_share_replica(self.share['id'],
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.common import constants
|
from manila_tempest_tests.common import constants
|
||||||
from manila_tempest_tests import share_exceptions
|
from manila_tempest_tests import share_exceptions
|
||||||
@ -65,7 +65,7 @@ class ReplicationAdminTest(base.BaseSharesMixedTest):
|
|||||||
cls.replica = cls.admin_client.list_share_replicas(
|
cls.replica = cls.admin_client.list_share_replicas(
|
||||||
share_id=cls.share['id'])[0]
|
share_id=cls.share['id'])[0]
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_extend_tests,
|
@testtools.skipUnless(CONF.share.run_extend_tests,
|
||||||
'Extend share tests are disabled.')
|
'Extend share tests are disabled.')
|
||||||
def test_extend_replicated_share(self):
|
def test_extend_replicated_share(self):
|
||||||
@ -77,7 +77,7 @@ class ReplicationAdminTest(base.BaseSharesMixedTest):
|
|||||||
share = self.admin_client.get_share(self.share["id"])
|
share = self.admin_client.get_share(self.share["id"])
|
||||||
self.assertEqual(new_size, int(share["size"]))
|
self.assertEqual(new_size, int(share["size"]))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_shrink_tests,
|
@testtools.skipUnless(CONF.share.run_shrink_tests,
|
||||||
'Shrink share tests are disabled.')
|
'Shrink share tests are disabled.')
|
||||||
def test_shrink_replicated_share(self):
|
def test_shrink_replicated_share(self):
|
||||||
@ -88,7 +88,7 @@ class ReplicationAdminTest(base.BaseSharesMixedTest):
|
|||||||
shrink_share = self.admin_client.get_share(self.share["id"])
|
shrink_share = self.admin_client.get_share(self.share["id"])
|
||||||
self.assertEqual(new_size, int(shrink_share["size"]))
|
self.assertEqual(new_size, int(shrink_share["size"]))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_manage_unmanage_tests,
|
@testtools.skipUnless(CONF.share.run_manage_unmanage_tests,
|
||||||
'Manage/Unmanage Tests are disabled.')
|
'Manage/Unmanage Tests are disabled.')
|
||||||
def test_manage_share_for_replication_type(self):
|
def test_manage_share_for_replication_type(self):
|
||||||
@ -123,7 +123,7 @@ class ReplicationAdminTest(base.BaseSharesMixedTest):
|
|||||||
self.create_share_replica(managed_share['id'], self.replica_zone,
|
self.create_share_replica(managed_share['id'], self.replica_zone,
|
||||||
cleanup=True, client=self.admin_client)
|
cleanup=True, client=self.admin_client)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_manage_unmanage_tests,
|
@testtools.skipUnless(CONF.share.run_manage_unmanage_tests,
|
||||||
'Manage/Unmanage Tests are disabled.')
|
'Manage/Unmanage Tests are disabled.')
|
||||||
def test_unmanage_replicated_share_with_replica(self):
|
def test_unmanage_replicated_share_with_replica(self):
|
||||||
@ -136,7 +136,7 @@ class ReplicationAdminTest(base.BaseSharesMixedTest):
|
|||||||
self.admin_client.unmanage_share,
|
self.admin_client.unmanage_share,
|
||||||
share_id=self.share['id'])
|
share_id=self.share['id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_manage_unmanage_tests,
|
@testtools.skipUnless(CONF.share.run_manage_unmanage_tests,
|
||||||
'Manage/Unmanage Tests are disabled.')
|
'Manage/Unmanage Tests are disabled.')
|
||||||
def test_unmanage_replicated_share_with_no_replica(self):
|
def test_unmanage_replicated_share_with_no_replica(self):
|
||||||
@ -148,7 +148,7 @@ class ReplicationAdminTest(base.BaseSharesMixedTest):
|
|||||||
self.admin_client.unmanage_share(share['id'])
|
self.admin_client.unmanage_share(share['id'])
|
||||||
self.admin_client.wait_for_resource_deletion(share_id=share['id'])
|
self.admin_client.wait_for_resource_deletion(share_id=share['id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_manage_unmanage_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_manage_unmanage_snapshot_tests,
|
||||||
'Manage/Unmanage Snapshot Tests are disabled.')
|
'Manage/Unmanage Snapshot Tests are disabled.')
|
||||||
def test_manage_replicated_share_snapshot(self):
|
def test_manage_replicated_share_snapshot(self):
|
||||||
@ -163,7 +163,7 @@ class ReplicationAdminTest(base.BaseSharesMixedTest):
|
|||||||
provider_location="127.0.0.1:/fake_provider_location/"
|
provider_location="127.0.0.1:/fake_provider_location/"
|
||||||
"manila_share_9dc61f49_fbc8_48d7_9337_2f9593d9")
|
"manila_share_9dc61f49_fbc8_48d7_9337_2f9593d9")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_manage_unmanage_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_manage_unmanage_snapshot_tests,
|
||||||
'Manage/Unmanage Snapshot Tests are disabled.')
|
'Manage/Unmanage Snapshot Tests are disabled.')
|
||||||
def test_unmanage_replicated_share_snapshot(self):
|
def test_unmanage_replicated_share_snapshot(self):
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ CONF = config.CONF
|
|||||||
|
|
||||||
class SchedulerStatsAdminTest(base.BaseSharesAdminTest):
|
class SchedulerStatsAdminTest(base.BaseSharesAdminTest):
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_pool_list(self):
|
def test_pool_list(self):
|
||||||
|
|
||||||
# List pools
|
# List pools
|
||||||
@ -35,7 +35,7 @@ class SchedulerStatsAdminTest(base.BaseSharesAdminTest):
|
|||||||
actual_keys = set(pool.keys())
|
actual_keys = set(pool.keys())
|
||||||
self.assertTrue(actual_keys.issuperset(required_keys))
|
self.assertTrue(actual_keys.issuperset(required_keys))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_pool_list_with_filters(self):
|
def test_pool_list_with_filters(self):
|
||||||
|
|
||||||
# List pools
|
# List pools
|
||||||
@ -64,7 +64,7 @@ class SchedulerStatsAdminTest(base.BaseSharesAdminTest):
|
|||||||
for k, v in search_opts.items():
|
for k, v in search_opts.items():
|
||||||
self.assertEqual(v[1:-1], filtered_pool_list[0][k])
|
self.assertEqual(v[1:-1], filtered_pool_list[0][k])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_pool_list_with_filters_negative(self):
|
def test_pool_list_with_filters_negative(self):
|
||||||
|
|
||||||
# Build search opts for a non-existent pool
|
# Build search opts for a non-existent pool
|
||||||
@ -80,7 +80,7 @@ class SchedulerStatsAdminTest(base.BaseSharesAdminTest):
|
|||||||
# Ensure we got no pools
|
# Ensure we got no pools
|
||||||
self.assertEmpty(pool_list)
|
self.assertEmpty(pool_list)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_pool_list_detail(self):
|
def test_pool_list_detail(self):
|
||||||
|
|
||||||
# List pools
|
# List pools
|
||||||
@ -93,7 +93,7 @@ class SchedulerStatsAdminTest(base.BaseSharesAdminTest):
|
|||||||
actual_keys = set(pool.keys())
|
actual_keys = set(pool.keys())
|
||||||
self.assertTrue(actual_keys.issuperset(required_keys))
|
self.assertTrue(actual_keys.issuperset(required_keys))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_pool_list_detail_with_filters(self):
|
def test_pool_list_detail_with_filters(self):
|
||||||
|
|
||||||
# List pools
|
# List pools
|
||||||
@ -122,7 +122,7 @@ class SchedulerStatsAdminTest(base.BaseSharesAdminTest):
|
|||||||
for k, v in search_opts.items():
|
for k, v in search_opts.items():
|
||||||
self.assertEqual(v[1:-1], filtered_pool_list[0][k])
|
self.assertEqual(v[1:-1], filtered_pool_list[0][k])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_pool_list_detail_with_filters_negative(self):
|
def test_pool_list_detail_with_filters_negative(self):
|
||||||
|
|
||||||
# Build search opts for a non-existent pool
|
# Build search opts for a non-existent pool
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
from manila_tempest_tests.tests.api import test_security_services
|
from manila_tempest_tests.tests.api import test_security_services
|
||||||
@ -46,7 +46,7 @@ class SecurityServiceAdminTest(
|
|||||||
'kerberos',
|
'kerberos',
|
||||||
**ss_kerberos_data)
|
**ss_kerberos_data)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_list_security_services_all_tenants(self):
|
def test_list_security_services_all_tenants(self):
|
||||||
listed = self.shares_client.list_security_services(
|
listed = self.shares_client.list_security_services(
|
||||||
params={'all_tenants': 1})
|
params={'all_tenants': 1})
|
||||||
@ -57,7 +57,7 @@ class SecurityServiceAdminTest(
|
|||||||
keys = ["name", "id", "status", "type", ]
|
keys = ["name", "id", "status", "type", ]
|
||||||
[self.assertIn(key, s_s.keys()) for s_s in listed for key in keys]
|
[self.assertIn(key, s_s.keys()) for s_s in listed for key in keys]
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_list_security_services_invalid_filters(self):
|
def test_list_security_services_invalid_filters(self):
|
||||||
listed = self.shares_client.list_security_services(
|
listed = self.shares_client.list_security_services(
|
||||||
params={'fake_opt': 'some_value'})
|
params={'fake_opt': 'some_value'})
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import ddt
|
import ddt
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ class ServicesAdminTest(base.BaseSharesAdminTest):
|
|||||||
super(ServicesAdminTest, self).setUp()
|
super(ServicesAdminTest, self).setUp()
|
||||||
self.services = self.shares_client.list_services()
|
self.services = self.shares_client.list_services()
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_list_services(self, client_name):
|
def test_list_services(self, client_name):
|
||||||
services = getattr(self, client_name).list_services()
|
services = getattr(self, client_name).list_services()
|
||||||
@ -35,7 +35,7 @@ class ServicesAdminTest(base.BaseSharesAdminTest):
|
|||||||
for service in services:
|
for service in services:
|
||||||
self.assertIsNotNone(service['id'])
|
self.assertIsNotNone(service['id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_get_services_by_host_name(self, client_name):
|
def test_get_services_by_host_name(self, client_name):
|
||||||
host = self.services[0]["host"]
|
host = self.services[0]["host"]
|
||||||
@ -45,7 +45,7 @@ class ServicesAdminTest(base.BaseSharesAdminTest):
|
|||||||
for service in services:
|
for service in services:
|
||||||
self.assertEqual(host, service["host"])
|
self.assertEqual(host, service["host"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_get_services_by_binary_name(self, client_name):
|
def test_get_services_by_binary_name(self, client_name):
|
||||||
binary = self.services[0]["binary"]
|
binary = self.services[0]["binary"]
|
||||||
@ -55,7 +55,7 @@ class ServicesAdminTest(base.BaseSharesAdminTest):
|
|||||||
for service in services:
|
for service in services:
|
||||||
self.assertEqual(binary, service["binary"])
|
self.assertEqual(binary, service["binary"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_get_services_by_availability_zone(self, client_name):
|
def test_get_services_by_availability_zone(self, client_name):
|
||||||
zone = self.services[0]["zone"]
|
zone = self.services[0]["zone"]
|
||||||
@ -65,7 +65,7 @@ class ServicesAdminTest(base.BaseSharesAdminTest):
|
|||||||
for service in services:
|
for service in services:
|
||||||
self.assertEqual(zone, service["zone"])
|
self.assertEqual(zone, service["zone"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_get_services_by_status(self, client_name):
|
def test_get_services_by_status(self, client_name):
|
||||||
status = self.services[0]["status"]
|
status = self.services[0]["status"]
|
||||||
@ -75,7 +75,7 @@ class ServicesAdminTest(base.BaseSharesAdminTest):
|
|||||||
for service in services:
|
for service in services:
|
||||||
self.assertEqual(status, service["status"])
|
self.assertEqual(status, service["status"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_get_services_by_state(self, client_name):
|
def test_get_services_by_state(self, client_name):
|
||||||
state = self.services[0]["state"]
|
state = self.services[0]["state"]
|
||||||
@ -85,7 +85,7 @@ class ServicesAdminTest(base.BaseSharesAdminTest):
|
|||||||
for service in services:
|
for service in services:
|
||||||
self.assertEqual(state, service["state"])
|
self.assertEqual(state, service["state"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_get_services_by_all_filters(self, client_name):
|
def test_get_services_by_all_filters(self, client_name):
|
||||||
params = {
|
params = {
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
import ddt
|
import ddt
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -29,12 +29,12 @@ class ServicesAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
cls.admin_client = cls.admin_shares_v2_client
|
cls.admin_client = cls.admin_shares_v2_client
|
||||||
cls.member_client = cls.shares_v2_client
|
cls.member_client = cls.shares_v2_client
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_list_services_with_non_admin_user(self):
|
def test_list_services_with_non_admin_user(self):
|
||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.member_client.list_services)
|
self.member_client.list_services)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_get_service_by_invalid_params(self):
|
def test_get_service_by_invalid_params(self):
|
||||||
# All services are expected if send the request with invalid parameter
|
# All services are expected if send the request with invalid parameter
|
||||||
services = self.admin_client.list_services()
|
services = self.admin_client.list_services()
|
||||||
@ -54,37 +54,37 @@ class ServicesAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
key=lambda service: service['id']),
|
key=lambda service: service['id']),
|
||||||
msg)
|
msg)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_get_service_by_invalid_host(self):
|
def test_get_service_by_invalid_host(self):
|
||||||
params = {'host': 'fake_host'}
|
params = {'host': 'fake_host'}
|
||||||
services_fake = self.admin_client.list_services(params)
|
services_fake = self.admin_client.list_services(params)
|
||||||
self.assertEqual(0, len(services_fake))
|
self.assertEqual(0, len(services_fake))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_get_service_by_invalid_binary(self):
|
def test_get_service_by_invalid_binary(self):
|
||||||
params = {'binary': 'fake_binary'}
|
params = {'binary': 'fake_binary'}
|
||||||
services_fake = self.admin_client.list_services(params)
|
services_fake = self.admin_client.list_services(params)
|
||||||
self.assertEqual(0, len(services_fake))
|
self.assertEqual(0, len(services_fake))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_get_service_by_invalid_zone(self):
|
def test_get_service_by_invalid_zone(self):
|
||||||
params = {'zone': 'fake_zone'}
|
params = {'zone': 'fake_zone'}
|
||||||
services_fake = self.admin_client.list_services(params)
|
services_fake = self.admin_client.list_services(params)
|
||||||
self.assertEqual(0, len(services_fake))
|
self.assertEqual(0, len(services_fake))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_get_service_by_invalid_status(self):
|
def test_get_service_by_invalid_status(self):
|
||||||
params = {'status': 'fake_status'}
|
params = {'status': 'fake_status'}
|
||||||
services_fake = self.admin_client.list_services(params)
|
services_fake = self.admin_client.list_services(params)
|
||||||
self.assertEqual(0, len(services_fake))
|
self.assertEqual(0, len(services_fake))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_get_service_by_invalid_state(self):
|
def test_get_service_by_invalid_state(self):
|
||||||
params = {'state': 'fake_state'}
|
params = {'state': 'fake_state'}
|
||||||
services_fake = self.admin_client.list_services(params)
|
services_fake = self.admin_client.list_services(params)
|
||||||
self.assertEqual(0, len(services_fake))
|
self.assertEqual(0, len(services_fake))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
@ddt.data(
|
@ddt.data(
|
||||||
('os-services', '2.7'),
|
('os-services', '2.7'),
|
||||||
('services', '2.6'),
|
('services', '2.6'),
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
from manila_tempest_tests import utils
|
from manila_tempest_tests import utils
|
||||||
@ -29,7 +29,7 @@ class ShareInstancesTest(base.BaseSharesAdminTest):
|
|||||||
super(ShareInstancesTest, cls).resource_setup()
|
super(ShareInstancesTest, cls).resource_setup()
|
||||||
cls.share = cls.create_share()
|
cls.share = cls.create_share()
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_get_instances_of_share_v2_3(self):
|
def test_get_instances_of_share_v2_3(self):
|
||||||
"""Test that we get only the 1 share instance back for the share."""
|
"""Test that we get only the 1 share instance back for the share."""
|
||||||
share_instances = self.shares_v2_client.get_instances_of_share(
|
share_instances = self.shares_v2_client.get_instances_of_share(
|
||||||
@ -47,7 +47,7 @@ class ShareInstancesTest(base.BaseSharesAdminTest):
|
|||||||
self.share['id'],
|
self.share['id'],
|
||||||
si['share_id']))
|
si['share_id']))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_share_instances_v2_3(self):
|
def test_list_share_instances_v2_3(self):
|
||||||
"""Test that we get at least the share instance back for the share."""
|
"""Test that we get at least the share instance back for the share."""
|
||||||
share_instances = self.shares_v2_client.get_instances_of_share(
|
share_instances = self.shares_v2_client.get_instances_of_share(
|
||||||
@ -83,14 +83,14 @@ class ShareInstancesTest(base.BaseSharesAdminTest):
|
|||||||
'expected %s, got %s.' % (
|
'expected %s, got %s.' % (
|
||||||
si['id'], expected_keys, actual_keys))
|
si['id'], expected_keys, actual_keys))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_get_share_instance_v2_3(self):
|
def test_get_share_instance_v2_3(self):
|
||||||
self._get_share_instance('2.3')
|
self._get_share_instance('2.3')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_get_share_instance_v2_9(self):
|
def test_get_share_instance_v2_9(self):
|
||||||
self._get_share_instance('2.9')
|
self._get_share_instance('2.9')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_get_share_instance_v2_10(self):
|
def test_get_share_instance_v2_10(self):
|
||||||
self._get_share_instance('2.10')
|
self._get_share_instance('2.10')
|
||||||
|
@ -17,8 +17,8 @@ import six
|
|||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
from manila_tempest_tests import utils
|
from manila_tempest_tests import utils
|
||||||
@ -160,22 +160,22 @@ class ManageNFSShareTest(base.BaseSharesAdminTest):
|
|||||||
self.shares_v2_client.get_share,
|
self.shares_v2_client.get_share,
|
||||||
managed_share['id'])
|
managed_share['id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@base.skip_if_microversion_not_supported("2.5")
|
@base.skip_if_microversion_not_supported("2.5")
|
||||||
def test_manage_with_os_share_manage_url(self):
|
def test_manage_with_os_share_manage_url(self):
|
||||||
self._test_manage(share=self.shares[2], version="2.5")
|
self._test_manage(share=self.shares[2], version="2.5")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@base.skip_if_microversion_not_supported("2.8")
|
@base.skip_if_microversion_not_supported("2.8")
|
||||||
def test_manage_with_is_public_True(self):
|
def test_manage_with_is_public_True(self):
|
||||||
self._test_manage(share=self.shares[3], is_public=True, version="2.8")
|
self._test_manage(share=self.shares[3], is_public=True, version="2.8")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@base.skip_if_microversion_not_supported("2.16")
|
@base.skip_if_microversion_not_supported("2.16")
|
||||||
def test_manage_show_user_id(self):
|
def test_manage_show_user_id(self):
|
||||||
self._test_manage(share=self.shares[4], version="2.16")
|
self._test_manage(share=self.shares[4], version="2.16")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
def test_manage(self):
|
def test_manage(self):
|
||||||
# After 'unmanage' operation, share instance should be deleted.
|
# After 'unmanage' operation, share instance should be deleted.
|
||||||
# Assert not related to 'manage' test, but placed here for
|
# Assert not related to 'manage' test, but placed here for
|
||||||
@ -186,7 +186,7 @@ class ManageNFSShareTest(base.BaseSharesAdminTest):
|
|||||||
|
|
||||||
self._test_manage(share=self.shares[0])
|
self._test_manage(share=self.shares[0])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_manage_invalid(self):
|
def test_manage_invalid(self):
|
||||||
# Try to manage share with invalid parameters, it should not succeed
|
# Try to manage share with invalid parameters, it should not succeed
|
||||||
# because the scheduler will reject it. If it succeeds, then this test
|
# because the scheduler will reject it. If it succeeds, then this test
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
from manila_tempest_tests.tests.api import test_share_networks
|
from manila_tempest_tests.tests.api import test_share_networks
|
||||||
@ -76,7 +76,7 @@ class ShareNetworkAdminTest(
|
|||||||
cls.sn_with_kerberos_ss["id"],
|
cls.sn_with_kerberos_ss["id"],
|
||||||
cls.ss_kerberos["id"])
|
cls.ss_kerberos["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_list_share_networks_all_tenants(self):
|
def test_list_share_networks_all_tenants(self):
|
||||||
listed = self.shares_client.list_share_networks_with_detail(
|
listed = self.shares_client.list_share_networks_with_detail(
|
||||||
{'all_tenants': 1})
|
{'all_tenants': 1})
|
||||||
@ -85,7 +85,7 @@ class ShareNetworkAdminTest(
|
|||||||
self.assertTrue(any(self.sn_with_kerberos_ss['id'] == sn['id']
|
self.assertTrue(any(self.sn_with_kerberos_ss['id'] == sn['id']
|
||||||
for sn in listed))
|
for sn in listed))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_list_share_networks_filter_by_project_id(self):
|
def test_list_share_networks_filter_by_project_id(self):
|
||||||
listed = self.shares_client.list_share_networks_with_detail(
|
listed = self.shares_client.list_share_networks_with_detail(
|
||||||
{'project_id': self.sn_with_kerberos_ss['project_id']})
|
{'project_id': self.sn_with_kerberos_ss['project_id']})
|
||||||
|
@ -18,7 +18,7 @@ import re
|
|||||||
import six
|
import six
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ class ShareServersAdminTest(base.BaseSharesAdminTest):
|
|||||||
cls.date_re = re.compile("^([0-9]{4}-[0-9]{2}-[0-9]{2}[A-Z]{1}"
|
cls.date_re = re.compile("^([0-9]{4}-[0-9]{2}-[0-9]{2}[A-Z]{1}"
|
||||||
"[0-9]{2}:[0-9]{2}:[0-9]{2}).*$")
|
"[0-9]{2}:[0-9]{2}:[0-9]{2}).*$")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_share_servers_without_filters(self):
|
def test_list_share_servers_without_filters(self):
|
||||||
servers = self.shares_client.list_share_servers()
|
servers = self.shares_client.list_share_servers()
|
||||||
self.assertTrue(len(servers) > 0)
|
self.assertTrue(len(servers) > 0)
|
||||||
@ -81,7 +81,7 @@ class ShareServersAdminTest(base.BaseSharesAdminTest):
|
|||||||
# Server we used is present.
|
# Server we used is present.
|
||||||
any(s["share_network_name"] in self.sn_name_and_id for s in servers)
|
any(s["share_network_name"] in self.sn_name_and_id for s in servers)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_share_servers_with_host_filter(self):
|
def test_list_share_servers_with_host_filter(self):
|
||||||
# Get list of share servers and remember 'host' name
|
# Get list of share servers and remember 'host' name
|
||||||
servers = self.shares_client.list_share_servers()
|
servers = self.shares_client.list_share_servers()
|
||||||
@ -107,7 +107,7 @@ class ShareServersAdminTest(base.BaseSharesAdminTest):
|
|||||||
for server in servers:
|
for server in servers:
|
||||||
self.assertEqual(server["host"], host)
|
self.assertEqual(server["host"], host)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_share_servers_with_status_filter(self):
|
def test_list_share_servers_with_status_filter(self):
|
||||||
# Get list of share servers
|
# Get list of share servers
|
||||||
servers = self.shares_client.list_share_servers()
|
servers = self.shares_client.list_share_servers()
|
||||||
@ -133,7 +133,7 @@ class ShareServersAdminTest(base.BaseSharesAdminTest):
|
|||||||
for server in servers:
|
for server in servers:
|
||||||
self.assertEqual(server["status"], status)
|
self.assertEqual(server["status"], status)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_share_servers_with_project_id_filter(self):
|
def test_list_share_servers_with_project_id_filter(self):
|
||||||
search_opts = {"project_id": self.share_network["project_id"]}
|
search_opts = {"project_id": self.share_network["project_id"]}
|
||||||
servers = self.shares_client.list_share_servers(search_opts)
|
servers = self.shares_client.list_share_servers(search_opts)
|
||||||
@ -143,7 +143,7 @@ class ShareServersAdminTest(base.BaseSharesAdminTest):
|
|||||||
self.assertEqual(server["project_id"],
|
self.assertEqual(server["project_id"],
|
||||||
self.share_network["project_id"])
|
self.share_network["project_id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_share_servers_with_share_network_name_filter(self):
|
def test_list_share_servers_with_share_network_name_filter(self):
|
||||||
search_opts = {"share_network": self.share_network["name"]}
|
search_opts = {"share_network": self.share_network["name"]}
|
||||||
servers = self.shares_client.list_share_servers(search_opts)
|
servers = self.shares_client.list_share_servers(search_opts)
|
||||||
@ -153,7 +153,7 @@ class ShareServersAdminTest(base.BaseSharesAdminTest):
|
|||||||
self.assertEqual(server["share_network_name"],
|
self.assertEqual(server["share_network_name"],
|
||||||
self.share_network["name"])
|
self.share_network["name"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_share_servers_with_share_network_id_filter(self):
|
def test_list_share_servers_with_share_network_id_filter(self):
|
||||||
search_opts = {"share_network": self.share_network["id"]}
|
search_opts = {"share_network": self.share_network["id"]}
|
||||||
servers = self.shares_client.list_share_servers(search_opts)
|
servers = self.shares_client.list_share_servers(search_opts)
|
||||||
@ -163,7 +163,7 @@ class ShareServersAdminTest(base.BaseSharesAdminTest):
|
|||||||
self.assertIn(server["share_network_name"],
|
self.assertIn(server["share_network_name"],
|
||||||
self.sn_name_and_id)
|
self.sn_name_and_id)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_show_share_server(self):
|
def test_show_share_server(self):
|
||||||
share = self.shares_client.get_share(self.share["id"])
|
share = self.shares_client.get_share(self.share["id"])
|
||||||
server = self.shares_client.show_share_server(share["share_server_id"])
|
server = self.shares_client.show_share_server(share["share_server_id"])
|
||||||
@ -198,7 +198,7 @@ class ShareServersAdminTest(base.BaseSharesAdminTest):
|
|||||||
# backend_details should be a dict
|
# backend_details should be a dict
|
||||||
self.assertIsInstance(server["backend_details"], dict)
|
self.assertIsInstance(server["backend_details"], dict)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_show_share_server_details(self):
|
def test_show_share_server_details(self):
|
||||||
servers = self.shares_client.list_share_servers()
|
servers = self.shares_client.list_share_servers()
|
||||||
details = self.shares_client.show_share_server_details(
|
details = self.shares_client.show_share_server_details(
|
||||||
@ -265,10 +265,10 @@ class ShareServersAdminTest(base.BaseSharesAdminTest):
|
|||||||
self.shares_client.wait_for_resource_deletion(
|
self.shares_client.wait_for_resource_deletion(
|
||||||
sn_id=new_sn["id"])
|
sn_id=new_sn["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_delete_share_server(self):
|
def test_delete_share_server(self):
|
||||||
self._delete_share_server(False)
|
self._delete_share_server(False)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_delete_share_server_by_deletion_of_share_network(self):
|
def test_delete_share_server_by_deletion_of_share_network(self):
|
||||||
self._delete_share_server(True)
|
self._delete_share_server(True)
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -28,66 +28,66 @@ class ShareServersNegativeAdminTest(base.BaseSharesMixedTest):
|
|||||||
cls.admin_client = cls.admin_shares_v2_client
|
cls.admin_client = cls.admin_shares_v2_client
|
||||||
cls.member_client = cls.shares_v2_client
|
cls.member_client = cls.shares_v2_client
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_list_share_servers_with_member(self):
|
def test_try_list_share_servers_with_member(self):
|
||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.member_client.list_share_servers)
|
self.member_client.list_share_servers)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_show_share_server_with_member(self):
|
def test_try_show_share_server_with_member(self):
|
||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.member_client.show_share_server,
|
self.member_client.show_share_server,
|
||||||
'fake_id')
|
'fake_id')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_show_share_server_details_with_member(self):
|
def test_try_show_share_server_details_with_member(self):
|
||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.member_client.show_share_server_details,
|
self.member_client.show_share_server_details,
|
||||||
'fake_id')
|
'fake_id')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_show_share_server_with_inexistent_id(self):
|
def test_show_share_server_with_inexistent_id(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.admin_client.show_share_server,
|
self.admin_client.show_share_server,
|
||||||
'fake_id')
|
'fake_id')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_show_share_server_details_with_inexistent_id(self):
|
def test_show_share_server_details_with_inexistent_id(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.admin_client.show_share_server_details,
|
self.admin_client.show_share_server_details,
|
||||||
'fake_id')
|
'fake_id')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_list_share_servers_with_wrong_filter_key(self):
|
def test_list_share_servers_with_wrong_filter_key(self):
|
||||||
search_opts = {'fake_filter_key': 'ACTIVE'}
|
search_opts = {'fake_filter_key': 'ACTIVE'}
|
||||||
servers = self.admin_client.list_share_servers(search_opts)
|
servers = self.admin_client.list_share_servers(search_opts)
|
||||||
self.assertEqual(0, len(servers))
|
self.assertEqual(0, len(servers))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_list_share_servers_with_wrong_filter_value(self):
|
def test_list_share_servers_with_wrong_filter_value(self):
|
||||||
search_opts = {'host': 123}
|
search_opts = {'host': 123}
|
||||||
servers = self.admin_client.list_share_servers(search_opts)
|
servers = self.admin_client.list_share_servers(search_opts)
|
||||||
self.assertEqual(0, len(servers))
|
self.assertEqual(0, len(servers))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_list_share_servers_with_fake_status(self):
|
def test_list_share_servers_with_fake_status(self):
|
||||||
search_opts = {"status": data_utils.rand_name("fake_status")}
|
search_opts = {"status": data_utils.rand_name("fake_status")}
|
||||||
servers = self.admin_client.list_share_servers(search_opts)
|
servers = self.admin_client.list_share_servers(search_opts)
|
||||||
self.assertEqual(0, len(servers))
|
self.assertEqual(0, len(servers))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_list_share_servers_with_fake_host(self):
|
def test_list_share_servers_with_fake_host(self):
|
||||||
search_opts = {"host": data_utils.rand_name("fake_host")}
|
search_opts = {"host": data_utils.rand_name("fake_host")}
|
||||||
servers = self.admin_client.list_share_servers(search_opts)
|
servers = self.admin_client.list_share_servers(search_opts)
|
||||||
self.assertEqual(0, len(servers))
|
self.assertEqual(0, len(servers))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_list_share_servers_with_fake_project(self):
|
def test_list_share_servers_with_fake_project(self):
|
||||||
search_opts = {"project_id": data_utils.rand_name("fake_project_id")}
|
search_opts = {"project_id": data_utils.rand_name("fake_project_id")}
|
||||||
servers = self.admin_client.list_share_servers(search_opts)
|
servers = self.admin_client.list_share_servers(search_opts)
|
||||||
self.assertEqual(0, len(servers))
|
self.assertEqual(0, len(servers))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_list_share_servers_with_fake_share_network(self):
|
def test_list_share_servers_with_fake_share_network(self):
|
||||||
search_opts = {
|
search_opts = {
|
||||||
"share_network": data_utils.rand_name("fake_share_network"),
|
"share_network": data_utils.rand_name("fake_share_network"),
|
||||||
@ -95,13 +95,13 @@ class ShareServersNegativeAdminTest(base.BaseSharesMixedTest):
|
|||||||
servers = self.admin_client.list_share_servers(search_opts)
|
servers = self.admin_client.list_share_servers(search_opts)
|
||||||
self.assertEqual(0, len(servers))
|
self.assertEqual(0, len(servers))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_delete_share_server_with_nonexistent_id(self):
|
def test_delete_share_server_with_nonexistent_id(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.admin_client.delete_share_server,
|
self.admin_client.delete_share_server,
|
||||||
"fake_nonexistent_share_server_id")
|
"fake_nonexistent_share_server_id")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_delete_share_server_with_member(self):
|
def test_delete_share_server_with_member(self):
|
||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.member_client.delete_share_server,
|
self.member_client.delete_share_server,
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
import ddt
|
import ddt
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ class ShareSnapshotInstancesTest(base.BaseSharesAdminTest):
|
|||||||
cls.snapshot = cls.shares_v2_client.get_snapshot(snap['id'])
|
cls.snapshot = cls.shares_v2_client.get_snapshot(snap['id'])
|
||||||
|
|
||||||
@ddt.data(True, False)
|
@ddt.data(True, False)
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_snapshot_instances_by_snapshot(self, detail):
|
def test_list_snapshot_instances_by_snapshot(self, detail):
|
||||||
"""Test that we get only the 1 snapshot instance from snapshot."""
|
"""Test that we get only the 1 snapshot instance from snapshot."""
|
||||||
snapshot_instances = self.shares_v2_client.list_snapshot_instances(
|
snapshot_instances = self.shares_v2_client.list_snapshot_instances(
|
||||||
@ -69,7 +69,7 @@ class ShareSnapshotInstancesTest(base.BaseSharesAdminTest):
|
|||||||
self.assertIn(key, expected_keys)
|
self.assertIn(key, expected_keys)
|
||||||
self.assertEqual(len(expected_keys), len(si))
|
self.assertEqual(len(expected_keys), len(si))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_snapshot_instances(self):
|
def test_list_snapshot_instances(self):
|
||||||
"""Test that we get at least the snapshot instance."""
|
"""Test that we get at least the snapshot instance."""
|
||||||
snapshot_instances = self.shares_v2_client.list_snapshot_instances()
|
snapshot_instances = self.shares_v2_client.list_snapshot_instances()
|
||||||
@ -80,7 +80,7 @@ class ShareSnapshotInstancesTest(base.BaseSharesAdminTest):
|
|||||||
self.snapshot['id'])
|
self.snapshot['id'])
|
||||||
self.assertIn(self.snapshot['id'], snapshot_ids, msg)
|
self.assertIn(self.snapshot['id'], snapshot_ids, msg)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_get_snapshot_instance(self):
|
def test_get_snapshot_instance(self):
|
||||||
instances = self.shares_v2_client.list_snapshot_instances(
|
instances = self.shares_v2_client.list_snapshot_instances(
|
||||||
snapshot_id=self.snapshot['id'])
|
snapshot_id=self.snapshot['id'])
|
||||||
@ -101,7 +101,7 @@ class ShareSnapshotInstancesTest(base.BaseSharesAdminTest):
|
|||||||
self.assertEqual(self.snapshot['provider_location'],
|
self.assertEqual(self.snapshot['provider_location'],
|
||||||
instance_detail['provider_location'])
|
instance_detail['provider_location'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_reset_snapshot_instance_status_and_delete(self):
|
def test_reset_snapshot_instance_status_and_delete(self):
|
||||||
"""Test resetting a snapshot instance's status attribute."""
|
"""Test resetting a snapshot instance's status attribute."""
|
||||||
snapshot = self.create_snapshot_wait_for_active(self.share["id"])
|
snapshot = self.create_snapshot_wait_for_active(self.share["id"])
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -37,14 +37,14 @@ class SnapshotInstancesNegativeTest(base.BaseSharesMixedTest):
|
|||||||
cls.snapshot = cls.create_snapshot_wait_for_active(
|
cls.snapshot = cls.create_snapshot_wait_for_active(
|
||||||
cls.share["id"], client=cls.admin_client)
|
cls.share["id"], client=cls.admin_client)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_snapshot_instances_with_snapshot_by_non_admin(self):
|
def test_list_snapshot_instances_with_snapshot_by_non_admin(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.Forbidden,
|
lib_exc.Forbidden,
|
||||||
self.member_client.list_snapshot_instances,
|
self.member_client.list_snapshot_instances,
|
||||||
snapshot_id=self.snapshot['id'])
|
snapshot_id=self.snapshot['id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_get_snapshot_instance_by_non_admin(self):
|
def test_get_snapshot_instance_by_non_admin(self):
|
||||||
instances = self.admin_client.list_snapshot_instances(
|
instances = self.admin_client.list_snapshot_instances(
|
||||||
snapshot_id=self.snapshot['id'])
|
snapshot_id=self.snapshot['id'])
|
||||||
@ -53,7 +53,7 @@ class SnapshotInstancesNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.member_client.get_snapshot_instance,
|
self.member_client.get_snapshot_instance,
|
||||||
instance_id=instances[0]['id'])
|
instance_id=instances[0]['id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_reset_snapshot_instance_status_by_non_admin(self):
|
def test_reset_snapshot_instance_status_by_non_admin(self):
|
||||||
instances = self.admin_client.list_snapshot_instances(
|
instances = self.admin_client.list_snapshot_instances(
|
||||||
snapshot_id=self.snapshot['id'])
|
snapshot_id=self.snapshot['id'])
|
||||||
@ -75,13 +75,13 @@ class SnapshotInstancesNegativeNoResourceTest(base.BaseSharesMixedTest):
|
|||||||
cls.admin_client = cls.admin_shares_v2_client
|
cls.admin_client = cls.admin_shares_v2_client
|
||||||
cls.member_client = cls.shares_v2_client
|
cls.member_client = cls.shares_v2_client
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_get_snapshot_instance_with_non_existent_instance(self):
|
def test_get_snapshot_instance_with_non_existent_instance(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.admin_client.get_snapshot_instance,
|
self.admin_client.get_snapshot_instance,
|
||||||
instance_id="nonexistent_instance")
|
instance_id="nonexistent_instance")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_list_snapshot_instances_by_non_admin(self):
|
def test_list_snapshot_instances_by_non_admin(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.Forbidden,
|
lib_exc.Forbidden,
|
||||||
|
@ -17,7 +17,7 @@ import ddt
|
|||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
from manila_tempest_tests import utils
|
from manila_tempest_tests import utils
|
||||||
@ -28,7 +28,7 @@ CONF = config.CONF
|
|||||||
@ddt.ddt
|
@ddt.ddt
|
||||||
class ShareTypesAdminTest(base.BaseSharesAdminTest):
|
class ShareTypesAdminTest(base.BaseSharesAdminTest):
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_share_type_create_delete(self):
|
def test_share_type_create_delete(self):
|
||||||
name = data_utils.rand_name("tempest-manila")
|
name = data_utils.rand_name("tempest-manila")
|
||||||
extra_specs = self.add_required_extra_specs_to_dict()
|
extra_specs = self.add_required_extra_specs_to_dict()
|
||||||
@ -58,7 +58,7 @@ class ShareTypesAdminTest(base.BaseSharesAdminTest):
|
|||||||
self.assertIn(old_key_name, share_type)
|
self.assertIn(old_key_name, share_type)
|
||||||
self.assertNotIn(new_key_name, share_type)
|
self.assertNotIn(new_key_name, share_type)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
@ddt.data('2.0', '2.6', '2.7')
|
@ddt.data('2.0', '2.6', '2.7')
|
||||||
def test_share_type_create_get(self, version):
|
def test_share_type_create_get(self, version):
|
||||||
self.skip_if_microversion_not_supported(version)
|
self.skip_if_microversion_not_supported(version)
|
||||||
@ -83,7 +83,7 @@ class ShareTypesAdminTest(base.BaseSharesAdminTest):
|
|||||||
# Check that backwards compatibility didn't break
|
# Check that backwards compatibility didn't break
|
||||||
self.assertDictMatch(get["volume_type"], get["share_type"])
|
self.assertDictMatch(get["volume_type"], get["share_type"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
@ddt.data('2.0', '2.6', '2.7')
|
@ddt.data('2.0', '2.6', '2.7')
|
||||||
def test_share_type_create_list(self, version):
|
def test_share_type_create_list(self, version):
|
||||||
self.skip_if_microversion_not_supported(version)
|
self.skip_if_microversion_not_supported(version)
|
||||||
@ -111,7 +111,7 @@ class ShareTypesAdminTest(base.BaseSharesAdminTest):
|
|||||||
for i in range(len(sts)):
|
for i in range(len(sts)):
|
||||||
self.assertDictMatch(sts[i], vts[i])
|
self.assertDictMatch(sts[i], vts[i])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_get_share_with_share_type(self):
|
def test_get_share_with_share_type(self):
|
||||||
|
|
||||||
# Data
|
# Data
|
||||||
@ -141,7 +141,7 @@ class ShareTypesAdminTest(base.BaseSharesAdminTest):
|
|||||||
self.assertEqual(st_create["share_type"]["id"], get["share_type"])
|
self.assertEqual(st_create["share_type"]["id"], get["share_type"])
|
||||||
self.assertEqual(shr_type_name, get["share_type_name"])
|
self.assertEqual(shr_type_name, get["share_type_name"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_private_share_type_access(self):
|
def test_private_share_type_access(self):
|
||||||
name = data_utils.rand_name("tempest-manila")
|
name = data_utils.rand_name("tempest-manila")
|
||||||
extra_specs = self.add_required_extra_specs_to_dict({"key": "value", })
|
extra_specs = self.add_required_extra_specs_to_dict({"key": "value", })
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
import copy
|
import copy
|
||||||
|
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -40,14 +40,14 @@ class ExtraSpecsReadAdminTest(base.BaseSharesAdminTest):
|
|||||||
cls.shares_client.create_share_type_extra_specs(
|
cls.shares_client.create_share_type_extra_specs(
|
||||||
cls.st_id, cls.custom_extra_specs)
|
cls.st_id, cls.custom_extra_specs)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_get_one_share_type_extra_spec(self):
|
def test_get_one_share_type_extra_spec(self):
|
||||||
es_get_one = self.shares_client.get_share_type_extra_spec(
|
es_get_one = self.shares_client.get_share_type_extra_spec(
|
||||||
self.st_id, "key1")
|
self.st_id, "key1")
|
||||||
|
|
||||||
self.assertEqual({"key1": self.custom_extra_specs["key1"]}, es_get_one)
|
self.assertEqual({"key1": self.custom_extra_specs["key1"]}, es_get_one)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_get_all_share_type_extra_specs(self):
|
def test_get_all_share_type_extra_specs(self):
|
||||||
es_get_all = self.shares_client.get_share_type_extra_specs(self.st_id)
|
es_get_all = self.shares_client.get_share_type_extra_specs(self.st_id)
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ class ExtraSpecsWriteAdminTest(base.BaseSharesAdminTest):
|
|||||||
self.shares_client.create_share_type_extra_specs(
|
self.shares_client.create_share_type_extra_specs(
|
||||||
self.st_id, self.custom_extra_specs)
|
self.st_id, self.custom_extra_specs)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_update_one_share_type_extra_spec(self):
|
def test_update_one_share_type_extra_spec(self):
|
||||||
self.custom_extra_specs["key1"] = "fake_value1_updated"
|
self.custom_extra_specs["key1"] = "fake_value1_updated"
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ class ExtraSpecsWriteAdminTest(base.BaseSharesAdminTest):
|
|||||||
expected_extra_specs.update(self.required_extra_specs)
|
expected_extra_specs.update(self.required_extra_specs)
|
||||||
self.assertEqual(self.custom_extra_specs, get)
|
self.assertEqual(self.custom_extra_specs, get)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_update_all_share_type_extra_specs(self):
|
def test_update_all_share_type_extra_specs(self):
|
||||||
self.custom_extra_specs["key2"] = "value2_updated"
|
self.custom_extra_specs["key2"] = "value2_updated"
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ class ExtraSpecsWriteAdminTest(base.BaseSharesAdminTest):
|
|||||||
expected_extra_specs.update(self.required_extra_specs)
|
expected_extra_specs.update(self.required_extra_specs)
|
||||||
self.assertEqual(self.custom_extra_specs, get)
|
self.assertEqual(self.custom_extra_specs, get)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_delete_one_share_type_extra_spec(self):
|
def test_delete_one_share_type_extra_spec(self):
|
||||||
# Delete one extra spec for share type
|
# Delete one extra spec for share type
|
||||||
self.shares_client.delete_share_type_extra_spec(self.st_id, "key1")
|
self.shares_client.delete_share_type_extra_spec(self.st_id, "key1")
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ class ExtraSpecsAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
return self.create_share_type(
|
return self.create_share_type(
|
||||||
name, extra_specs=extra_specs, client=self.admin_shares_v2_client)
|
name, extra_specs=extra_specs, client=self.admin_shares_v2_client)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_create_extra_specs_with_user(self):
|
def test_try_create_extra_specs_with_user(self):
|
||||||
st = self._create_share_type()
|
st = self._create_share_type()
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
@ -37,7 +37,7 @@ class ExtraSpecsAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
st["share_type"]["id"],
|
st["share_type"]["id"],
|
||||||
self.add_required_extra_specs_to_dict({"key": "new_value"}))
|
self.add_required_extra_specs_to_dict({"key": "new_value"}))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_list_extra_specs_with_user(self):
|
def test_try_list_extra_specs_with_user(self):
|
||||||
st = self._create_share_type()
|
st = self._create_share_type()
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
@ -45,7 +45,7 @@ class ExtraSpecsAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.shares_v2_client.get_share_type_extra_specs,
|
self.shares_v2_client.get_share_type_extra_specs,
|
||||||
st["share_type"]["id"])
|
st["share_type"]["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_get_extra_spec_with_user(self):
|
def test_try_get_extra_spec_with_user(self):
|
||||||
st = self._create_share_type()
|
st = self._create_share_type()
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
@ -53,7 +53,7 @@ class ExtraSpecsAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.shares_v2_client.get_share_type_extra_spec,
|
self.shares_v2_client.get_share_type_extra_spec,
|
||||||
st["share_type"]["id"], "key")
|
st["share_type"]["id"], "key")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_get_extra_specs_with_user(self):
|
def test_try_get_extra_specs_with_user(self):
|
||||||
st = self._create_share_type()
|
st = self._create_share_type()
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
@ -61,7 +61,7 @@ class ExtraSpecsAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.shares_v2_client.get_share_type_extra_specs,
|
self.shares_v2_client.get_share_type_extra_specs,
|
||||||
st["share_type"]["id"])
|
st["share_type"]["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_read_extra_specs_on_share_type_with_user(self):
|
def test_try_read_extra_specs_on_share_type_with_user(self):
|
||||||
st = self._create_share_type()
|
st = self._create_share_type()
|
||||||
share_type = self.shares_v2_client.get_share_type(
|
share_type = self.shares_v2_client.get_share_type(
|
||||||
@ -73,7 +73,7 @@ class ExtraSpecsAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
'Incorrect extra specs visible to non-admin user; '
|
'Incorrect extra specs visible to non-admin user; '
|
||||||
'expected %s, got %s' % (expected_keys, actual_keys))
|
'expected %s, got %s' % (expected_keys, actual_keys))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_update_extra_spec_with_user(self):
|
def test_try_update_extra_spec_with_user(self):
|
||||||
st = self._create_share_type()
|
st = self._create_share_type()
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
@ -81,7 +81,7 @@ class ExtraSpecsAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.shares_v2_client.update_share_type_extra_spec,
|
self.shares_v2_client.update_share_type_extra_spec,
|
||||||
st["share_type"]["id"], "key", "new_value")
|
st["share_type"]["id"], "key", "new_value")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_update_extra_specs_with_user(self):
|
def test_try_update_extra_specs_with_user(self):
|
||||||
st = self._create_share_type()
|
st = self._create_share_type()
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
@ -89,7 +89,7 @@ class ExtraSpecsAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.shares_v2_client.update_share_type_extra_specs,
|
self.shares_v2_client.update_share_type_extra_specs,
|
||||||
st["share_type"]["id"], {"key": "new_value"})
|
st["share_type"]["id"], {"key": "new_value"})
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_delete_extra_specs_with_user(self):
|
def test_try_delete_extra_specs_with_user(self):
|
||||||
st = self._create_share_type()
|
st = self._create_share_type()
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
@ -97,7 +97,7 @@ class ExtraSpecsAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.shares_v2_client.delete_share_type_extra_spec,
|
self.shares_v2_client.delete_share_type_extra_spec,
|
||||||
st["share_type"]["id"], "key")
|
st["share_type"]["id"], "key")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_set_too_long_key(self):
|
def test_try_set_too_long_key(self):
|
||||||
too_big_key = "k" * 256
|
too_big_key = "k" * 256
|
||||||
st = self._create_share_type()
|
st = self._create_share_type()
|
||||||
@ -107,7 +107,7 @@ class ExtraSpecsAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
st["share_type"]["id"],
|
st["share_type"]["id"],
|
||||||
self.add_required_extra_specs_to_dict({too_big_key: "value"}))
|
self.add_required_extra_specs_to_dict({too_big_key: "value"}))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_set_too_long_value_with_creation(self):
|
def test_try_set_too_long_value_with_creation(self):
|
||||||
too_big_value = "v" * 256
|
too_big_value = "v" * 256
|
||||||
st = self._create_share_type()
|
st = self._create_share_type()
|
||||||
@ -117,7 +117,7 @@ class ExtraSpecsAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
st["share_type"]["id"],
|
st["share_type"]["id"],
|
||||||
self.add_required_extra_specs_to_dict({"key": too_big_value}))
|
self.add_required_extra_specs_to_dict({"key": too_big_value}))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_set_too_long_value_with_update(self):
|
def test_try_set_too_long_value_with_update(self):
|
||||||
too_big_value = "v" * 256
|
too_big_value = "v" * 256
|
||||||
st = self._create_share_type()
|
st = self._create_share_type()
|
||||||
@ -130,7 +130,7 @@ class ExtraSpecsAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
st["share_type"]["id"],
|
st["share_type"]["id"],
|
||||||
self.add_required_extra_specs_to_dict({"key": too_big_value}))
|
self.add_required_extra_specs_to_dict({"key": too_big_value}))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_set_too_long_value_with_update_of_one_key(self):
|
def test_try_set_too_long_value_with_update_of_one_key(self):
|
||||||
too_big_value = "v" * 256
|
too_big_value = "v" * 256
|
||||||
st = self._create_share_type()
|
st = self._create_share_type()
|
||||||
@ -142,34 +142,34 @@ class ExtraSpecsAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.admin_shares_v2_client.update_share_type_extra_spec,
|
self.admin_shares_v2_client.update_share_type_extra_spec,
|
||||||
st["share_type"]["id"], "key", too_big_value)
|
st["share_type"]["id"], "key", too_big_value)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_list_es_with_empty_shr_type_id(self):
|
def test_try_list_es_with_empty_shr_type_id(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.NotFound,
|
lib_exc.NotFound,
|
||||||
self.admin_shares_v2_client.get_share_type_extra_specs, "")
|
self.admin_shares_v2_client.get_share_type_extra_specs, "")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_list_es_with_invalid_shr_type_id(self):
|
def test_try_list_es_with_invalid_shr_type_id(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.NotFound,
|
lib_exc.NotFound,
|
||||||
self.admin_shares_v2_client.get_share_type_extra_specs,
|
self.admin_shares_v2_client.get_share_type_extra_specs,
|
||||||
data_utils.rand_name("fake"))
|
data_utils.rand_name("fake"))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_create_es_with_empty_shr_type_id(self):
|
def test_try_create_es_with_empty_shr_type_id(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.NotFound,
|
lib_exc.NotFound,
|
||||||
self.admin_shares_v2_client.create_share_type_extra_specs,
|
self.admin_shares_v2_client.create_share_type_extra_specs,
|
||||||
"", {"key1": "value1", })
|
"", {"key1": "value1", })
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_create_es_with_invalid_shr_type_id(self):
|
def test_try_create_es_with_invalid_shr_type_id(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.NotFound,
|
lib_exc.NotFound,
|
||||||
self.admin_shares_v2_client.create_share_type_extra_specs,
|
self.admin_shares_v2_client.create_share_type_extra_specs,
|
||||||
data_utils.rand_name("fake"), {"key1": "value1", })
|
data_utils.rand_name("fake"), {"key1": "value1", })
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_create_es_with_empty_specs(self):
|
def test_try_create_es_with_empty_specs(self):
|
||||||
st = self._create_share_type()
|
st = self._create_share_type()
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
@ -177,7 +177,7 @@ class ExtraSpecsAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.admin_shares_v2_client.create_share_type_extra_specs,
|
self.admin_shares_v2_client.create_share_type_extra_specs,
|
||||||
st["share_type"]["id"], "")
|
st["share_type"]["id"], "")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_create_es_with_invalid_specs(self):
|
def test_try_create_es_with_invalid_specs(self):
|
||||||
st = self._create_share_type()
|
st = self._create_share_type()
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
@ -185,7 +185,7 @@ class ExtraSpecsAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.admin_shares_v2_client.create_share_type_extra_specs,
|
self.admin_shares_v2_client.create_share_type_extra_specs,
|
||||||
st["share_type"]["id"], {"": "value_with_empty_key"})
|
st["share_type"]["id"], {"": "value_with_empty_key"})
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_get_extra_spec_with_empty_key(self):
|
def test_try_get_extra_spec_with_empty_key(self):
|
||||||
st = self._create_share_type()
|
st = self._create_share_type()
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
@ -193,7 +193,7 @@ class ExtraSpecsAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.admin_shares_v2_client.get_share_type_extra_spec,
|
self.admin_shares_v2_client.get_share_type_extra_spec,
|
||||||
st["share_type"]["id"], "")
|
st["share_type"]["id"], "")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_get_extra_spec_with_invalid_key(self):
|
def test_try_get_extra_spec_with_invalid_key(self):
|
||||||
st = self._create_share_type()
|
st = self._create_share_type()
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
@ -201,35 +201,35 @@ class ExtraSpecsAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.admin_shares_v2_client.get_share_type_extra_spec,
|
self.admin_shares_v2_client.get_share_type_extra_spec,
|
||||||
st["share_type"]["id"], data_utils.rand_name("fake"))
|
st["share_type"]["id"], data_utils.rand_name("fake"))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_get_extra_specs_with_empty_shr_type_id(self):
|
def test_try_get_extra_specs_with_empty_shr_type_id(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.NotFound,
|
lib_exc.NotFound,
|
||||||
self.admin_shares_v2_client.get_share_type_extra_specs,
|
self.admin_shares_v2_client.get_share_type_extra_specs,
|
||||||
"")
|
"")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_get_extra_specs_with_invalid_shr_type_id(self):
|
def test_try_get_extra_specs_with_invalid_shr_type_id(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.NotFound,
|
lib_exc.NotFound,
|
||||||
self.admin_shares_v2_client.get_share_type_extra_specs,
|
self.admin_shares_v2_client.get_share_type_extra_specs,
|
||||||
data_utils.rand_name("fake"))
|
data_utils.rand_name("fake"))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_delete_es_key_with_empty_shr_type_id(self):
|
def test_try_delete_es_key_with_empty_shr_type_id(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.NotFound,
|
lib_exc.NotFound,
|
||||||
self.admin_shares_v2_client.delete_share_type_extra_spec,
|
self.admin_shares_v2_client.delete_share_type_extra_spec,
|
||||||
"", "key", )
|
"", "key", )
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_delete_es_key_with_invalid_shr_type_id(self):
|
def test_try_delete_es_key_with_invalid_shr_type_id(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.NotFound,
|
lib_exc.NotFound,
|
||||||
self.admin_shares_v2_client.delete_share_type_extra_spec,
|
self.admin_shares_v2_client.delete_share_type_extra_spec,
|
||||||
data_utils.rand_name("fake"), "key", )
|
data_utils.rand_name("fake"), "key", )
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_delete_with_invalid_key(self):
|
def test_try_delete_with_invalid_key(self):
|
||||||
st = self._create_share_type()
|
st = self._create_share_type()
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
@ -237,21 +237,21 @@ class ExtraSpecsAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.admin_shares_v2_client.delete_share_type_extra_spec,
|
self.admin_shares_v2_client.delete_share_type_extra_spec,
|
||||||
st["share_type"]["id"], data_utils.rand_name("fake"))
|
st["share_type"]["id"], data_utils.rand_name("fake"))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_update_spec_with_empty_shr_type_id(self):
|
def test_try_update_spec_with_empty_shr_type_id(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.NotFound,
|
lib_exc.NotFound,
|
||||||
self.admin_shares_v2_client.update_share_type_extra_spec,
|
self.admin_shares_v2_client.update_share_type_extra_spec,
|
||||||
"", "key", "new_value")
|
"", "key", "new_value")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_update_spec_with_invalid_shr_type_id(self):
|
def test_try_update_spec_with_invalid_shr_type_id(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.NotFound,
|
lib_exc.NotFound,
|
||||||
self.admin_shares_v2_client.update_share_type_extra_spec,
|
self.admin_shares_v2_client.update_share_type_extra_spec,
|
||||||
data_utils.rand_name("fake"), "key", "new_value")
|
data_utils.rand_name("fake"), "key", "new_value")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_update_spec_with_empty_key(self):
|
def test_try_update_spec_with_empty_key(self):
|
||||||
st = self._create_share_type()
|
st = self._create_share_type()
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
@ -259,14 +259,14 @@ class ExtraSpecsAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.admin_shares_v2_client.update_share_type_extra_spec,
|
self.admin_shares_v2_client.update_share_type_extra_spec,
|
||||||
st["share_type"]["id"], "", "new_value")
|
st["share_type"]["id"], "", "new_value")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_update_with_invalid_shr_type_id(self):
|
def test_try_update_with_invalid_shr_type_id(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.NotFound,
|
lib_exc.NotFound,
|
||||||
self.admin_shares_v2_client.update_share_type_extra_specs,
|
self.admin_shares_v2_client.update_share_type_extra_specs,
|
||||||
data_utils.rand_name("fake"), {"key": "new_value"})
|
data_utils.rand_name("fake"), {"key": "new_value"})
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_update_with_invalid_specs(self):
|
def test_try_update_with_invalid_specs(self):
|
||||||
st = self._create_share_type()
|
st = self._create_share_type()
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
@ -274,7 +274,7 @@ class ExtraSpecsAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.admin_shares_v2_client.update_share_type_extra_specs,
|
self.admin_shares_v2_client.update_share_type_extra_specs,
|
||||||
st["share_type"]["id"], {"": "new_value"})
|
st["share_type"]["id"], {"": "new_value"})
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_delete_spec_driver_handles_share_servers(self):
|
def test_try_delete_spec_driver_handles_share_servers(self):
|
||||||
st = self._create_share_type()
|
st = self._create_share_type()
|
||||||
|
|
||||||
@ -285,7 +285,7 @@ class ExtraSpecsAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
st["share_type"]["id"],
|
st["share_type"]["id"],
|
||||||
"driver_handles_share_servers")
|
"driver_handles_share_servers")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_delete_spec_snapshot_support(self):
|
def test_try_delete_spec_snapshot_support(self):
|
||||||
st = self._create_share_type()
|
st = self._create_share_type()
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -28,39 +28,39 @@ class ShareTypesAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
return self.create_share_type(
|
return self.create_share_type(
|
||||||
name, extra_specs=extra_specs, client=self.admin_shares_v2_client)
|
name, extra_specs=extra_specs, client=self.admin_shares_v2_client)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_create_share_with_nonexistent_share_type(self):
|
def test_create_share_with_nonexistent_share_type(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.admin_shares_v2_client.create_share,
|
self.admin_shares_v2_client.create_share,
|
||||||
share_type_id=data_utils.rand_name("fake"))
|
share_type_id=data_utils.rand_name("fake"))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_create_share_type_with_empty_name(self):
|
def test_create_share_type_with_empty_name(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.BadRequest,
|
lib_exc.BadRequest,
|
||||||
self.create_share_type, '',
|
self.create_share_type, '',
|
||||||
client=self.admin_shares_v2_client)
|
client=self.admin_shares_v2_client)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_create_share_type_with_too_big_name(self):
|
def test_create_share_type_with_too_big_name(self):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
self.create_share_type,
|
self.create_share_type,
|
||||||
"x" * 256,
|
"x" * 256,
|
||||||
client=self.admin_shares_v2_client)
|
client=self.admin_shares_v2_client)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_get_share_type_by_nonexistent_id(self):
|
def test_get_share_type_by_nonexistent_id(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.admin_shares_v2_client.get_share_type,
|
self.admin_shares_v2_client.get_share_type,
|
||||||
data_utils.rand_name("fake"))
|
data_utils.rand_name("fake"))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_delete_share_type_by_nonexistent_id(self):
|
def test_try_delete_share_type_by_nonexistent_id(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.admin_shares_v2_client.delete_share_type,
|
self.admin_shares_v2_client.delete_share_type,
|
||||||
data_utils.rand_name("fake"))
|
data_utils.rand_name("fake"))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_create_duplicate_of_share_type(self):
|
def test_try_create_duplicate_of_share_type(self):
|
||||||
st = self._create_share_type()
|
st = self._create_share_type()
|
||||||
self.assertRaises(lib_exc.Conflict,
|
self.assertRaises(lib_exc.Conflict,
|
||||||
@ -69,7 +69,7 @@ class ShareTypesAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
extra_specs=self.add_required_extra_specs_to_dict(),
|
extra_specs=self.add_required_extra_specs_to_dict(),
|
||||||
client=self.admin_shares_v2_client)
|
client=self.admin_shares_v2_client)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_add_share_type_allowed_for_public(self):
|
def test_add_share_type_allowed_for_public(self):
|
||||||
st = self._create_share_type()
|
st = self._create_share_type()
|
||||||
self.assertRaises(lib_exc.Conflict,
|
self.assertRaises(lib_exc.Conflict,
|
||||||
@ -77,7 +77,7 @@ class ShareTypesAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
st["share_type"]["id"],
|
st["share_type"]["id"],
|
||||||
self.admin_shares_v2_client.tenant_id)
|
self.admin_shares_v2_client.tenant_id)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_remove_share_type_allowed_for_public(self):
|
def test_remove_share_type_allowed_for_public(self):
|
||||||
st = self._create_share_type()
|
st = self._create_share_type()
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
@ -86,14 +86,14 @@ class ShareTypesAdminNegativeTest(base.BaseSharesMixedTest):
|
|||||||
st["share_type"]["id"],
|
st["share_type"]["id"],
|
||||||
self.admin_shares_v2_client.tenant_id)
|
self.admin_shares_v2_client.tenant_id)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_add_share_type_by_nonexistent_id(self):
|
def test_add_share_type_by_nonexistent_id(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.admin_shares_v2_client.add_access_to_share_type,
|
self.admin_shares_v2_client.add_access_to_share_type,
|
||||||
data_utils.rand_name("fake"),
|
data_utils.rand_name("fake"),
|
||||||
self.admin_shares_v2_client.tenant_id)
|
self.admin_shares_v2_client.tenant_id)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_remove_share_type_by_nonexistent_id(self):
|
def test_remove_share_type_by_nonexistent_id(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.NotFound,
|
lib_exc.NotFound,
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ class SharesActionsAdminTest(base.BaseSharesAdminTest):
|
|||||||
snapshot_id=cls.snap['id'],
|
snapshot_id=cls.snap['id'],
|
||||||
))
|
))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_get_share(self):
|
def test_get_share(self):
|
||||||
|
|
||||||
# get share
|
# get share
|
||||||
@ -106,7 +106,7 @@ class SharesActionsAdminTest(base.BaseSharesAdminTest):
|
|||||||
CONF.share.share_size, share["size"])
|
CONF.share.share_size, share["size"])
|
||||||
self.assertEqual(CONF.share.share_size, int(share["size"]), msg)
|
self.assertEqual(CONF.share.share_size, int(share["size"]), msg)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_shares(self):
|
def test_list_shares(self):
|
||||||
|
|
||||||
# list shares
|
# list shares
|
||||||
@ -122,7 +122,7 @@ class SharesActionsAdminTest(base.BaseSharesAdminTest):
|
|||||||
msg = "expected id lists %s times in share list" % (len(gen))
|
msg = "expected id lists %s times in share list" % (len(gen))
|
||||||
self.assertEqual(1, len(gen), msg)
|
self.assertEqual(1, len(gen), msg)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_shares_with_detail(self):
|
def test_list_shares_with_detail(self):
|
||||||
|
|
||||||
# list shares
|
# list shares
|
||||||
@ -142,7 +142,7 @@ class SharesActionsAdminTest(base.BaseSharesAdminTest):
|
|||||||
msg = "expected id lists %s times in share list" % (len(gen))
|
msg = "expected id lists %s times in share list" % (len(gen))
|
||||||
self.assertEqual(1, len(gen), msg)
|
self.assertEqual(1, len(gen), msg)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_shares_with_detail_filter_by_metadata(self):
|
def test_list_shares_with_detail_filter_by_metadata(self):
|
||||||
filters = {'metadata': self.metadata}
|
filters = {'metadata': self.metadata}
|
||||||
|
|
||||||
@ -157,7 +157,7 @@ class SharesActionsAdminTest(base.BaseSharesAdminTest):
|
|||||||
if CONF.share.run_snapshot_tests:
|
if CONF.share.run_snapshot_tests:
|
||||||
self.assertFalse(self.shares[1]['id'] in [s['id'] for s in shares])
|
self.assertFalse(self.shares[1]['id'] in [s['id'] for s in shares])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_shares_with_detail_filter_by_extra_specs(self):
|
def test_list_shares_with_detail_filter_by_extra_specs(self):
|
||||||
filters = {
|
filters = {
|
||||||
"extra_specs": {
|
"extra_specs": {
|
||||||
@ -190,7 +190,7 @@ class SharesActionsAdminTest(base.BaseSharesAdminTest):
|
|||||||
extra_specs = self.shares_client.get_share_type_extra_specs(st_id)
|
extra_specs = self.shares_client.get_share_type_extra_specs(st_id)
|
||||||
self.assertDictContainsSubset(filters["extra_specs"], extra_specs)
|
self.assertDictContainsSubset(filters["extra_specs"], extra_specs)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_shares_with_detail_filter_by_share_type_id(self):
|
def test_list_shares_with_detail_filter_by_share_type_id(self):
|
||||||
filters = {'share_type_id': self.st['share_type']['id']}
|
filters = {'share_type_id': self.st['share_type']['id']}
|
||||||
|
|
||||||
@ -220,7 +220,7 @@ class SharesActionsAdminTest(base.BaseSharesAdminTest):
|
|||||||
for share in self.shares:
|
for share in self.shares:
|
||||||
self.assertTrue(share['id'] in share_ids)
|
self.assertTrue(share['id'] in share_ids)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_shares_with_detail_filter_by_host(self):
|
def test_list_shares_with_detail_filter_by_host(self):
|
||||||
base_share = self.shares_client.get_share(self.shares[0]['id'])
|
base_share = self.shares_client.get_share(self.shares[0]['id'])
|
||||||
filters = {'host': base_share['host']}
|
filters = {'host': base_share['host']}
|
||||||
@ -233,7 +233,7 @@ class SharesActionsAdminTest(base.BaseSharesAdminTest):
|
|||||||
for share in shares:
|
for share in shares:
|
||||||
self.assertEqual(filters['host'], share['host'])
|
self.assertEqual(filters['host'], share['host'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipIf(
|
@testtools.skipIf(
|
||||||
not CONF.share.multitenancy_enabled, "Only for multitenancy.")
|
not CONF.share.multitenancy_enabled, "Only for multitenancy.")
|
||||||
def test_list_shares_with_detail_filter_by_share_network_id(self):
|
def test_list_shares_with_detail_filter_by_share_network_id(self):
|
||||||
@ -249,7 +249,7 @@ class SharesActionsAdminTest(base.BaseSharesAdminTest):
|
|||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
filters['share_network_id'], share['share_network_id'])
|
filters['share_network_id'], share['share_network_id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
def test_list_shares_with_detail_filter_by_snapshot_id(self):
|
def test_list_shares_with_detail_filter_by_snapshot_id(self):
|
||||||
@ -264,7 +264,7 @@ class SharesActionsAdminTest(base.BaseSharesAdminTest):
|
|||||||
self.assertEqual(filters['snapshot_id'], share['snapshot_id'])
|
self.assertEqual(filters['snapshot_id'], share['snapshot_id'])
|
||||||
self.assertFalse(self.shares[0]['id'] in [s['id'] for s in shares])
|
self.assertFalse(self.shares[0]['id'] in [s['id'] for s in shares])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_shares_with_detail_with_asc_sorting(self):
|
def test_list_shares_with_detail_with_asc_sorting(self):
|
||||||
filters = {'sort_key': 'created_at', 'sort_dir': 'asc'}
|
filters = {'sort_key': 'created_at', 'sort_dir': 'asc'}
|
||||||
|
|
||||||
@ -276,21 +276,21 @@ class SharesActionsAdminTest(base.BaseSharesAdminTest):
|
|||||||
sorted_list = [share['created_at'] for share in shares]
|
sorted_list = [share['created_at'] for share in shares]
|
||||||
self.assertEqual(sorted(sorted_list), sorted_list)
|
self.assertEqual(sorted(sorted_list), sorted_list)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_shares_with_detail_filter_by_existed_name(self):
|
def test_list_shares_with_detail_filter_by_existed_name(self):
|
||||||
# list shares by name, at least one share is expected
|
# list shares by name, at least one share is expected
|
||||||
params = {"name": self.share_name}
|
params = {"name": self.share_name}
|
||||||
shares = self.shares_client.list_shares_with_detail(params)
|
shares = self.shares_client.list_shares_with_detail(params)
|
||||||
self.assertEqual(self.share_name, shares[0]["name"])
|
self.assertEqual(self.share_name, shares[0]["name"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_shares_with_detail_filter_by_fake_name(self):
|
def test_list_shares_with_detail_filter_by_fake_name(self):
|
||||||
# list shares by fake name, no shares are expected
|
# list shares by fake name, no shares are expected
|
||||||
params = {"name": data_utils.rand_name("fake-nonexistent-name")}
|
params = {"name": data_utils.rand_name("fake-nonexistent-name")}
|
||||||
shares = self.shares_client.list_shares_with_detail(params)
|
shares = self.shares_client.list_shares_with_detail(params)
|
||||||
self.assertEqual(0, len(shares))
|
self.assertEqual(0, len(shares))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_shares_with_detail_filter_by_active_status(self):
|
def test_list_shares_with_detail_filter_by_active_status(self):
|
||||||
# list shares by active status, at least one share is expected
|
# list shares by active status, at least one share is expected
|
||||||
params = {"status": "available"}
|
params = {"status": "available"}
|
||||||
@ -299,14 +299,14 @@ class SharesActionsAdminTest(base.BaseSharesAdminTest):
|
|||||||
for share in shares:
|
for share in shares:
|
||||||
self.assertEqual(params["status"], share["status"])
|
self.assertEqual(params["status"], share["status"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_shares_with_detail_filter_by_fake_status(self):
|
def test_list_shares_with_detail_filter_by_fake_status(self):
|
||||||
# list shares by fake status, no shares are expected
|
# list shares by fake status, no shares are expected
|
||||||
params = {"status": 'fake'}
|
params = {"status": 'fake'}
|
||||||
shares = self.shares_client.list_shares_with_detail(params)
|
shares = self.shares_client.list_shares_with_detail(params)
|
||||||
self.assertEqual(0, len(shares))
|
self.assertEqual(0, len(shares))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
def test_get_snapshot(self):
|
def test_get_snapshot(self):
|
||||||
@ -334,7 +334,7 @@ class SharesActionsAdminTest(base.BaseSharesAdminTest):
|
|||||||
"actual share_id: '%s'" % (self.shares[0]["id"], get["share_id"])
|
"actual share_id: '%s'" % (self.shares[0]["id"], get["share_id"])
|
||||||
self.assertEqual(self.shares[0]["id"], get["share_id"], msg)
|
self.assertEqual(self.shares[0]["id"], get["share_id"], msg)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
def test_list_snapshots(self):
|
def test_list_snapshots(self):
|
||||||
@ -351,7 +351,7 @@ class SharesActionsAdminTest(base.BaseSharesAdminTest):
|
|||||||
msg = "expected id lists %s times in share list" % (len(gen))
|
msg = "expected id lists %s times in share list" % (len(gen))
|
||||||
self.assertEqual(1, len(gen), msg)
|
self.assertEqual(1, len(gen), msg)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
def test_list_snapshots_with_detail(self):
|
def test_list_snapshots_with_detail(self):
|
||||||
|
@ -18,8 +18,8 @@ import six
|
|||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
from manila_tempest_tests import utils
|
from manila_tempest_tests import utils
|
||||||
@ -121,7 +121,7 @@ class ManageNFSSnapshotTest(base.BaseSharesAdminTest):
|
|||||||
self.shares_v2_client.get_snapshot,
|
self.shares_v2_client.get_snapshot,
|
||||||
get_snapshot['id'])
|
get_snapshot['id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
@ddt.data('2.12', '2.16', CONF.share.max_api_microversion)
|
@ddt.data('2.12', '2.16', CONF.share.max_api_microversion)
|
||||||
def test_manage_different_versions(self, version):
|
def test_manage_different_versions(self, version):
|
||||||
"""Run snapshot manage test for multiple versions.
|
"""Run snapshot manage test for multiple versions.
|
||||||
|
@ -17,8 +17,8 @@ import six
|
|||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ class ManageNFSSnapshotNegativeTest(base.BaseSharesAdminTest):
|
|||||||
share_protocol=cls.protocol
|
share_protocol=cls.protocol
|
||||||
)
|
)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_manage_not_found(self):
|
def test_manage_not_found(self):
|
||||||
# Manage snapshot fails
|
# Manage snapshot fails
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
@ -71,7 +71,7 @@ class ManageNFSSnapshotNegativeTest(base.BaseSharesAdminTest):
|
|||||||
'fake-vol-snap-id',
|
'fake-vol-snap-id',
|
||||||
driver_options={})
|
driver_options={})
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_manage_already_exists(self):
|
def test_manage_already_exists(self):
|
||||||
# Manage already existing snapshot fails
|
# Manage already existing snapshot fails
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -28,14 +28,14 @@ class AvailabilityZonesTest(base.BaseSharesTest):
|
|||||||
for key in keys:
|
for key in keys:
|
||||||
self.assertIn(key, az)
|
self.assertIn(key, az)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_list_availability_zones_legacy_url_api_v1(self):
|
def test_list_availability_zones_legacy_url_api_v1(self):
|
||||||
# NOTE(vponomaryov): remove this test with removal of availability zone
|
# NOTE(vponomaryov): remove this test with removal of availability zone
|
||||||
# extension url support.
|
# extension url support.
|
||||||
azs = self.shares_client.list_availability_zones()
|
azs = self.shares_client.list_availability_zones()
|
||||||
self._list_availability_zones_assertions(azs)
|
self._list_availability_zones_assertions(azs)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
@base.skip_if_microversion_not_supported("2.6")
|
@base.skip_if_microversion_not_supported("2.6")
|
||||||
def test_list_availability_zones_legacy_url_api_v2(self):
|
def test_list_availability_zones_legacy_url_api_v2(self):
|
||||||
# NOTE(vponomaryov): remove this test with removal of availability zone
|
# NOTE(vponomaryov): remove this test with removal of availability zone
|
||||||
@ -44,7 +44,7 @@ class AvailabilityZonesTest(base.BaseSharesTest):
|
|||||||
url='os-availability-zone', version='2.6')
|
url='os-availability-zone', version='2.6')
|
||||||
self._list_availability_zones_assertions(azs)
|
self._list_availability_zones_assertions(azs)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
@base.skip_if_microversion_not_supported("2.7")
|
@base.skip_if_microversion_not_supported("2.7")
|
||||||
def test_list_availability_zones(self):
|
def test_list_availability_zones(self):
|
||||||
azs = self.shares_v2_client.list_availability_zones(version='2.7')
|
azs = self.shares_v2_client.list_availability_zones(version='2.7')
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ from manila_tempest_tests.tests.api import base
|
|||||||
@base.skip_if_microversion_not_supported("2.7")
|
@base.skip_if_microversion_not_supported("2.7")
|
||||||
class AvailabilityZonesNegativeTest(base.BaseSharesTest):
|
class AvailabilityZonesNegativeTest(base.BaseSharesTest):
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_list_availability_zones_api_not_found_with_legacy_url(self):
|
def test_list_availability_zones_api_not_found_with_legacy_url(self):
|
||||||
# NOTE(vponomaryov): remove this test with removal of availability zone
|
# NOTE(vponomaryov): remove this test with removal of availability zone
|
||||||
# extension url support.
|
# extension url support.
|
||||||
@ -33,7 +33,7 @@ class AvailabilityZonesNegativeTest(base.BaseSharesTest):
|
|||||||
version='2.7',
|
version='2.7',
|
||||||
)
|
)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_list_availability_zones_api_not_found(self):
|
def test_list_availability_zones_api_not_found(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.NotFound,
|
lib_exc.NotFound,
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
|
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ class ConsistencyGroupActionsTest(base.BaseSharesTest):
|
|||||||
cls.cgsnapshot2 = cls.create_cgsnapshot_wait_for_active(
|
cls.cgsnapshot2 = cls.create_cgsnapshot_wait_for_active(
|
||||||
cls.cg2['id'], name=cls.cgsnap_name, description=cls.cgsnap_desc)
|
cls.cg2['id'], name=cls.cgsnap_name, description=cls.cgsnap_desc)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_get_consistency_group_v2_4(self):
|
def test_get_consistency_group_v2_4(self):
|
||||||
|
|
||||||
# Get consistency group
|
# Get consistency group
|
||||||
@ -105,7 +105,7 @@ class ConsistencyGroupActionsTest(base.BaseSharesTest):
|
|||||||
self.assertEqual(self.cg_desc, str(consistency_group["description"]),
|
self.assertEqual(self.cg_desc, str(consistency_group["description"]),
|
||||||
msg)
|
msg)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_get_share_v2_4(self):
|
def test_get_share_v2_4(self):
|
||||||
|
|
||||||
# Get share
|
# Get share
|
||||||
@ -141,7 +141,7 @@ class ConsistencyGroupActionsTest(base.BaseSharesTest):
|
|||||||
self.cg["id"], share["consistency_group_id"])
|
self.cg["id"], share["consistency_group_id"])
|
||||||
self.assertEqual(self.cg["id"], share["consistency_group_id"], msg)
|
self.assertEqual(self.cg["id"], share["consistency_group_id"], msg)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_consistency_groups_v2_4(self):
|
def test_list_consistency_groups_v2_4(self):
|
||||||
|
|
||||||
# List consistency groups
|
# List consistency groups
|
||||||
@ -160,7 +160,7 @@ class ConsistencyGroupActionsTest(base.BaseSharesTest):
|
|||||||
cg_id)
|
cg_id)
|
||||||
self.assertEqual(1, len(gen), msg)
|
self.assertEqual(1, len(gen), msg)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_consistency_groups_with_detail_v2_4(self):
|
def test_list_consistency_groups_with_detail_v2_4(self):
|
||||||
|
|
||||||
# List consistency groups
|
# List consistency groups
|
||||||
@ -179,7 +179,7 @@ class ConsistencyGroupActionsTest(base.BaseSharesTest):
|
|||||||
cg_id)
|
cg_id)
|
||||||
self.assertEqual(1, len(gen), msg)
|
self.assertEqual(1, len(gen), msg)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_filter_shares_by_consistency_group_id_v2_4(self):
|
def test_filter_shares_by_consistency_group_id_v2_4(self):
|
||||||
|
|
||||||
shares = self.shares_v2_client.list_shares(
|
shares = self.shares_v2_client.list_shares(
|
||||||
@ -200,7 +200,7 @@ class ConsistencyGroupActionsTest(base.BaseSharesTest):
|
|||||||
'Share %s expected in returned list, but got %s'
|
'Share %s expected in returned list, but got %s'
|
||||||
% (self.shares[0]['id'], share_ids))
|
% (self.shares[0]['id'], share_ids))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_get_cgsnapshot_v2_4(self):
|
def test_get_cgsnapshot_v2_4(self):
|
||||||
|
|
||||||
# Get consistency group
|
# Get consistency group
|
||||||
@ -226,7 +226,7 @@ class ConsistencyGroupActionsTest(base.BaseSharesTest):
|
|||||||
self.assertEqual(self.cg_desc, str(consistency_group["description"]),
|
self.assertEqual(self.cg_desc, str(consistency_group["description"]),
|
||||||
msg)
|
msg)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_get_cgsnapshot_members_v2_4(self):
|
def test_get_cgsnapshot_members_v2_4(self):
|
||||||
|
|
||||||
cgsnapshot_members = self.shares_v2_client.list_cgsnapshot_members(
|
cgsnapshot_members = self.shares_v2_client.list_cgsnapshot_members(
|
||||||
@ -251,7 +251,7 @@ class ConsistencyGroupActionsTest(base.BaseSharesTest):
|
|||||||
# self.assertEqual(share['share_type'],
|
# self.assertEqual(share['share_type'],
|
||||||
# member['share_type_id'])
|
# member['share_type_id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
def test_create_consistency_group_from_populated_cgsnapshot_v2_4(self):
|
def test_create_consistency_group_from_populated_cgsnapshot_v2_4(self):
|
||||||
|
|
||||||
cgsnapshot_members = self.shares_v2_client.list_cgsnapshot_members(
|
cgsnapshot_members = self.shares_v2_client.list_cgsnapshot_members(
|
||||||
@ -319,7 +319,7 @@ class ConsistencyGroupRenameTest(base.BaseSharesTest):
|
|||||||
description=cls.cg_desc,
|
description=cls.cg_desc,
|
||||||
)
|
)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_update_consistency_group_v2_4(self):
|
def test_update_consistency_group_v2_4(self):
|
||||||
|
|
||||||
# Get consistency_group
|
# Get consistency_group
|
||||||
@ -346,7 +346,7 @@ class ConsistencyGroupRenameTest(base.BaseSharesTest):
|
|||||||
self.assertEqual(new_name, consistency_group["name"])
|
self.assertEqual(new_name, consistency_group["name"])
|
||||||
self.assertEqual(new_desc, consistency_group["description"])
|
self.assertEqual(new_desc, consistency_group["description"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_create_update_read_consistency_group_with_unicode_v2_4(self):
|
def test_create_update_read_consistency_group_with_unicode_v2_4(self):
|
||||||
value1 = u'ಠ_ಠ'
|
value1 = u'ಠ_ಠ'
|
||||||
value2 = u'ಠ_ರೃ'
|
value2 = u'ಠ_ರೃ'
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ CGSNAPSHOT_REQUIRED_ELEMENTS = {"id", "name", "description", "created_at",
|
|||||||
class ConsistencyGroupsTest(base.BaseSharesTest):
|
class ConsistencyGroupsTest(base.BaseSharesTest):
|
||||||
"""Covers consistency group functionality."""
|
"""Covers consistency group functionality."""
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
def test_create_populate_delete_consistency_group_v2_4(self):
|
def test_create_populate_delete_consistency_group_v2_4(self):
|
||||||
# Create a consistency group
|
# Create a consistency group
|
||||||
consistency_group = self.create_consistency_group(
|
consistency_group = self.create_consistency_group(
|
||||||
@ -65,7 +65,7 @@ class ConsistencyGroupsTest(base.BaseSharesTest):
|
|||||||
self.shares_client.get_share,
|
self.shares_client.get_share,
|
||||||
share['id'])
|
share['id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_create_delete_empty_cgsnapshot_v2_4(self):
|
def test_create_delete_empty_cgsnapshot_v2_4(self):
|
||||||
# Create base consistency group
|
# Create base consistency group
|
||||||
consistency_group = self.create_consistency_group(
|
consistency_group = self.create_consistency_group(
|
||||||
@ -98,7 +98,7 @@ class ConsistencyGroupsTest(base.BaseSharesTest):
|
|||||||
cgsnapshot['id'],
|
cgsnapshot['id'],
|
||||||
version='2.4')
|
version='2.4')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_create_consistency_group_from_empty_cgsnapshot(self):
|
def test_create_consistency_group_from_empty_cgsnapshot(self):
|
||||||
# Create base consistency group
|
# Create base consistency group
|
||||||
consistency_group = self.create_consistency_group(
|
consistency_group = self.create_consistency_group(
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -28,21 +28,21 @@ CONF = config.CONF
|
|||||||
'Consistency Group tests disabled.')
|
'Consistency Group tests disabled.')
|
||||||
class ConsistencyGroupsAPIOnlyNegativeTest(base.BaseSharesTest):
|
class ConsistencyGroupsAPIOnlyNegativeTest(base.BaseSharesTest):
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_delete_cg_without_passing_cg_id_v2_4(self):
|
def test_delete_cg_without_passing_cg_id_v2_4(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.shares_v2_client.delete_consistency_group,
|
self.shares_v2_client.delete_consistency_group,
|
||||||
'',
|
'',
|
||||||
version='2.4')
|
version='2.4')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_delete_cg_with_wrong_id_v2_4(self):
|
def test_delete_cg_with_wrong_id_v2_4(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.shares_v2_client.delete_consistency_group,
|
self.shares_v2_client.delete_consistency_group,
|
||||||
"wrong_consistency_group_id",
|
"wrong_consistency_group_id",
|
||||||
version='2.4')
|
version='2.4')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_update_cg_with_wrong_id_v2_4(self):
|
def test_update_cg_with_wrong_id_v2_4(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.shares_v2_client.update_consistency_group,
|
self.shares_v2_client.update_consistency_group,
|
||||||
@ -51,14 +51,14 @@ class ConsistencyGroupsAPIOnlyNegativeTest(base.BaseSharesTest):
|
|||||||
description='new_description',
|
description='new_description',
|
||||||
version='2.4')
|
version='2.4')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_get_cg_without_passing_cg_id_v2_4(self):
|
def test_get_cg_without_passing_cg_id_v2_4(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.shares_v2_client.get_consistency_group,
|
self.shares_v2_client.get_consistency_group,
|
||||||
'',
|
'',
|
||||||
version='2.4')
|
version='2.4')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_filter_shares_on_invalid_cg_id_v2_4(self):
|
def test_filter_shares_on_invalid_cg_id_v2_4(self):
|
||||||
shares = self.shares_v2_client.list_shares(
|
shares = self.shares_v2_client.list_shares(
|
||||||
detailed=True,
|
detailed=True,
|
||||||
@ -70,7 +70,7 @@ class ConsistencyGroupsAPIOnlyNegativeTest(base.BaseSharesTest):
|
|||||||
'Incorrect number of shares returned. Expected 0, '
|
'Incorrect number of shares returned. Expected 0, '
|
||||||
'got %s.' % len(shares))
|
'got %s.' % len(shares))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_create_cgsnapshot_with_invalid_cg_id_value_v2_4(self):
|
def test_create_cgsnapshot_with_invalid_cg_id_value_v2_4(self):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
self.create_cgsnapshot_wait_for_active,
|
self.create_cgsnapshot_wait_for_active,
|
||||||
@ -78,7 +78,7 @@ class ConsistencyGroupsAPIOnlyNegativeTest(base.BaseSharesTest):
|
|||||||
cleanup_in_class=False,
|
cleanup_in_class=False,
|
||||||
version='2.4')
|
version='2.4')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_create_cg_with_invalid_share_type_id_value_v2_4(self):
|
def test_create_cg_with_invalid_share_type_id_value_v2_4(self):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
self.create_consistency_group,
|
self.create_consistency_group,
|
||||||
@ -86,7 +86,7 @@ class ConsistencyGroupsAPIOnlyNegativeTest(base.BaseSharesTest):
|
|||||||
cleanup_in_class=False,
|
cleanup_in_class=False,
|
||||||
version='2.4')
|
version='2.4')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_create_cg_with_invalid_share_network_id_value_v2_4(self):
|
def test_create_cg_with_invalid_share_network_id_value_v2_4(self):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
self.create_consistency_group,
|
self.create_consistency_group,
|
||||||
@ -94,7 +94,7 @@ class ConsistencyGroupsAPIOnlyNegativeTest(base.BaseSharesTest):
|
|||||||
cleanup_in_class=False,
|
cleanup_in_class=False,
|
||||||
version='2.4')
|
version='2.4')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_create_cg_with_invalid_source_cgsnapshot_id_value_v2_4(
|
def test_create_cg_with_invalid_source_cgsnapshot_id_value_v2_4(
|
||||||
self):
|
self):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
@ -134,7 +134,7 @@ class ConsistencyGroupsNegativeTest(base.BaseSharesTest):
|
|||||||
name=cls.cgsnap_name,
|
name=cls.cgsnap_name,
|
||||||
description=cls.cgsnap_desc)
|
description=cls.cgsnap_desc)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_create_cg_with_nonexistent_source_cgsnapshot_id_value_v2_4(self):
|
def test_create_cg_with_nonexistent_source_cgsnapshot_id_value_v2_4(self):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
self.create_consistency_group,
|
self.create_consistency_group,
|
||||||
@ -142,7 +142,7 @@ class ConsistencyGroupsNegativeTest(base.BaseSharesTest):
|
|||||||
cleanup_in_class=False,
|
cleanup_in_class=False,
|
||||||
version='2.4')
|
version='2.4')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_create_cg_with_nonexistent_share_network_id_value_v2_4(self):
|
def test_create_cg_with_nonexistent_share_network_id_value_v2_4(self):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
self.create_consistency_group,
|
self.create_consistency_group,
|
||||||
@ -150,7 +150,7 @@ class ConsistencyGroupsNegativeTest(base.BaseSharesTest):
|
|||||||
cleanup_in_class=False,
|
cleanup_in_class=False,
|
||||||
version='2.4')
|
version='2.4')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_create_cg_with_nonexistent_share_type_id_value_v2_4(self):
|
def test_create_cg_with_nonexistent_share_type_id_value_v2_4(self):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
self.create_consistency_group,
|
self.create_consistency_group,
|
||||||
@ -158,7 +158,7 @@ class ConsistencyGroupsNegativeTest(base.BaseSharesTest):
|
|||||||
cleanup_in_class=False,
|
cleanup_in_class=False,
|
||||||
version='2.4')
|
version='2.4')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_create_cgsnapshot_with_nonexistent_cg_id_value_v2_4(self):
|
def test_create_cgsnapshot_with_nonexistent_cg_id_value_v2_4(self):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
self.create_cgsnapshot_wait_for_active,
|
self.create_cgsnapshot_wait_for_active,
|
||||||
@ -166,7 +166,7 @@ class ConsistencyGroupsNegativeTest(base.BaseSharesTest):
|
|||||||
cleanup_in_class=False,
|
cleanup_in_class=False,
|
||||||
version='2.4')
|
version='2.4')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_delete_cg_in_use_by_cgsnapshot_v2_4(self):
|
def test_delete_cg_in_use_by_cgsnapshot_v2_4(self):
|
||||||
# Attempt delete of share type
|
# Attempt delete of share type
|
||||||
self.assertRaises(lib_exc.Conflict,
|
self.assertRaises(lib_exc.Conflict,
|
||||||
@ -174,7 +174,7 @@ class ConsistencyGroupsNegativeTest(base.BaseSharesTest):
|
|||||||
self.consistency_group['id'],
|
self.consistency_group['id'],
|
||||||
version='2.4')
|
version='2.4')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_delete_share_in_use_by_cgsnapshot_v2_4(self):
|
def test_delete_share_in_use_by_cgsnapshot_v2_4(self):
|
||||||
# Attempt delete of share type
|
# Attempt delete of share type
|
||||||
params = {'consistency_group_id': self.share['consistency_group_id']}
|
params = {'consistency_group_id': self.share['consistency_group_id']}
|
||||||
@ -184,7 +184,7 @@ class ConsistencyGroupsNegativeTest(base.BaseSharesTest):
|
|||||||
params=params,
|
params=params,
|
||||||
version='2.4')
|
version='2.4')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_delete_cg_containing_a_share_v2_4(self):
|
def test_delete_cg_containing_a_share_v2_4(self):
|
||||||
self.assertRaises(lib_exc.Conflict,
|
self.assertRaises(lib_exc.Conflict,
|
||||||
self.shares_v2_client.delete_consistency_group,
|
self.shares_v2_client.delete_consistency_group,
|
||||||
@ -195,7 +195,7 @@ class ConsistencyGroupsNegativeTest(base.BaseSharesTest):
|
|||||||
self.consistency_group['id'], version='2.4')
|
self.consistency_group['id'], version='2.4')
|
||||||
self.assertEqual('available', cg['status'])
|
self.assertEqual('available', cg['status'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_filter_shares_on_nonexistent_cg_id_v2_4(self):
|
def test_filter_shares_on_nonexistent_cg_id_v2_4(self):
|
||||||
shares = self.shares_v2_client.list_shares(
|
shares = self.shares_v2_client.list_shares(
|
||||||
detailed=True,
|
detailed=True,
|
||||||
@ -207,7 +207,7 @@ class ConsistencyGroupsNegativeTest(base.BaseSharesTest):
|
|||||||
'Incorrect number of shares returned. Expected 0, '
|
'Incorrect number of shares returned. Expected 0, '
|
||||||
'got %s.' % len(shares))
|
'got %s.' % len(shares))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_filter_shares_on_empty_cg_id_v2_4(self):
|
def test_filter_shares_on_empty_cg_id_v2_4(self):
|
||||||
consistency_group = self.create_consistency_group(
|
consistency_group = self.create_consistency_group(
|
||||||
name='tempest_cg',
|
name='tempest_cg',
|
||||||
|
@ -13,14 +13,14 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
|
|
||||||
class ExtensionsTest(base.BaseSharesTest):
|
class ExtensionsTest(base.BaseSharesTest):
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_extensions(self):
|
def test_extensions(self):
|
||||||
|
|
||||||
# get extensions
|
# get extensions
|
||||||
|
@ -13,14 +13,14 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
|
|
||||||
class ShareLimitsTest(base.BaseSharesTest):
|
class ShareLimitsTest(base.BaseSharesTest):
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_limits_keys(self):
|
def test_limits_keys(self):
|
||||||
|
|
||||||
# list limits
|
# list limits
|
||||||
@ -44,7 +44,7 @@ class ShareLimitsTest(base.BaseSharesTest):
|
|||||||
]
|
]
|
||||||
[self.assertIn(key, limits["absolute"].keys()) for key in abs_keys]
|
[self.assertIn(key, limits["absolute"].keys()) for key in abs_keys]
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_limits_values(self):
|
def test_limits_values(self):
|
||||||
|
|
||||||
# list limits
|
# list limits
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ class SharesMetadataTest(base.BaseSharesTest):
|
|||||||
super(SharesMetadataTest, cls).resource_setup()
|
super(SharesMetadataTest, cls).resource_setup()
|
||||||
cls.share = cls.create_share()
|
cls.share = cls.create_share()
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_set_metadata_in_share_creation(self):
|
def test_set_metadata_in_share_creation(self):
|
||||||
|
|
||||||
md = {u"key1": u"value1", u"key2": u"value2", }
|
md = {u"key1": u"value1", u"key2": u"value2", }
|
||||||
@ -39,7 +39,7 @@ class SharesMetadataTest(base.BaseSharesTest):
|
|||||||
# verify metadata
|
# verify metadata
|
||||||
self.assertEqual(md, metadata)
|
self.assertEqual(md, metadata)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_set_get_delete_metadata(self):
|
def test_set_get_delete_metadata(self):
|
||||||
|
|
||||||
md = {u"key3": u"value3", u"key4": u"value4", }
|
md = {u"key3": u"value3", u"key4": u"value4", }
|
||||||
@ -64,7 +64,7 @@ class SharesMetadataTest(base.BaseSharesTest):
|
|||||||
get_metadata = self.shares_client.get_metadata(share["id"])
|
get_metadata = self.shares_client.get_metadata(share["id"])
|
||||||
self.assertEqual({}, get_metadata)
|
self.assertEqual({}, get_metadata)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_set_and_update_metadata_by_key(self):
|
def test_set_and_update_metadata_by_key(self):
|
||||||
|
|
||||||
md1 = {u"key5": u"value5", u"key6": u"value6", }
|
md1 = {u"key5": u"value5", u"key6": u"value6", }
|
||||||
@ -85,7 +85,7 @@ class SharesMetadataTest(base.BaseSharesTest):
|
|||||||
# verify metadata
|
# verify metadata
|
||||||
self.assertEqual(md2, get_md)
|
self.assertEqual(md2, get_md)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_set_metadata_min_size_key(self):
|
def test_set_metadata_min_size_key(self):
|
||||||
data = {"k": "value"}
|
data = {"k": "value"}
|
||||||
|
|
||||||
@ -94,7 +94,7 @@ class SharesMetadataTest(base.BaseSharesTest):
|
|||||||
body_get = self.shares_client.get_metadata(self.share["id"])
|
body_get = self.shares_client.get_metadata(self.share["id"])
|
||||||
self.assertEqual(data['k'], body_get.get('k'))
|
self.assertEqual(data['k'], body_get.get('k'))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_set_metadata_max_size_key(self):
|
def test_set_metadata_max_size_key(self):
|
||||||
max_key = "k" * 255
|
max_key = "k" * 255
|
||||||
data = {max_key: "value"}
|
data = {max_key: "value"}
|
||||||
@ -105,7 +105,7 @@ class SharesMetadataTest(base.BaseSharesTest):
|
|||||||
self.assertIn(max_key, body_get)
|
self.assertIn(max_key, body_get)
|
||||||
self.assertEqual(data[max_key], body_get.get(max_key))
|
self.assertEqual(data[max_key], body_get.get(max_key))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_set_metadata_min_size_value(self):
|
def test_set_metadata_min_size_value(self):
|
||||||
data = {"key": "v"}
|
data = {"key": "v"}
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ class SharesMetadataTest(base.BaseSharesTest):
|
|||||||
body_get = self.shares_client.get_metadata(self.share["id"])
|
body_get = self.shares_client.get_metadata(self.share["id"])
|
||||||
self.assertEqual(data['key'], body_get['key'])
|
self.assertEqual(data['key'], body_get['key'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_set_metadata_max_size_value(self):
|
def test_set_metadata_max_size_value(self):
|
||||||
max_value = "v" * 1023
|
max_value = "v" * 1023
|
||||||
data = {"key": max_value}
|
data = {"key": max_value}
|
||||||
@ -124,7 +124,7 @@ class SharesMetadataTest(base.BaseSharesTest):
|
|||||||
body_get = self.shares_client.get_metadata(self.share["id"])
|
body_get = self.shares_client.get_metadata(self.share["id"])
|
||||||
self.assertEqual(data['key'], body_get['key'])
|
self.assertEqual(data['key'], body_get['key'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_upd_metadata_min_size_key(self):
|
def test_upd_metadata_min_size_key(self):
|
||||||
data = {"k": "value"}
|
data = {"k": "value"}
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ class SharesMetadataTest(base.BaseSharesTest):
|
|||||||
body_get = self.shares_client.get_metadata(self.share["id"])
|
body_get = self.shares_client.get_metadata(self.share["id"])
|
||||||
self.assertEqual(data, body_get)
|
self.assertEqual(data, body_get)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_upd_metadata_max_size_key(self):
|
def test_upd_metadata_max_size_key(self):
|
||||||
max_key = "k" * 255
|
max_key = "k" * 255
|
||||||
data = {max_key: "value"}
|
data = {max_key: "value"}
|
||||||
@ -143,7 +143,7 @@ class SharesMetadataTest(base.BaseSharesTest):
|
|||||||
body_get = self.shares_client.get_metadata(self.share["id"])
|
body_get = self.shares_client.get_metadata(self.share["id"])
|
||||||
self.assertEqual(data, body_get)
|
self.assertEqual(data, body_get)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_upd_metadata_min_size_value(self):
|
def test_upd_metadata_min_size_value(self):
|
||||||
data = {"key": "v"}
|
data = {"key": "v"}
|
||||||
|
|
||||||
@ -152,7 +152,7 @@ class SharesMetadataTest(base.BaseSharesTest):
|
|||||||
body_get = self.shares_client.get_metadata(self.share["id"])
|
body_get = self.shares_client.get_metadata(self.share["id"])
|
||||||
self.assertEqual(data, body_get)
|
self.assertEqual(data, body_get)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_upd_metadata_max_size_value(self):
|
def test_upd_metadata_max_size_value(self):
|
||||||
max_value = "v" * 1023
|
max_value = "v" * 1023
|
||||||
data = {"key": max_value}
|
data = {"key": max_value}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
import ddt
|
import ddt
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ from manila_tempest_tests.tests.api import base
|
|||||||
@ddt.ddt
|
@ddt.ddt
|
||||||
class SharesMetadataAPIOnlyNegativeTest(base.BaseSharesTest):
|
class SharesMetadataAPIOnlyNegativeTest(base.BaseSharesTest):
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
@ddt.data(True, False)
|
@ddt.data(True, False)
|
||||||
def test_try_set_metadata_to_unexisting_share(self, is_v2_client):
|
def test_try_set_metadata_to_unexisting_share(self, is_v2_client):
|
||||||
md = {u"key1": u"value1", u"key2": u"value2", }
|
md = {u"key1": u"value1", u"key2": u"value2", }
|
||||||
@ -32,7 +32,7 @@ class SharesMetadataAPIOnlyNegativeTest(base.BaseSharesTest):
|
|||||||
client.set_metadata,
|
client.set_metadata,
|
||||||
"wrong_share_id", md)
|
"wrong_share_id", md)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
@ddt.data(True, False)
|
@ddt.data(True, False)
|
||||||
def test_try_update_all_metadata_for_unexisting_share(self, is_v2_client):
|
def test_try_update_all_metadata_for_unexisting_share(self, is_v2_client):
|
||||||
md = {u"key1": u"value1", u"key2": u"value2", }
|
md = {u"key1": u"value1", u"key2": u"value2", }
|
||||||
@ -49,19 +49,19 @@ class SharesMetadataNegativeTest(base.BaseSharesTest):
|
|||||||
super(SharesMetadataNegativeTest, cls).resource_setup()
|
super(SharesMetadataNegativeTest, cls).resource_setup()
|
||||||
cls.share = cls.create_share()
|
cls.share = cls.create_share()
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_try_set_metadata_with_empty_key(self):
|
def test_try_set_metadata_with_empty_key(self):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
self.shares_client.set_metadata,
|
self.shares_client.set_metadata,
|
||||||
self.share["id"], {"": "value"})
|
self.share["id"], {"": "value"})
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_try_upd_metadata_with_empty_key(self):
|
def test_try_upd_metadata_with_empty_key(self):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
self.shares_client.update_all_metadata,
|
self.shares_client.update_all_metadata,
|
||||||
self.share["id"], {"": "value"})
|
self.share["id"], {"": "value"})
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_try_set_metadata_with_too_big_key(self):
|
def test_try_set_metadata_with_too_big_key(self):
|
||||||
too_big_key = "x" * 256
|
too_big_key = "x" * 256
|
||||||
md = {too_big_key: "value"}
|
md = {too_big_key: "value"}
|
||||||
@ -69,7 +69,7 @@ class SharesMetadataNegativeTest(base.BaseSharesTest):
|
|||||||
self.shares_client.set_metadata,
|
self.shares_client.set_metadata,
|
||||||
self.share["id"], md)
|
self.share["id"], md)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_try_upd_metadata_with_too_big_key(self):
|
def test_try_upd_metadata_with_too_big_key(self):
|
||||||
too_big_key = "x" * 256
|
too_big_key = "x" * 256
|
||||||
md = {too_big_key: "value"}
|
md = {too_big_key: "value"}
|
||||||
@ -77,7 +77,7 @@ class SharesMetadataNegativeTest(base.BaseSharesTest):
|
|||||||
self.shares_client.update_all_metadata,
|
self.shares_client.update_all_metadata,
|
||||||
self.share["id"], md)
|
self.share["id"], md)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_try_set_metadata_with_too_big_value(self):
|
def test_try_set_metadata_with_too_big_value(self):
|
||||||
too_big_value = "x" * 1024
|
too_big_value = "x" * 1024
|
||||||
md = {"key": too_big_value}
|
md = {"key": too_big_value}
|
||||||
@ -85,7 +85,7 @@ class SharesMetadataNegativeTest(base.BaseSharesTest):
|
|||||||
self.shares_client.set_metadata,
|
self.shares_client.set_metadata,
|
||||||
self.share["id"], md)
|
self.share["id"], md)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_try_upd_metadata_with_too_big_value(self):
|
def test_try_upd_metadata_with_too_big_value(self):
|
||||||
too_big_value = "x" * 1024
|
too_big_value = "x" * 1024
|
||||||
md = {"key": too_big_value}
|
md = {"key": too_big_value}
|
||||||
@ -93,7 +93,7 @@ class SharesMetadataNegativeTest(base.BaseSharesTest):
|
|||||||
self.shares_client.update_all_metadata,
|
self.shares_client.update_all_metadata,
|
||||||
self.share["id"], md)
|
self.share["id"], md)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_try_delete_unexisting_metadata(self):
|
def test_try_delete_unexisting_metadata(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.shares_client.delete_metadata,
|
self.shares_client.delete_metadata,
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ class MicroversionsTest(base.BaseSharesTest):
|
|||||||
Sends HTTP GET requests to the version API to validate microversions.
|
Sends HTTP GET requests to the version API to validate microversions.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_microversions_root_version(self):
|
def test_microversions_root_version(self):
|
||||||
|
|
||||||
resp, resp_body = self.shares_v2_client.send_microversion_request()
|
resp, resp_body = self.shares_v2_client.send_microversion_request()
|
||||||
@ -55,7 +55,7 @@ class MicroversionsTest(base.BaseSharesTest):
|
|||||||
self.assertEqual(_MIN_API_VERSION, v2.get('min_version'))
|
self.assertEqual(_MIN_API_VERSION, v2.get('min_version'))
|
||||||
self.assertEqual(_MAX_API_VERSION, v2.get('version'))
|
self.assertEqual(_MAX_API_VERSION, v2.get('version'))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_microversions_v1_no_version(self):
|
def test_microversions_v1_no_version(self):
|
||||||
|
|
||||||
resp, resp_body = self.shares_v2_client.send_microversion_request(
|
resp, resp_body = self.shares_v2_client.send_microversion_request(
|
||||||
@ -72,7 +72,7 @@ class MicroversionsTest(base.BaseSharesTest):
|
|||||||
self.assertEqual('', version_list[0].get('min_version'))
|
self.assertEqual('', version_list[0].get('min_version'))
|
||||||
self.assertEqual('', version_list[0].get('version'))
|
self.assertEqual('', version_list[0].get('version'))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_microversions_v1_with_version(self):
|
def test_microversions_v1_with_version(self):
|
||||||
|
|
||||||
resp, resp_body = self.shares_v2_client.send_microversion_request(
|
resp, resp_body = self.shares_v2_client.send_microversion_request(
|
||||||
@ -89,7 +89,7 @@ class MicroversionsTest(base.BaseSharesTest):
|
|||||||
self.assertEqual('', version_list[0].get('min_version'))
|
self.assertEqual('', version_list[0].get('min_version'))
|
||||||
self.assertEqual('', version_list[0].get('version'))
|
self.assertEqual('', version_list[0].get('version'))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_microversions_v2_no_version(self):
|
def test_microversions_v2_no_version(self):
|
||||||
|
|
||||||
resp, resp_body = self.shares_v2_client.send_microversion_request(
|
resp, resp_body = self.shares_v2_client.send_microversion_request(
|
||||||
@ -107,7 +107,7 @@ class MicroversionsTest(base.BaseSharesTest):
|
|||||||
self.assertEqual(_MIN_API_VERSION, version_list[0].get('min_version'))
|
self.assertEqual(_MIN_API_VERSION, version_list[0].get('min_version'))
|
||||||
self.assertEqual(_MAX_API_VERSION, version_list[0].get('version'))
|
self.assertEqual(_MAX_API_VERSION, version_list[0].get('version'))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_microversions_v2_min_version(self):
|
def test_microversions_v2_min_version(self):
|
||||||
|
|
||||||
resp, resp_body = self.shares_v2_client.send_microversion_request(
|
resp, resp_body = self.shares_v2_client.send_microversion_request(
|
||||||
@ -125,7 +125,7 @@ class MicroversionsTest(base.BaseSharesTest):
|
|||||||
self.assertEqual(_MIN_API_VERSION, version_list[0].get('min_version'))
|
self.assertEqual(_MIN_API_VERSION, version_list[0].get('min_version'))
|
||||||
self.assertEqual(_MAX_API_VERSION, version_list[0].get('version'))
|
self.assertEqual(_MAX_API_VERSION, version_list[0].get('version'))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_microversions_v2_max_version(self):
|
def test_microversions_v2_max_version(self):
|
||||||
|
|
||||||
resp, resp_body = self.shares_v2_client.send_microversion_request(
|
resp, resp_body = self.shares_v2_client.send_microversion_request(
|
||||||
@ -143,7 +143,7 @@ class MicroversionsTest(base.BaseSharesTest):
|
|||||||
self.assertEqual(_MIN_API_VERSION, version_list[0].get('min_version'))
|
self.assertEqual(_MIN_API_VERSION, version_list[0].get('min_version'))
|
||||||
self.assertEqual(_MAX_API_VERSION, version_list[0].get('version'))
|
self.assertEqual(_MAX_API_VERSION, version_list[0].get('version'))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_microversions_v2_invalid_version(self):
|
def test_microversions_v2_invalid_version(self):
|
||||||
|
|
||||||
resp, _ = self.shares_v2_client.send_microversion_request(
|
resp, _ = self.shares_v2_client.send_microversion_request(
|
||||||
@ -151,7 +151,7 @@ class MicroversionsTest(base.BaseSharesTest):
|
|||||||
|
|
||||||
self.assertEqual(400, resp.status)
|
self.assertEqual(400, resp.status)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_microversions_v2_unacceptable_version(self):
|
def test_microversions_v2_unacceptable_version(self):
|
||||||
|
|
||||||
# First get max version from the server
|
# First get max version from the server
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
import ddt
|
import ddt
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ class SharesQuotasTest(base.BaseSharesTest):
|
|||||||
cls.user_id = cls.shares_v2_client.user_id
|
cls.user_id = cls.shares_v2_client.user_id
|
||||||
cls.tenant_id = cls.shares_v2_client.tenant_id
|
cls.tenant_id = cls.shares_v2_client.tenant_id
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_default_quotas(self, client_name):
|
def test_default_quotas(self, client_name):
|
||||||
quotas = getattr(self, client_name).default_quotas(self.tenant_id)
|
quotas = getattr(self, client_name).default_quotas(self.tenant_id)
|
||||||
@ -44,7 +44,7 @@ class SharesQuotasTest(base.BaseSharesTest):
|
|||||||
self.assertGreater(int(quotas["snapshots"]), -2)
|
self.assertGreater(int(quotas["snapshots"]), -2)
|
||||||
self.assertGreater(int(quotas["share_networks"]), -2)
|
self.assertGreater(int(quotas["share_networks"]), -2)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_show_quotas(self, client_name):
|
def test_show_quotas(self, client_name):
|
||||||
quotas = getattr(self, client_name).show_quotas(self.tenant_id)
|
quotas = getattr(self, client_name).show_quotas(self.tenant_id)
|
||||||
@ -54,7 +54,7 @@ class SharesQuotasTest(base.BaseSharesTest):
|
|||||||
self.assertGreater(int(quotas["snapshots"]), -2)
|
self.assertGreater(int(quotas["snapshots"]), -2)
|
||||||
self.assertGreater(int(quotas["share_networks"]), -2)
|
self.assertGreater(int(quotas["share_networks"]), -2)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_show_quotas_for_user(self, client_name):
|
def test_show_quotas_for_user(self, client_name):
|
||||||
quotas = getattr(self, client_name).show_quotas(
|
quotas = getattr(self, client_name).show_quotas(
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
import ddt
|
import ddt
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -33,18 +33,18 @@ class SharesQuotasNegativeTest(base.BaseSharesTest):
|
|||||||
raise cls.skipException(msg)
|
raise cls.skipException(msg)
|
||||||
super(SharesQuotasNegativeTest, cls).resource_setup()
|
super(SharesQuotasNegativeTest, cls).resource_setup()
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_get_quotas_with_empty_tenant_id(self):
|
def test_get_quotas_with_empty_tenant_id(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.shares_v2_client.show_quotas, "")
|
self.shares_v2_client.show_quotas, "")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_reset_quotas_with_user(self):
|
def test_try_reset_quotas_with_user(self):
|
||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.shares_v2_client.reset_quotas,
|
self.shares_v2_client.reset_quotas,
|
||||||
self.shares_v2_client.tenant_id)
|
self.shares_v2_client.tenant_id)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_update_quotas_with_user(self):
|
def test_try_update_quotas_with_user(self):
|
||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.shares_v2_client.update_quotas,
|
self.shares_v2_client.update_quotas,
|
||||||
@ -66,7 +66,7 @@ class SharesQuotasNegativeTest(base.BaseSharesTest):
|
|||||||
('os-services', '2.7', 'update_quotas'),
|
('os-services', '2.7', 'update_quotas'),
|
||||||
)
|
)
|
||||||
@ddt.unpack
|
@ddt.unpack
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
@base.skip_if_microversion_not_supported("2.7")
|
@base.skip_if_microversion_not_supported("2.7")
|
||||||
def test_show_quotas_with_wrong_versions(self, url, version, method_name):
|
def test_show_quotas_with_wrong_versions(self, url, version, method_name):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.common import constants
|
from manila_tempest_tests.common import constants
|
||||||
from manila_tempest_tests import share_exceptions
|
from manila_tempest_tests import share_exceptions
|
||||||
@ -126,7 +126,7 @@ class ReplicationTest(base.BaseSharesMixedTest):
|
|||||||
|
|
||||||
return access_type, access_to
|
return access_type, access_to
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
def test_add_delete_share_replica(self):
|
def test_add_delete_share_replica(self):
|
||||||
# Create the replica
|
# Create the replica
|
||||||
share_replica = self._verify_create_replica()
|
share_replica = self._verify_create_replica()
|
||||||
@ -134,7 +134,7 @@ class ReplicationTest(base.BaseSharesMixedTest):
|
|||||||
# Delete the replica
|
# Delete the replica
|
||||||
self.delete_share_replica(share_replica["id"])
|
self.delete_share_replica(share_replica["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
def test_add_access_rule_create_replica_delete_rule(self):
|
def test_add_access_rule_create_replica_delete_rule(self):
|
||||||
# Add access rule to the share
|
# Add access rule to the share
|
||||||
access_type, access_to = self._verify_config_and_set_access_rule_data()
|
access_type, access_to = self._verify_config_and_set_access_rule_data()
|
||||||
@ -157,7 +157,7 @@ class ReplicationTest(base.BaseSharesMixedTest):
|
|||||||
self.shares_v2_client.wait_for_resource_deletion(
|
self.shares_v2_client.wait_for_resource_deletion(
|
||||||
rule_id=rule["id"], share_id=self.shares[0]['id'])
|
rule_id=rule["id"], share_id=self.shares[0]['id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
def test_create_replica_add_access_rule_delete_replica(self):
|
def test_create_replica_add_access_rule_delete_replica(self):
|
||||||
access_type, access_to = self._verify_config_and_set_access_rule_data()
|
access_type, access_to = self._verify_config_and_set_access_rule_data()
|
||||||
# Create the replica
|
# Create the replica
|
||||||
@ -174,7 +174,7 @@ class ReplicationTest(base.BaseSharesMixedTest):
|
|||||||
# Delete the replica
|
# Delete the replica
|
||||||
self.delete_share_replica(share_replica["id"])
|
self.delete_share_replica(share_replica["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_multiple_share_replicas_tests,
|
@testtools.skipUnless(CONF.share.run_multiple_share_replicas_tests,
|
||||||
'Multiple share replicas tests are disabled.')
|
'Multiple share replicas tests are disabled.')
|
||||||
def test_add_multiple_share_replicas(self):
|
def test_add_multiple_share_replicas(self):
|
||||||
@ -205,7 +205,7 @@ class ReplicationTest(base.BaseSharesMixedTest):
|
|||||||
self.assertIn(share_replica1["id"], replica_ids)
|
self.assertIn(share_replica1["id"], replica_ids)
|
||||||
self.assertIn(share_replica2["id"], replica_ids)
|
self.assertIn(share_replica2["id"], replica_ids)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
def test_promote_in_sync_share_replica(self):
|
def test_promote_in_sync_share_replica(self):
|
||||||
# Test promote 'in_sync' share_replica to 'active' state
|
# Test promote 'in_sync' share_replica to 'active' state
|
||||||
if (self.replication_type
|
if (self.replication_type
|
||||||
@ -236,7 +236,7 @@ class ReplicationTest(base.BaseSharesMixedTest):
|
|||||||
self.assertEqual(constants.REPLICATION_STATE_ACTIVE,
|
self.assertEqual(constants.REPLICATION_STATE_ACTIVE,
|
||||||
promoted_replica["replica_state"])
|
promoted_replica["replica_state"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
def test_promote_and_promote_back(self):
|
def test_promote_and_promote_back(self):
|
||||||
# Test promote back and forth between 2 share replicas
|
# Test promote back and forth between 2 share replicas
|
||||||
if (self.replication_type
|
if (self.replication_type
|
||||||
@ -278,7 +278,7 @@ class ReplicationTest(base.BaseSharesMixedTest):
|
|||||||
new_replica['id'], constants.REPLICATION_STATE_IN_SYNC,
|
new_replica['id'], constants.REPLICATION_STATE_IN_SYNC,
|
||||||
status_attr='replica_state')
|
status_attr='replica_state')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_active_replication_state(self):
|
def test_active_replication_state(self):
|
||||||
# Verify the replica_state of first instance is set to active.
|
# Verify the replica_state of first instance is set to active.
|
||||||
replica = self.shares_v2_client.get_share_replica(self.instance_id1)
|
replica = self.shares_v2_client.get_share_replica(self.instance_id1)
|
||||||
@ -356,7 +356,7 @@ class ReplicationActionsTest(base.BaseSharesMixedTest):
|
|||||||
replica['id'], len(replica_id_list))
|
replica['id'], len(replica_id_list))
|
||||||
self.assertEqual(1, len(replica_id_list), msg)
|
self.assertEqual(1, len(replica_id_list), msg)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_show_share_replica(self):
|
def test_show_share_replica(self):
|
||||||
replica = self.shares_v2_client.get_share_replica(self.replica1["id"])
|
replica = self.shares_v2_client.get_share_replica(self.replica1["id"])
|
||||||
|
|
||||||
@ -367,7 +367,7 @@ class ReplicationActionsTest(base.BaseSharesMixedTest):
|
|||||||
'expected %s, got %s.' % (replica["id"],
|
'expected %s, got %s.' % (replica["id"],
|
||||||
detail_keys, actual_keys))
|
detail_keys, actual_keys))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_detail_list_share_replicas_for_share(self):
|
def test_detail_list_share_replicas_for_share(self):
|
||||||
# List replicas for share
|
# List replicas for share
|
||||||
replica_list = self.shares_v2_client.list_share_replicas(
|
replica_list = self.shares_v2_client.list_share_replicas(
|
||||||
@ -379,7 +379,7 @@ class ReplicationActionsTest(base.BaseSharesMixedTest):
|
|||||||
# Verify keys
|
# Verify keys
|
||||||
self._validate_replica_list(replica_list)
|
self._validate_replica_list(replica_list)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_detail_list_share_replicas_for_all_shares(self):
|
def test_detail_list_share_replicas_for_all_shares(self):
|
||||||
# List replicas for all available shares
|
# List replicas for all available shares
|
||||||
replica_list = self.shares_v2_client.list_share_replicas()
|
replica_list = self.shares_v2_client.list_share_replicas()
|
||||||
@ -391,7 +391,7 @@ class ReplicationActionsTest(base.BaseSharesMixedTest):
|
|||||||
# Verify keys
|
# Verify keys
|
||||||
self._validate_replica_list(replica_list)
|
self._validate_replica_list(replica_list)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_summary_list_share_replicas_for_all_shares(self):
|
def test_summary_list_share_replicas_for_all_shares(self):
|
||||||
# List replicas
|
# List replicas
|
||||||
replica_list = self.shares_v2_client.list_share_replicas_summary()
|
replica_list = self.shares_v2_client.list_share_replicas_summary()
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.common import constants
|
from manila_tempest_tests.common import constants
|
||||||
from manila_tempest_tests import share_exceptions
|
from manila_tempest_tests import share_exceptions
|
||||||
@ -75,7 +75,7 @@ class ReplicationNegativeTest(base.BaseSharesMixedTest):
|
|||||||
raise self.skipException(
|
raise self.skipException(
|
||||||
msg % ','.join(constants.REPLICATION_PROMOTION_CHOICES))
|
msg % ','.join(constants.REPLICATION_PROMOTION_CHOICES))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_try_add_replica_to_share_with_no_replication_share_type(self):
|
def test_try_add_replica_to_share_with_no_replication_share_type(self):
|
||||||
# Create share without replication type
|
# Create share without replication type
|
||||||
share_type = self.create_share_type(
|
share_type = self.create_share_type(
|
||||||
@ -88,7 +88,7 @@ class ReplicationNegativeTest(base.BaseSharesMixedTest):
|
|||||||
share['id'],
|
share['id'],
|
||||||
self.replica_zone)
|
self.replica_zone)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_add_replica_to_share_with_error_state(self):
|
def test_add_replica_to_share_with_error_state(self):
|
||||||
# Set "error" state
|
# Set "error" state
|
||||||
self.admin_client.reset_state(
|
self.admin_client.reset_state(
|
||||||
@ -101,13 +101,13 @@ class ReplicationNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.share1['id'],
|
self.share1['id'],
|
||||||
self.replica_zone)
|
self.replica_zone)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_try_delete_last_active_replica(self):
|
def test_try_delete_last_active_replica(self):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
self.shares_v2_client.delete_share_replica,
|
self.shares_v2_client.delete_share_replica,
|
||||||
self.instance_id1)
|
self.instance_id1)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_try_delete_share_having_replica(self):
|
def test_try_delete_share_having_replica(self):
|
||||||
self.create_share_replica(self.share1["id"], self.replica_zone,
|
self.create_share_replica(self.share1["id"], self.replica_zone,
|
||||||
cleanup_in_class=False)
|
cleanup_in_class=False)
|
||||||
@ -115,7 +115,7 @@ class ReplicationNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.shares_v2_client.delete_share,
|
self.shares_v2_client.delete_share,
|
||||||
self.share1["id"])
|
self.share1["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_promote_out_of_sync_share_replica(self):
|
def test_promote_out_of_sync_share_replica(self):
|
||||||
# Test promoting an out_of_sync share_replica to active state
|
# Test promoting an out_of_sync share_replica to active state
|
||||||
self._is_replication_type_promotable()
|
self._is_replication_type_promotable()
|
||||||
@ -133,7 +133,7 @@ class ReplicationNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.shares_v2_client.promote_share_replica,
|
self.shares_v2_client.promote_share_replica,
|
||||||
replica['id'])
|
replica['id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_promote_active_share_replica(self):
|
def test_promote_active_share_replica(self):
|
||||||
# Test promote active share_replica
|
# Test promote active share_replica
|
||||||
self._is_replication_type_promotable()
|
self._is_replication_type_promotable()
|
||||||
@ -142,7 +142,7 @@ class ReplicationNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.shares_v2_client.promote_share_replica(self.instance_id1,
|
self.shares_v2_client.promote_share_replica(self.instance_id1,
|
||||||
expected_status=200)
|
expected_status=200)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_promote_share_replica_for_writable_share_type(self):
|
def test_promote_share_replica_for_writable_share_type(self):
|
||||||
# Test promote active share_replica for writable share
|
# Test promote active share_replica for writable share
|
||||||
if self.replication_type != "writable":
|
if self.replication_type != "writable":
|
||||||
@ -165,13 +165,13 @@ class ReplicationNegativeTest(base.BaseSharesMixedTest):
|
|||||||
@base.skip_if_microversion_lt(_MIN_SUPPORTED_MICROVERSION)
|
@base.skip_if_microversion_lt(_MIN_SUPPORTED_MICROVERSION)
|
||||||
class ReplicationAPIOnlyNegativeTest(base.BaseSharesTest):
|
class ReplicationAPIOnlyNegativeTest(base.BaseSharesTest):
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_get_replica_by_nonexistent_id(self):
|
def test_get_replica_by_nonexistent_id(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.shares_v2_client.get_share_replica,
|
self.shares_v2_client.get_share_replica,
|
||||||
data_utils.rand_uuid())
|
data_utils.rand_uuid())
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_delete_replica_by_nonexistent_id(self):
|
def test_try_delete_replica_by_nonexistent_id(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.shares_v2_client.delete_share_replica,
|
self.shares_v2_client.delete_share_replica,
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.common import constants
|
from manila_tempest_tests.common import constants
|
||||||
from manila_tempest_tests import share_exceptions
|
from manila_tempest_tests import share_exceptions
|
||||||
@ -62,7 +62,7 @@ class ReplicationSnapshotTest(base.BaseSharesMixedTest):
|
|||||||
'availability_zone': cls.share_zone,
|
'availability_zone': cls.share_zone,
|
||||||
}}
|
}}
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
def test_snapshot_after_share_replica(self):
|
def test_snapshot_after_share_replica(self):
|
||||||
"""Test the snapshot for replicated share.
|
"""Test the snapshot for replicated share.
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ class ReplicationSnapshotTest(base.BaseSharesMixedTest):
|
|||||||
self.delete_share_replica(original_replica['id'])
|
self.delete_share_replica(original_replica['id'])
|
||||||
self.create_share(snapshot_id=snapshot['id'])
|
self.create_share(snapshot_id=snapshot['id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
def test_snapshot_before_share_replica(self):
|
def test_snapshot_before_share_replica(self):
|
||||||
"""Test the snapshot for replicated share.
|
"""Test the snapshot for replicated share.
|
||||||
|
|
||||||
@ -118,7 +118,7 @@ class ReplicationSnapshotTest(base.BaseSharesMixedTest):
|
|||||||
self.delete_share_replica(original_replica['id'])
|
self.delete_share_replica(original_replica['id'])
|
||||||
self.create_share(snapshot_id=snapshot['id'])
|
self.create_share(snapshot_id=snapshot['id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
def test_snapshot_before_and_after_share_replica(self):
|
def test_snapshot_before_and_after_share_replica(self):
|
||||||
"""Test the snapshot for replicated share.
|
"""Test the snapshot for replicated share.
|
||||||
|
|
||||||
@ -155,7 +155,7 @@ class ReplicationSnapshotTest(base.BaseSharesMixedTest):
|
|||||||
self.create_share(snapshot_id=snapshot1['id'])
|
self.create_share(snapshot_id=snapshot1['id'])
|
||||||
self.create_share(snapshot_id=snapshot2['id'])
|
self.create_share(snapshot_id=snapshot2['id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
def test_delete_snapshot_after_adding_replica(self):
|
def test_delete_snapshot_after_adding_replica(self):
|
||||||
"""Verify the snapshot delete.
|
"""Verify the snapshot delete.
|
||||||
|
|
||||||
@ -175,7 +175,7 @@ class ReplicationSnapshotTest(base.BaseSharesMixedTest):
|
|||||||
self.shares_v2_client.wait_for_resource_deletion(
|
self.shares_v2_client.wait_for_resource_deletion(
|
||||||
snapshot_id=snapshot["id"])
|
snapshot_id=snapshot["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
def test_create_replica_from_snapshot_share(self):
|
def test_create_replica_from_snapshot_share(self):
|
||||||
"""Test replica for a share that was created from snapshot."""
|
"""Test replica for a share that was created from snapshot."""
|
||||||
|
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
import ddt
|
import ddt
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
from manila_tempest_tests import utils
|
from manila_tempest_tests import utils
|
||||||
@ -78,7 +78,7 @@ class ShareIpRulesForNFSTest(base.BaseSharesTest):
|
|||||||
cls.access_type = "ip"
|
cls.access_type = "ip"
|
||||||
cls.access_to = "2.2.2.2"
|
cls.access_to = "2.2.2.2"
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
@ddt.data('1.0', '2.9', LATEST_MICROVERSION)
|
@ddt.data('1.0', '2.9', LATEST_MICROVERSION)
|
||||||
def test_create_delete_access_rules_with_one_ip(self, version):
|
def test_create_delete_access_rules_with_one_ip(self, version):
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ class ShareIpRulesForNFSTest(base.BaseSharesTest):
|
|||||||
self.shares_v2_client.wait_for_resource_deletion(
|
self.shares_v2_client.wait_for_resource_deletion(
|
||||||
rule_id=rule["id"], share_id=self.share['id'], version=version)
|
rule_id=rule["id"], share_id=self.share['id'], version=version)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
@ddt.data('1.0', '2.9', LATEST_MICROVERSION)
|
@ddt.data('1.0', '2.9', LATEST_MICROVERSION)
|
||||||
def test_create_delete_access_rule_with_cidr(self, version):
|
def test_create_delete_access_rule_with_cidr(self, version):
|
||||||
|
|
||||||
@ -162,7 +162,7 @@ class ShareIpRulesForNFSTest(base.BaseSharesTest):
|
|||||||
self.shares_v2_client.wait_for_resource_deletion(
|
self.shares_v2_client.wait_for_resource_deletion(
|
||||||
rule_id=rule["id"], share_id=self.share['id'], version=version)
|
rule_id=rule["id"], share_id=self.share['id'], version=version)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
@testtools.skipIf(
|
@testtools.skipIf(
|
||||||
"nfs" not in CONF.share.enable_ro_access_level_for_protocols,
|
"nfs" not in CONF.share.enable_ro_access_level_for_protocols,
|
||||||
"RO access rule tests are disabled for NFS protocol.")
|
"RO access rule tests are disabled for NFS protocol.")
|
||||||
@ -175,7 +175,7 @@ class ShareIpRulesForNFSTest(base.BaseSharesTest):
|
|||||||
class ShareIpRulesForCIFSTest(ShareIpRulesForNFSTest):
|
class ShareIpRulesForCIFSTest(ShareIpRulesForNFSTest):
|
||||||
protocol = "cifs"
|
protocol = "cifs"
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
@testtools.skipIf(
|
@testtools.skipIf(
|
||||||
"cifs" not in CONF.share.enable_ro_access_level_for_protocols,
|
"cifs" not in CONF.share.enable_ro_access_level_for_protocols,
|
||||||
"RO access rule tests are disabled for CIFS protocol.")
|
"RO access rule tests are disabled for CIFS protocol.")
|
||||||
@ -200,7 +200,7 @@ class ShareUserRulesForNFSTest(base.BaseSharesTest):
|
|||||||
cls.access_type = "user"
|
cls.access_type = "user"
|
||||||
cls.access_to = CONF.share.username_for_user_rules
|
cls.access_to = CONF.share.username_for_user_rules
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
@ddt.data('1.0', '2.9', LATEST_MICROVERSION)
|
@ddt.data('1.0', '2.9', LATEST_MICROVERSION)
|
||||||
def test_create_delete_user_rule(self, version):
|
def test_create_delete_user_rule(self, version):
|
||||||
|
|
||||||
@ -239,7 +239,7 @@ class ShareUserRulesForNFSTest(base.BaseSharesTest):
|
|||||||
self.shares_v2_client.wait_for_resource_deletion(
|
self.shares_v2_client.wait_for_resource_deletion(
|
||||||
rule_id=rule["id"], share_id=self.share['id'], version=version)
|
rule_id=rule["id"], share_id=self.share['id'], version=version)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
@testtools.skipIf(
|
@testtools.skipIf(
|
||||||
"nfs" not in CONF.share.enable_ro_access_level_for_protocols,
|
"nfs" not in CONF.share.enable_ro_access_level_for_protocols,
|
||||||
"RO access rule tests are disabled for NFS protocol.")
|
"RO access rule tests are disabled for NFS protocol.")
|
||||||
@ -252,7 +252,7 @@ class ShareUserRulesForNFSTest(base.BaseSharesTest):
|
|||||||
class ShareUserRulesForCIFSTest(ShareUserRulesForNFSTest):
|
class ShareUserRulesForCIFSTest(ShareUserRulesForNFSTest):
|
||||||
protocol = "cifs"
|
protocol = "cifs"
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
@testtools.skipIf(
|
@testtools.skipIf(
|
||||||
"cifs" not in CONF.share.enable_ro_access_level_for_protocols,
|
"cifs" not in CONF.share.enable_ro_access_level_for_protocols,
|
||||||
"RO access rule tests are disabled for CIFS protocol.")
|
"RO access rule tests are disabled for CIFS protocol.")
|
||||||
@ -279,7 +279,7 @@ class ShareCertRulesForGLUSTERFSTest(base.BaseSharesTest):
|
|||||||
# certificate that it possesses.
|
# certificate that it possesses.
|
||||||
cls.access_to = "client1.com"
|
cls.access_to = "client1.com"
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
@ddt.data('1.0', '2.9', LATEST_MICROVERSION)
|
@ddt.data('1.0', '2.9', LATEST_MICROVERSION)
|
||||||
def test_create_delete_cert_rule(self, version):
|
def test_create_delete_cert_rule(self, version):
|
||||||
|
|
||||||
@ -318,7 +318,7 @@ class ShareCertRulesForGLUSTERFSTest(base.BaseSharesTest):
|
|||||||
self.shares_v2_client.wait_for_resource_deletion(
|
self.shares_v2_client.wait_for_resource_deletion(
|
||||||
rule_id=rule["id"], share_id=self.share['id'], version=version)
|
rule_id=rule["id"], share_id=self.share['id'], version=version)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
@testtools.skipIf(
|
@testtools.skipIf(
|
||||||
"glusterfs" not in CONF.share.enable_ro_access_level_for_protocols,
|
"glusterfs" not in CONF.share.enable_ro_access_level_for_protocols,
|
||||||
"RO access rule tests are disabled for GLUSTERFS protocol.")
|
"RO access rule tests are disabled for GLUSTERFS protocol.")
|
||||||
@ -376,7 +376,7 @@ class ShareCephxRulesForCephFSTest(base.BaseSharesTest):
|
|||||||
# Provide access to a client identified by a cephx auth id.
|
# Provide access to a client identified by a cephx auth id.
|
||||||
cls.access_to = "bob"
|
cls.access_to = "bob"
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
@ddt.data("alice", "alice_bob", "alice bob")
|
@ddt.data("alice", "alice_bob", "alice bob")
|
||||||
def test_create_delete_cephx_rule(self, access_to):
|
def test_create_delete_cephx_rule(self, access_to):
|
||||||
rule = self.shares_v2_client.create_access_rule(
|
rule = self.shares_v2_client.create_access_rule(
|
||||||
@ -428,7 +428,7 @@ class ShareRulesTest(base.BaseSharesTest):
|
|||||||
cls.shares_v2_client.share_protocol = cls.protocol
|
cls.shares_v2_client.share_protocol = cls.protocol
|
||||||
cls.share = cls.create_share()
|
cls.share = cls.create_share()
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('1.0', '2.9', LATEST_MICROVERSION)
|
@ddt.data('1.0', '2.9', LATEST_MICROVERSION)
|
||||||
def test_list_access_rules(self, version):
|
def test_list_access_rules(self, version):
|
||||||
if (utils.is_microversion_lt(version, '2.13') and
|
if (utils.is_microversion_lt(version, '2.13') and
|
||||||
@ -498,7 +498,7 @@ class ShareRulesTest(base.BaseSharesTest):
|
|||||||
self.shares_v2_client.wait_for_resource_deletion(
|
self.shares_v2_client.wait_for_resource_deletion(
|
||||||
rule_id=rule["id"], share_id=self.share['id'], version=version)
|
rule_id=rule["id"], share_id=self.share['id'], version=version)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('1.0', '2.9', LATEST_MICROVERSION)
|
@ddt.data('1.0', '2.9', LATEST_MICROVERSION)
|
||||||
def test_access_rules_deleted_if_share_deleted(self, version):
|
def test_access_rules_deleted_if_share_deleted(self, version):
|
||||||
if (utils.is_microversion_lt(version, '2.13') and
|
if (utils.is_microversion_lt(version, '2.13') and
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
import ddt
|
import ddt
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
from manila_tempest_tests import utils
|
from manila_tempest_tests import utils
|
||||||
@ -43,63 +43,63 @@ class ShareIpRulesForNFSNegativeTest(base.BaseSharesTest):
|
|||||||
# create snapshot
|
# create snapshot
|
||||||
cls.snap = cls.create_snapshot_wait_for_active(cls.share["id"])
|
cls.snap = cls.create_snapshot_wait_for_active(cls.share["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_create_access_rule_ip_with_wrong_target_1(self, client_name):
|
def test_create_access_rule_ip_with_wrong_target_1(self, client_name):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
getattr(self, client_name).create_access_rule,
|
getattr(self, client_name).create_access_rule,
|
||||||
self.share["id"], "ip", "1.2.3.256")
|
self.share["id"], "ip", "1.2.3.256")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_create_access_rule_ip_with_wrong_target_2(self, client_name):
|
def test_create_access_rule_ip_with_wrong_target_2(self, client_name):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
getattr(self, client_name).create_access_rule,
|
getattr(self, client_name).create_access_rule,
|
||||||
self.share["id"], "ip", "1.1.1.-")
|
self.share["id"], "ip", "1.1.1.-")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_create_access_rule_ip_with_wrong_target_3(self, client_name):
|
def test_create_access_rule_ip_with_wrong_target_3(self, client_name):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
getattr(self, client_name).create_access_rule,
|
getattr(self, client_name).create_access_rule,
|
||||||
self.share["id"], "ip", "1.2.3.4/33")
|
self.share["id"], "ip", "1.2.3.4/33")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_create_access_rule_ip_with_wrong_target_4(self, client_name):
|
def test_create_access_rule_ip_with_wrong_target_4(self, client_name):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
getattr(self, client_name).create_access_rule,
|
getattr(self, client_name).create_access_rule,
|
||||||
self.share["id"], "ip", "1.2.3.*")
|
self.share["id"], "ip", "1.2.3.*")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_create_access_rule_ip_with_wrong_target_5(self, client_name):
|
def test_create_access_rule_ip_with_wrong_target_5(self, client_name):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
getattr(self, client_name).create_access_rule,
|
getattr(self, client_name).create_access_rule,
|
||||||
self.share["id"], "ip", "1.2.3.*/23")
|
self.share["id"], "ip", "1.2.3.*/23")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_create_access_rule_ip_with_wrong_target_6(self, client_name):
|
def test_create_access_rule_ip_with_wrong_target_6(self, client_name):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
getattr(self, client_name).create_access_rule,
|
getattr(self, client_name).create_access_rule,
|
||||||
self.share["id"], "ip", "1.2.3.1|23")
|
self.share["id"], "ip", "1.2.3.1|23")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_create_access_rule_ip_with_wrong_target_7(self, client_name):
|
def test_create_access_rule_ip_with_wrong_target_7(self, client_name):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
getattr(self, client_name).create_access_rule,
|
getattr(self, client_name).create_access_rule,
|
||||||
self.share["id"], "ip", "1.2.3.1/-1")
|
self.share["id"], "ip", "1.2.3.1/-1")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_create_access_rule_ip_with_wrong_target_8(self, client_name):
|
def test_create_access_rule_ip_with_wrong_target_8(self, client_name):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
getattr(self, client_name).create_access_rule,
|
getattr(self, client_name).create_access_rule,
|
||||||
self.share["id"], "ip", "1.2.3.1/")
|
self.share["id"], "ip", "1.2.3.1/")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_create_access_rule_with_wrong_level(self, client_name):
|
def test_create_access_rule_with_wrong_level(self, client_name):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
@ -109,7 +109,7 @@ class ShareIpRulesForNFSNegativeTest(base.BaseSharesTest):
|
|||||||
'2.2.2.2',
|
'2.2.2.2',
|
||||||
'su')
|
'su')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('1.0', '2.9', LATEST_MICROVERSION)
|
@ddt.data('1.0', '2.9', LATEST_MICROVERSION)
|
||||||
def test_create_duplicate_of_ip_rule(self, version):
|
def test_create_duplicate_of_ip_rule(self, version):
|
||||||
# test data
|
# test data
|
||||||
@ -181,7 +181,7 @@ class ShareUserRulesForNFSNegativeTest(base.BaseSharesTest):
|
|||||||
# create snapshot
|
# create snapshot
|
||||||
cls.snap = cls.create_snapshot_wait_for_active(cls.share["id"])
|
cls.snap = cls.create_snapshot_wait_for_active(cls.share["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_create_access_rule_user_with_wrong_input_2(self, client_name):
|
def test_create_access_rule_user_with_wrong_input_2(self, client_name):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
@ -189,28 +189,28 @@ class ShareUserRulesForNFSNegativeTest(base.BaseSharesTest):
|
|||||||
self.share["id"], "user",
|
self.share["id"], "user",
|
||||||
"try+")
|
"try+")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_create_access_rule_user_with_empty_key(self, client_name):
|
def test_create_access_rule_user_with_empty_key(self, client_name):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
getattr(self, client_name).create_access_rule,
|
getattr(self, client_name).create_access_rule,
|
||||||
self.share["id"], "user", "")
|
self.share["id"], "user", "")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_create_access_rule_user_with_too_little_key(self, client_name):
|
def test_create_access_rule_user_with_too_little_key(self, client_name):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
getattr(self, client_name).create_access_rule,
|
getattr(self, client_name).create_access_rule,
|
||||||
self.share["id"], "user", "abc")
|
self.share["id"], "user", "abc")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_create_access_rule_user_with_too_big_key(self, client_name):
|
def test_create_access_rule_user_with_too_big_key(self, client_name):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
getattr(self, client_name).create_access_rule,
|
getattr(self, client_name).create_access_rule,
|
||||||
self.share["id"], "user", "a" * 33)
|
self.share["id"], "user", "a" * 33)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_create_access_rule_user_with_wrong_input_1(self, client_name):
|
def test_create_access_rule_user_with_wrong_input_1(self, client_name):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
@ -218,7 +218,7 @@ class ShareUserRulesForNFSNegativeTest(base.BaseSharesTest):
|
|||||||
self.share["id"], "user",
|
self.share["id"], "user",
|
||||||
"try+")
|
"try+")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
@ -229,7 +229,7 @@ class ShareUserRulesForNFSNegativeTest(base.BaseSharesTest):
|
|||||||
access_type="user",
|
access_type="user",
|
||||||
access_to="fakeuser")
|
access_to="fakeuser")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_create_access_rule_user_with_wrong_share_id(self, client_name):
|
def test_create_access_rule_user_with_wrong_share_id(self, client_name):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
@ -238,7 +238,7 @@ class ShareUserRulesForNFSNegativeTest(base.BaseSharesTest):
|
|||||||
access_type="user",
|
access_type="user",
|
||||||
access_to="fakeuser")
|
access_to="fakeuser")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_create_access_rule_with_wrong_level(self, client_name):
|
def test_create_access_rule_with_wrong_level(self, client_name):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
@ -271,14 +271,14 @@ class ShareCertRulesForGLUSTERFSNegativeTest(base.BaseSharesTest):
|
|||||||
# create snapshot
|
# create snapshot
|
||||||
cls.snap = cls.create_snapshot_wait_for_active(cls.share["id"])
|
cls.snap = cls.create_snapshot_wait_for_active(cls.share["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_create_access_rule_cert_with_empty_common_name(self, client_name):
|
def test_create_access_rule_cert_with_empty_common_name(self, client_name):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
getattr(self, client_name).create_access_rule,
|
getattr(self, client_name).create_access_rule,
|
||||||
self.share["id"], "cert", "")
|
self.share["id"], "cert", "")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_create_access_rule_cert_with_whitespace_common_name(self,
|
def test_create_access_rule_cert_with_whitespace_common_name(self,
|
||||||
client_name):
|
client_name):
|
||||||
@ -286,7 +286,7 @@ class ShareCertRulesForGLUSTERFSNegativeTest(base.BaseSharesTest):
|
|||||||
getattr(self, client_name).create_access_rule,
|
getattr(self, client_name).create_access_rule,
|
||||||
self.share["id"], "cert", " ")
|
self.share["id"], "cert", " ")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_create_access_rule_cert_with_too_big_common_name(self,
|
def test_create_access_rule_cert_with_too_big_common_name(self,
|
||||||
client_name):
|
client_name):
|
||||||
@ -295,7 +295,7 @@ class ShareCertRulesForGLUSTERFSNegativeTest(base.BaseSharesTest):
|
|||||||
getattr(self, client_name).create_access_rule,
|
getattr(self, client_name).create_access_rule,
|
||||||
self.share["id"], "cert", "a" * 65)
|
self.share["id"], "cert", "a" * 65)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
@ -306,7 +306,7 @@ class ShareCertRulesForGLUSTERFSNegativeTest(base.BaseSharesTest):
|
|||||||
access_type="cert",
|
access_type="cert",
|
||||||
access_to="fakeclient1.com")
|
access_to="fakeclient1.com")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_create_access_rule_cert_with_wrong_share_id(self, client_name):
|
def test_create_access_rule_cert_with_wrong_share_id(self, client_name):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
@ -333,14 +333,14 @@ class ShareCephxRulesForCephFSNegativeTest(base.BaseSharesTest):
|
|||||||
cls.access_type = "cephx"
|
cls.access_type = "cephx"
|
||||||
cls.access_to = "david"
|
cls.access_to = "david"
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('jane.doe', u"bj\u00F6rn")
|
@ddt.data('jane.doe', u"bj\u00F6rn")
|
||||||
def test_create_access_rule_cephx_with_invalid_cephx_id(self, access_to):
|
def test_create_access_rule_cephx_with_invalid_cephx_id(self, access_to):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
self.shares_v2_client.create_access_rule,
|
self.shares_v2_client.create_access_rule,
|
||||||
self.share["id"], self.access_type, access_to)
|
self.share["id"], self.access_type, access_to)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_create_access_rule_cephx_with_wrong_level(self):
|
def test_create_access_rule_cephx_with_wrong_level(self):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
self.shares_v2_client.create_access_rule,
|
self.shares_v2_client.create_access_rule,
|
||||||
@ -383,7 +383,7 @@ class ShareRulesNegativeTest(base.BaseSharesTest):
|
|||||||
# create snapshot
|
# create snapshot
|
||||||
cls.snap = cls.create_snapshot_wait_for_active(cls.share["id"])
|
cls.snap = cls.create_snapshot_wait_for_active(cls.share["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_delete_access_rule_with_wrong_id(self, client_name):
|
def test_delete_access_rule_with_wrong_id(self, client_name):
|
||||||
skip_if_cephx_access_type_not_supported_by_client(self, client_name)
|
skip_if_cephx_access_type_not_supported_by_client(self, client_name)
|
||||||
@ -391,7 +391,7 @@ class ShareRulesNegativeTest(base.BaseSharesTest):
|
|||||||
getattr(self, client_name).delete_access_rule,
|
getattr(self, client_name).delete_access_rule,
|
||||||
self.share["id"], "wrong_rule_id")
|
self.share["id"], "wrong_rule_id")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_create_access_rule_ip_with_wrong_type(self, client_name):
|
def test_create_access_rule_ip_with_wrong_type(self, client_name):
|
||||||
skip_if_cephx_access_type_not_supported_by_client(self, client_name)
|
skip_if_cephx_access_type_not_supported_by_client(self, client_name)
|
||||||
@ -399,7 +399,7 @@ class ShareRulesNegativeTest(base.BaseSharesTest):
|
|||||||
getattr(self, client_name).create_access_rule,
|
getattr(self, client_name).create_access_rule,
|
||||||
self.share["id"], "wrong_type", "1.2.3.4")
|
self.share["id"], "wrong_type", "1.2.3.4")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
@ -413,7 +413,7 @@ class ShareRulesNegativeTest(base.BaseSharesTest):
|
|||||||
@ddt.ddt
|
@ddt.ddt
|
||||||
class ShareRulesAPIOnlyNegativeTest(base.BaseSharesTest):
|
class ShareRulesAPIOnlyNegativeTest(base.BaseSharesTest):
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
@ddt.data('shares_client', 'shares_v2_client')
|
@ddt.data('shares_client', 'shares_v2_client')
|
||||||
def test_create_access_rule_ip_with_wrong_share_id(self, client_name):
|
def test_create_access_rule_ip_with_wrong_share_id(self, client_name):
|
||||||
skip_if_cephx_access_type_not_supported_by_client(self, client_name)
|
skip_if_cephx_access_type_not_supported_by_client(self, client_name)
|
||||||
|
@ -14,19 +14,19 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
|
|
||||||
class SchedulerStatsNegativeTest(base.BaseSharesTest):
|
class SchedulerStatsNegativeTest(base.BaseSharesTest):
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_list_pools_with_user(self):
|
def test_try_list_pools_with_user(self):
|
||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.shares_client.list_pools)
|
self.shares_client.list_pools)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_list_pools_detailed_with_user(self):
|
def test_try_list_pools_detailed_with_user(self):
|
||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.shares_client.list_pools,
|
self.shares_client.list_pools,
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
import six
|
import six
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ LOG = log.getLogger(__name__)
|
|||||||
|
|
||||||
class SecurityServiceListMixin(object):
|
class SecurityServiceListMixin(object):
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_list_security_services(self):
|
def test_list_security_services(self):
|
||||||
listed = self.shares_client.list_security_services()
|
listed = self.shares_client.list_security_services()
|
||||||
self.assertTrue(any(self.ss_ldap['id'] == ss['id'] for ss in listed))
|
self.assertTrue(any(self.ss_ldap['id'] == ss['id'] for ss in listed))
|
||||||
@ -38,7 +38,7 @@ class SecurityServiceListMixin(object):
|
|||||||
keys = ["name", "id", "status", "type", ]
|
keys = ["name", "id", "status", "type", ]
|
||||||
[self.assertIn(key, s_s.keys()) for s_s in listed for key in keys]
|
[self.assertIn(key, s_s.keys()) for s_s in listed for key in keys]
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_list_security_services_with_detail(self):
|
def test_list_security_services_with_detail(self):
|
||||||
listed = self.shares_client.list_security_services(detailed=True)
|
listed = self.shares_client.list_security_services(detailed=True)
|
||||||
self.assertTrue(any(self.ss_ldap['id'] == ss['id'] for ss in listed))
|
self.assertTrue(any(self.ss_ldap['id'] == ss['id'] for ss in listed))
|
||||||
@ -53,7 +53,7 @@ class SecurityServiceListMixin(object):
|
|||||||
]
|
]
|
||||||
[self.assertIn(key, s_s.keys()) for s_s in listed for key in keys]
|
[self.assertIn(key, s_s.keys()) for s_s in listed for key in keys]
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
@testtools.skipIf(
|
@testtools.skipIf(
|
||||||
not CONF.share.multitenancy_enabled, "Only for multitenancy.")
|
not CONF.share.multitenancy_enabled, "Only for multitenancy.")
|
||||||
def test_list_security_services_filter_by_share_network(self):
|
def test_list_security_services_filter_by_share_network(self):
|
||||||
@ -79,7 +79,7 @@ class SecurityServiceListMixin(object):
|
|||||||
keys = ["name", "id", "status", "type", ]
|
keys = ["name", "id", "status", "type", ]
|
||||||
[self.assertIn(key, s_s.keys()) for s_s in listed for key in keys]
|
[self.assertIn(key, s_s.keys()) for s_s in listed for key in keys]
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_list_security_services_detailed_filter_by_ss_attributes(self):
|
def test_list_security_services_detailed_filter_by_ss_attributes(self):
|
||||||
search_opts = {
|
search_opts = {
|
||||||
'name': 'ss_ldap',
|
'name': 'ss_ldap',
|
||||||
@ -122,7 +122,7 @@ class SecurityServicesTest(base.BaseSharesTest,
|
|||||||
self.ss_kerberos = self.create_security_service(
|
self.ss_kerberos = self.create_security_service(
|
||||||
'kerberos', **ss_kerberos_data)
|
'kerberos', **ss_kerberos_data)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_create_delete_security_service(self):
|
def test_create_delete_security_service(self):
|
||||||
data = self.generate_security_service_data()
|
data = self.generate_security_service_data()
|
||||||
self.service_names = ["ldap", "kerberos", "active_directory"]
|
self.service_names = ["ldap", "kerberos", "active_directory"]
|
||||||
@ -132,7 +132,7 @@ class SecurityServicesTest(base.BaseSharesTest,
|
|||||||
self.assertEqual(ss_name, ss["type"])
|
self.assertEqual(ss_name, ss["type"])
|
||||||
self.shares_client.delete_security_service(ss["id"])
|
self.shares_client.delete_security_service(ss["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_get_security_service(self):
|
def test_get_security_service(self):
|
||||||
data = self.generate_security_service_data()
|
data = self.generate_security_service_data()
|
||||||
ss = self.create_security_service(**data)
|
ss = self.create_security_service(**data)
|
||||||
@ -141,7 +141,7 @@ class SecurityServicesTest(base.BaseSharesTest,
|
|||||||
get = self.shares_client.get_security_service(ss["id"])
|
get = self.shares_client.get_security_service(ss["id"])
|
||||||
self.assertDictContainsSubset(data, get)
|
self.assertDictContainsSubset(data, get)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_update_security_service(self):
|
def test_update_security_service(self):
|
||||||
data = self.generate_security_service_data()
|
data = self.generate_security_service_data()
|
||||||
ss = self.create_security_service(**data)
|
ss = self.create_security_service(**data)
|
||||||
@ -155,7 +155,7 @@ class SecurityServicesTest(base.BaseSharesTest,
|
|||||||
self.assertDictContainsSubset(upd_data, updated)
|
self.assertDictContainsSubset(upd_data, updated)
|
||||||
self.assertDictContainsSubset(upd_data, get)
|
self.assertDictContainsSubset(upd_data, get)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipIf(
|
@testtools.skipIf(
|
||||||
not CONF.share.multitenancy_enabled, "Only for multitenancy.")
|
not CONF.share.multitenancy_enabled, "Only for multitenancy.")
|
||||||
def test_try_update_valid_keys_sh_server_exists(self):
|
def test_try_update_valid_keys_sh_server_exists(self):
|
||||||
@ -193,7 +193,7 @@ class SecurityServicesTest(base.BaseSharesTest,
|
|||||||
ss["id"], **update_data)
|
ss["id"], **update_data)
|
||||||
self.assertDictContainsSubset(update_data, updated)
|
self.assertDictContainsSubset(update_data, updated)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_list_security_services_filter_by_invalid_opt(self):
|
def test_list_security_services_filter_by_invalid_opt(self):
|
||||||
listed = self.shares_client.list_security_services(
|
listed = self.shares_client.list_security_services(
|
||||||
params={'fake_opt': 'some_value'})
|
params={'fake_opt': 'some_value'})
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ class SecurityServicesMappingTest(base.BaseSharesTest):
|
|||||||
# Add security service to share network
|
# Add security service to share network
|
||||||
self.cl.add_sec_service_to_share_network(self.sn["id"], self.ss["id"])
|
self.cl.add_sec_service_to_share_network(self.sn["id"], self.ss["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_map_ss_to_sn_and_list(self):
|
def test_map_ss_to_sn_and_list(self):
|
||||||
|
|
||||||
# List security services for share network
|
# List security services for share network
|
||||||
@ -52,14 +52,14 @@ class SecurityServicesMappingTest(base.BaseSharesTest):
|
|||||||
for key in ["status", "id", "name"]:
|
for key in ["status", "id", "name"]:
|
||||||
self.assertIn(self.ss[key], ls[0][key])
|
self.assertIn(self.ss[key], ls[0][key])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_map_ss_to_sn_and_delete(self):
|
def test_map_ss_to_sn_and_delete(self):
|
||||||
|
|
||||||
# Remove security service from share network
|
# Remove security service from share network
|
||||||
self.cl.remove_sec_service_from_share_network(
|
self.cl.remove_sec_service_from_share_network(
|
||||||
self.sn["id"], self.ss["id"])
|
self.sn["id"], self.ss["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_remap_ss_to_sn(self):
|
def test_remap_ss_to_sn(self):
|
||||||
|
|
||||||
# Remove security service from share network
|
# Remove security service from share network
|
||||||
|
@ -17,8 +17,8 @@ from oslo_log import log
|
|||||||
import six
|
import six
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -35,62 +35,62 @@ class SecServicesMappingNegativeTest(base.BaseSharesTest):
|
|||||||
cls.ss = cls.create_security_service(cleanup_in_class=True)
|
cls.ss = cls.create_security_service(cleanup_in_class=True)
|
||||||
cls.cl = cls.shares_client
|
cls.cl = cls.shares_client
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_add_sec_service_twice_to_share_network(self):
|
def test_add_sec_service_twice_to_share_network(self):
|
||||||
self.cl.add_sec_service_to_share_network(self.sn["id"], self.ss["id"])
|
self.cl.add_sec_service_to_share_network(self.sn["id"], self.ss["id"])
|
||||||
self.assertRaises(lib_exc.Conflict,
|
self.assertRaises(lib_exc.Conflict,
|
||||||
self.cl.add_sec_service_to_share_network,
|
self.cl.add_sec_service_to_share_network,
|
||||||
self.sn["id"], self.ss["id"])
|
self.sn["id"], self.ss["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_add_nonexistant_sec_service_to_share_network(self):
|
def test_add_nonexistant_sec_service_to_share_network(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.cl.add_sec_service_to_share_network,
|
self.cl.add_sec_service_to_share_network,
|
||||||
self.sn["id"], "wrong_ss_id")
|
self.sn["id"], "wrong_ss_id")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_add_empty_sec_service_id_to_share_network(self):
|
def test_add_empty_sec_service_id_to_share_network(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.cl.add_sec_service_to_share_network,
|
self.cl.add_sec_service_to_share_network,
|
||||||
self.sn["id"], "")
|
self.sn["id"], "")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_add_sec_service_to_nonexistant_share_network(self):
|
def test_add_sec_service_to_nonexistant_share_network(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.cl.add_sec_service_to_share_network,
|
self.cl.add_sec_service_to_share_network,
|
||||||
"wrong_sn_id", self.ss["id"])
|
"wrong_sn_id", self.ss["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_add_sec_service_to_share_network_with_empty_id(self):
|
def test_add_sec_service_to_share_network_with_empty_id(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.cl.add_sec_service_to_share_network,
|
self.cl.add_sec_service_to_share_network,
|
||||||
"", self.ss["id"])
|
"", self.ss["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_list_sec_services_for_nonexistant_share_network(self):
|
def test_list_sec_services_for_nonexistant_share_network(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.cl.list_sec_services_for_share_network,
|
self.cl.list_sec_services_for_share_network,
|
||||||
"wrong_id")
|
"wrong_id")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_delete_nonexistant_sec_service_from_share_network(self):
|
def test_delete_nonexistant_sec_service_from_share_network(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.cl.remove_sec_service_from_share_network,
|
self.cl.remove_sec_service_from_share_network,
|
||||||
self.sn["id"], "wrong_id")
|
self.sn["id"], "wrong_id")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_delete_sec_service_from_nonexistant_share_network(self):
|
def test_delete_sec_service_from_nonexistant_share_network(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.cl.remove_sec_service_from_share_network,
|
self.cl.remove_sec_service_from_share_network,
|
||||||
"wrong_id", self.ss["id"])
|
"wrong_id", self.ss["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_delete_nonexistant_ss_from_nonexistant_sn(self):
|
def test_delete_nonexistant_ss_from_nonexistant_sn(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.cl.remove_sec_service_from_share_network,
|
self.cl.remove_sec_service_from_share_network,
|
||||||
"wrong_id", "wrong_id")
|
"wrong_id", "wrong_id")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipIf(
|
@testtools.skipIf(
|
||||||
not CONF.share.multitenancy_enabled, "Only for multitenancy.")
|
not CONF.share.multitenancy_enabled, "Only for multitenancy.")
|
||||||
def test_delete_ss_from_sn_used_by_share_server(self):
|
def test_delete_ss_from_sn_used_by_share_server(self):
|
||||||
@ -122,7 +122,7 @@ class SecServicesMappingNegativeTest(base.BaseSharesTest):
|
|||||||
fresh_sn["id"],
|
fresh_sn["id"],
|
||||||
self.ss["id"])
|
self.ss["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_map_two_ss_with_same_type_to_sn(self):
|
def test_try_map_two_ss_with_same_type_to_sn(self):
|
||||||
# create share network
|
# create share network
|
||||||
data = self.generate_share_network_data()
|
data = self.generate_share_network_data()
|
||||||
@ -147,7 +147,7 @@ class SecServicesMappingNegativeTest(base.BaseSharesTest):
|
|||||||
self.cl.add_sec_service_to_share_network,
|
self.cl.add_sec_service_to_share_network,
|
||||||
sn["id"], security_services[1]["id"])
|
sn["id"], security_services[1]["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_delete_ss_that_assigned_to_sn(self):
|
def test_try_delete_ss_that_assigned_to_sn(self):
|
||||||
# create share network
|
# create share network
|
||||||
data = self.generate_share_network_data()
|
data = self.generate_share_network_data()
|
||||||
|
@ -17,8 +17,8 @@ from oslo_log import log
|
|||||||
import six
|
import six
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -28,52 +28,52 @@ LOG = log.getLogger(__name__)
|
|||||||
|
|
||||||
class SecurityServicesNegativeTest(base.BaseSharesTest):
|
class SecurityServicesNegativeTest(base.BaseSharesTest):
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_create_security_service_with_empty_type(self):
|
def test_try_create_security_service_with_empty_type(self):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
self.shares_client.create_security_service, "")
|
self.shares_client.create_security_service, "")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_create_security_service_with_wrong_type(self):
|
def test_try_create_security_service_with_wrong_type(self):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
self.shares_client.create_security_service,
|
self.shares_client.create_security_service,
|
||||||
"wrong_type")
|
"wrong_type")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_get_security_service_without_id(self):
|
def test_try_get_security_service_without_id(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.shares_client.get_security_service, "")
|
self.shares_client.get_security_service, "")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_get_security_service_with_wrong_id(self):
|
def test_try_get_security_service_with_wrong_id(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.shares_client.get_security_service,
|
self.shares_client.get_security_service,
|
||||||
"wrong_id")
|
"wrong_id")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_delete_security_service_without_id(self):
|
def test_try_delete_security_service_without_id(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.shares_client.delete_security_service, "")
|
self.shares_client.delete_security_service, "")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_delete_security_service_with_wrong_type(self):
|
def test_try_delete_security_service_with_wrong_type(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.shares_client.delete_security_service,
|
self.shares_client.delete_security_service,
|
||||||
"wrong_id")
|
"wrong_id")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_update_nonexistant_security_service(self):
|
def test_try_update_nonexistant_security_service(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.shares_client.update_security_service,
|
self.shares_client.update_security_service,
|
||||||
"wrong_id", name="name")
|
"wrong_id", name="name")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_update_security_service_with_empty_id(self):
|
def test_try_update_security_service_with_empty_id(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.shares_client.update_security_service,
|
self.shares_client.update_security_service,
|
||||||
"", name="name")
|
"", name="name")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipIf(
|
@testtools.skipIf(
|
||||||
not CONF.share.multitenancy_enabled, "Only for multitenancy.")
|
not CONF.share.multitenancy_enabled, "Only for multitenancy.")
|
||||||
def test_try_update_invalid_keys_sh_server_exists(self):
|
def test_try_update_invalid_keys_sh_server_exists(self):
|
||||||
@ -108,7 +108,7 @@ class SecurityServicesNegativeTest(base.BaseSharesTest):
|
|||||||
ss["id"],
|
ss["id"],
|
||||||
user="new_user")
|
user="new_user")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_get_deleted_security_service(self):
|
def test_get_deleted_security_service(self):
|
||||||
data = self.generate_security_service_data()
|
data = self.generate_security_service_data()
|
||||||
ss = self.create_security_service(**data)
|
ss = self.create_security_service(**data)
|
||||||
@ -121,7 +121,7 @@ class SecurityServicesNegativeTest(base.BaseSharesTest):
|
|||||||
self.shares_client.get_security_service,
|
self.shares_client.get_security_service,
|
||||||
ss["id"])
|
ss["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_list_security_services_all_tenants(self):
|
def test_try_list_security_services_all_tenants(self):
|
||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.shares_client.list_security_services,
|
self.shares_client.list_security_services,
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
import six
|
import six
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
from manila_tempest_tests import utils
|
from manila_tempest_tests import utils
|
||||||
@ -26,8 +26,8 @@ CONF = config.CONF
|
|||||||
|
|
||||||
class ShareNetworkListMixin(object):
|
class ShareNetworkListMixin(object):
|
||||||
|
|
||||||
@test.attr(type=["gate", "smoke", ])
|
@tc.attr("gate", "smoke", )
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_list_share_networks(self):
|
def test_list_share_networks(self):
|
||||||
listed = self.shares_client.list_share_networks()
|
listed = self.shares_client.list_share_networks()
|
||||||
any(self.sn_with_ldap_ss["id"] in sn["id"] for sn in listed)
|
any(self.sn_with_ldap_ss["id"] in sn["id"] for sn in listed)
|
||||||
@ -36,7 +36,7 @@ class ShareNetworkListMixin(object):
|
|||||||
keys = ["name", "id"]
|
keys = ["name", "id"]
|
||||||
[self.assertIn(key, sn.keys()) for sn in listed for key in keys]
|
[self.assertIn(key, sn.keys()) for sn in listed for key in keys]
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_list_share_networks_with_detail(self):
|
def test_list_share_networks_with_detail(self):
|
||||||
listed = self.shares_v2_client.list_share_networks_with_detail()
|
listed = self.shares_v2_client.list_share_networks_with_detail()
|
||||||
any(self.sn_with_ldap_ss["id"] in sn["id"] for sn in listed)
|
any(self.sn_with_ldap_ss["id"] in sn["id"] for sn in listed)
|
||||||
@ -59,7 +59,7 @@ class ShareNetworkListMixin(object):
|
|||||||
|
|
||||||
[self.assertIn(key, sn.keys()) for sn in listed for key in keys]
|
[self.assertIn(key, sn.keys()) for sn in listed for key in keys]
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_list_share_networks_filter_by_ss(self):
|
def test_list_share_networks_filter_by_ss(self):
|
||||||
listed = self.shares_client.list_share_networks_with_detail(
|
listed = self.shares_client.list_share_networks_with_detail(
|
||||||
{'security_service_id': self.ss_ldap['id']})
|
{'security_service_id': self.ss_ldap['id']})
|
||||||
@ -71,7 +71,7 @@ class ShareNetworkListMixin(object):
|
|||||||
self.assertTrue(any(ss['id'] == self.ss_ldap['id']
|
self.assertTrue(any(ss['id'] == self.ss_ldap['id']
|
||||||
for ss in ss_list))
|
for ss in ss_list))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_list_share_networks_all_filter_opts(self):
|
def test_list_share_networks_all_filter_opts(self):
|
||||||
valid_filter_opts = {
|
valid_filter_opts = {
|
||||||
'created_before': '2002-10-10',
|
'created_before': '2002-10-10',
|
||||||
@ -151,7 +151,7 @@ class ShareNetworksTest(base.BaseSharesTest, ShareNetworkListMixin):
|
|||||||
cls.sn_with_kerberos_ss["id"],
|
cls.sn_with_kerberos_ss["id"],
|
||||||
cls.ss_kerberos["id"])
|
cls.ss_kerberos["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_create_delete_share_network(self):
|
def test_create_delete_share_network(self):
|
||||||
# generate data for share network
|
# generate data for share network
|
||||||
data = self.generate_share_network_data()
|
data = self.generate_share_network_data()
|
||||||
@ -163,7 +163,7 @@ class ShareNetworksTest(base.BaseSharesTest, ShareNetworkListMixin):
|
|||||||
# Delete share_network
|
# Delete share_network
|
||||||
self.shares_client.delete_share_network(created["id"])
|
self.shares_client.delete_share_network(created["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_get_share_network(self):
|
def test_get_share_network(self):
|
||||||
get = self.shares_client.get_share_network(self.sn_with_ldap_ss["id"])
|
get = self.shares_client.get_share_network(self.sn_with_ldap_ss["id"])
|
||||||
self.assertEqual('2002-02-02T00:00:00.000000', get['created_at'])
|
self.assertEqual('2002-02-02T00:00:00.000000', get['created_at'])
|
||||||
@ -171,7 +171,7 @@ class ShareNetworksTest(base.BaseSharesTest, ShareNetworkListMixin):
|
|||||||
del data['created_at']
|
del data['created_at']
|
||||||
self.assertDictContainsSubset(data, get)
|
self.assertDictContainsSubset(data, get)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_update_share_network(self):
|
def test_update_share_network(self):
|
||||||
update_data = self.generate_share_network_data()
|
update_data = self.generate_share_network_data()
|
||||||
updated = self.shares_client.update_share_network(
|
updated = self.shares_client.update_share_network(
|
||||||
@ -179,7 +179,7 @@ class ShareNetworksTest(base.BaseSharesTest, ShareNetworkListMixin):
|
|||||||
**update_data)
|
**update_data)
|
||||||
self.assertDictContainsSubset(update_data, updated)
|
self.assertDictContainsSubset(update_data, updated)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipIf(
|
@testtools.skipIf(
|
||||||
not CONF.share.multitenancy_enabled, "Only for multitenancy.")
|
not CONF.share.multitenancy_enabled, "Only for multitenancy.")
|
||||||
def test_update_valid_keys_sh_server_exists(self):
|
def test_update_valid_keys_sh_server_exists(self):
|
||||||
@ -192,7 +192,7 @@ class ShareNetworksTest(base.BaseSharesTest, ShareNetworkListMixin):
|
|||||||
self.shares_client.share_network_id, **update_dict)
|
self.shares_client.share_network_id, **update_dict)
|
||||||
self.assertDictContainsSubset(update_dict, updated)
|
self.assertDictContainsSubset(update_dict, updated)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_recreate_share_network(self):
|
def test_recreate_share_network(self):
|
||||||
# generate data for share network
|
# generate data for share network
|
||||||
data = self.generate_share_network_data()
|
data = self.generate_share_network_data()
|
||||||
@ -211,7 +211,7 @@ class ShareNetworksTest(base.BaseSharesTest, ShareNetworkListMixin):
|
|||||||
# Delete second share network
|
# Delete second share network
|
||||||
self.shares_client.delete_share_network(sn2["id"])
|
self.shares_client.delete_share_network(sn2["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
|
||||||
def test_create_two_share_networks_with_same_net_and_subnet(self):
|
def test_create_two_share_networks_with_same_net_and_subnet(self):
|
||||||
# generate data for share network
|
# generate data for share network
|
||||||
data = self.generate_share_network_data()
|
data = self.generate_share_network_data()
|
||||||
@ -230,7 +230,7 @@ class ShareNetworksTest(base.BaseSharesTest, ShareNetworkListMixin):
|
|||||||
"Only for multitenancy.")
|
"Only for multitenancy.")
|
||||||
@testtools.skipUnless(CONF.service_available.neutron, "Only with neutron.")
|
@testtools.skipUnless(CONF.service_available.neutron, "Only with neutron.")
|
||||||
@base.skip_if_microversion_lt("2.18")
|
@base.skip_if_microversion_lt("2.18")
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_gateway_with_neutron(self):
|
def test_gateway_with_neutron(self):
|
||||||
os = getattr(self, 'os_%s' % self.credentials[0])
|
os = getattr(self, 'os_%s' % self.credentials[0])
|
||||||
subnet_client = os.subnets_client
|
subnet_client = os.subnets_client
|
||||||
@ -250,7 +250,7 @@ class ShareNetworksTest(base.BaseSharesTest, ShareNetworkListMixin):
|
|||||||
"Only for multitenancy.")
|
"Only for multitenancy.")
|
||||||
@testtools.skipUnless(CONF.service_available.neutron, "Only with neutron.")
|
@testtools.skipUnless(CONF.service_available.neutron, "Only with neutron.")
|
||||||
@base.skip_if_microversion_lt("2.20")
|
@base.skip_if_microversion_lt("2.20")
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_mtu_with_neutron(self):
|
def test_mtu_with_neutron(self):
|
||||||
os = getattr(self, 'os_%s' % self.credentials[0])
|
os = getattr(self, 'os_%s' % self.credentials[0])
|
||||||
network_client = os.networks_client
|
network_client = os.networks_client
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -25,39 +25,39 @@ CONF = config.CONF
|
|||||||
|
|
||||||
class ShareNetworksNegativeTest(base.BaseSharesTest):
|
class ShareNetworksNegativeTest(base.BaseSharesTest):
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_get_share_network_without_id(self):
|
def test_try_get_share_network_without_id(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.shares_client.get_share_network, "")
|
self.shares_client.get_share_network, "")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_get_share_network_with_wrong_id(self):
|
def test_try_get_share_network_with_wrong_id(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.shares_client.get_share_network, "wrong_id")
|
self.shares_client.get_share_network, "wrong_id")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_delete_share_network_without_id(self):
|
def test_try_delete_share_network_without_id(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.shares_client.delete_share_network, "")
|
self.shares_client.delete_share_network, "")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_delete_share_network_with_wrong_type(self):
|
def test_try_delete_share_network_with_wrong_type(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.shares_client.delete_share_network, "wrong_id")
|
self.shares_client.delete_share_network, "wrong_id")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_update_nonexistant_share_network(self):
|
def test_try_update_nonexistant_share_network(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.shares_client.update_share_network,
|
self.shares_client.update_share_network,
|
||||||
"wrong_id", name="name")
|
"wrong_id", name="name")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_update_share_network_with_empty_id(self):
|
def test_try_update_share_network_with_empty_id(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.shares_client.update_share_network,
|
self.shares_client.update_share_network,
|
||||||
"", name="name")
|
"", name="name")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipIf(
|
@testtools.skipIf(
|
||||||
not CONF.share.multitenancy_enabled, "Only for multitenancy.")
|
not CONF.share.multitenancy_enabled, "Only for multitenancy.")
|
||||||
def test_try_update_invalid_keys_sh_server_exists(self):
|
def test_try_update_invalid_keys_sh_server_exists(self):
|
||||||
@ -68,7 +68,7 @@ class ShareNetworksNegativeTest(base.BaseSharesTest):
|
|||||||
self.shares_client.share_network_id,
|
self.shares_client.share_network_id,
|
||||||
neutron_net_id="new_net_id")
|
neutron_net_id="new_net_id")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_get_deleted_share_network(self):
|
def test_try_get_deleted_share_network(self):
|
||||||
data = self.generate_share_network_data()
|
data = self.generate_share_network_data()
|
||||||
sn = self.create_share_network(**data)
|
sn = self.create_share_network(**data)
|
||||||
@ -81,33 +81,33 @@ class ShareNetworksNegativeTest(base.BaseSharesTest):
|
|||||||
self.shares_client.get_security_service,
|
self.shares_client.get_security_service,
|
||||||
sn["id"])
|
sn["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_list_share_networks_all_tenants(self):
|
def test_try_list_share_networks_all_tenants(self):
|
||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.shares_client.list_share_networks_with_detail,
|
self.shares_client.list_share_networks_with_detail,
|
||||||
params={'all_tenants': 1})
|
params={'all_tenants': 1})
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_list_share_networks_project_id(self):
|
def test_try_list_share_networks_project_id(self):
|
||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.shares_client.list_share_networks_with_detail,
|
self.shares_client.list_share_networks_with_detail,
|
||||||
params={'project_id': 'some_project'})
|
params={'project_id': 'some_project'})
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_list_share_networks_wrong_created_since_value(self):
|
def test_try_list_share_networks_wrong_created_since_value(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.BadRequest,
|
lib_exc.BadRequest,
|
||||||
self.shares_client.list_share_networks_with_detail,
|
self.shares_client.list_share_networks_with_detail,
|
||||||
params={'created_since': '2014-10-23T08:31:58.000000'})
|
params={'created_since': '2014-10-23T08:31:58.000000'})
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_list_share_networks_wrong_created_before_value(self):
|
def test_try_list_share_networks_wrong_created_before_value(self):
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
lib_exc.BadRequest,
|
lib_exc.BadRequest,
|
||||||
self.shares_client.list_share_networks_with_detail,
|
self.shares_client.list_share_networks_with_detail,
|
||||||
params={'created_before': '2014-10-23T08:31:58.000000'})
|
params={'created_before': '2014-10-23T08:31:58.000000'})
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipIf(not CONF.share.multitenancy_enabled,
|
@testtools.skipIf(not CONF.share.multitenancy_enabled,
|
||||||
'Can run only with drivers that do handle share servers '
|
'Can run only with drivers that do handle share servers '
|
||||||
'creation. Skipping.')
|
'creation. Skipping.')
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -36,27 +36,27 @@ class ShareTypesNegativeTest(base.BaseSharesMixedTest):
|
|||||||
cls.admin_client = cls.admin_shares_v2_client
|
cls.admin_client = cls.admin_shares_v2_client
|
||||||
cls.st = cls._create_share_type()
|
cls.st = cls._create_share_type()
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_create_share_type_with_user(self):
|
def test_try_create_share_type_with_user(self):
|
||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.create_share_type,
|
self.create_share_type,
|
||||||
data_utils.rand_name("used_user_creds"),
|
data_utils.rand_name("used_user_creds"),
|
||||||
client=self.shares_client)
|
client=self.shares_client)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_delete_share_type_with_user(self):
|
def test_try_delete_share_type_with_user(self):
|
||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.shares_client.delete_share_type,
|
self.shares_client.delete_share_type,
|
||||||
self.st["share_type"]["id"])
|
self.st["share_type"]["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_add_access_to_share_type_with_user(self):
|
def test_try_add_access_to_share_type_with_user(self):
|
||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.shares_client.add_access_to_share_type,
|
self.shares_client.add_access_to_share_type,
|
||||||
self.st['share_type']['id'],
|
self.st['share_type']['id'],
|
||||||
self.shares_client.tenant_id)
|
self.shares_client.tenant_id)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_try_remove_access_from_share_type_with_user(self):
|
def test_try_remove_access_from_share_type_with_user(self):
|
||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.shares_client.remove_access_from_share_type,
|
self.shares_client.remove_access_from_share_type,
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
from manila_tempest_tests import utils
|
from manila_tempest_tests import utils
|
||||||
@ -36,7 +36,7 @@ class SharesNFSTest(base.BaseSharesTest):
|
|||||||
raise cls.skipException(message)
|
raise cls.skipException(message)
|
||||||
cls.share = cls.create_share(cls.protocol)
|
cls.share = cls.create_share(cls.protocol)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
def test_create_get_delete_share(self):
|
def test_create_get_delete_share(self):
|
||||||
|
|
||||||
share = self.create_share(self.protocol)
|
share = self.create_share(self.protocol)
|
||||||
@ -99,7 +99,7 @@ class SharesNFSTest(base.BaseSharesTest):
|
|||||||
self.shares_v2_client.get_share,
|
self.shares_v2_client.get_share,
|
||||||
share['id'])
|
share['id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
def test_create_delete_snapshot(self):
|
def test_create_delete_snapshot(self):
|
||||||
@ -133,7 +133,7 @@ class SharesNFSTest(base.BaseSharesTest):
|
|||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.shares_client.get_snapshot, snap['id'])
|
self.shares_client.get_snapshot, snap['id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
def test_create_share_from_snapshot(self):
|
def test_create_share_from_snapshot(self):
|
||||||
@ -159,7 +159,7 @@ class SharesNFSTest(base.BaseSharesTest):
|
|||||||
"source of share %s" % (snap["id"], get["snapshot_id"])
|
"source of share %s" % (snap["id"], get["snapshot_id"])
|
||||||
self.assertEqual(get["snapshot_id"], snap["id"], msg)
|
self.assertEqual(get["snapshot_id"], snap["id"], msg)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
@testtools.skipIf(not CONF.share.multitenancy_enabled,
|
@testtools.skipIf(not CONF.share.multitenancy_enabled,
|
||||||
"Only for multitenancy.")
|
"Only for multitenancy.")
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
|
@ -17,8 +17,8 @@ import ddt
|
|||||||
import six
|
import six
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
from manila_tempest_tests import utils
|
from manila_tempest_tests import utils
|
||||||
@ -119,45 +119,45 @@ class SharesActionsTest(base.BaseSharesTest):
|
|||||||
CONF.share.share_size, share["size"])
|
CONF.share.share_size, share["size"])
|
||||||
self.assertEqual(CONF.share.share_size, int(share["size"]), msg)
|
self.assertEqual(CONF.share.share_size, int(share["size"]), msg)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_get_share_v2_1(self):
|
def test_get_share_v2_1(self):
|
||||||
self._get_share('2.1')
|
self._get_share('2.1')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_get_share_with_snapshot_support_key(self):
|
def test_get_share_with_snapshot_support_key(self):
|
||||||
self._get_share('2.2')
|
self._get_share('2.2')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@utils.skip_if_microversion_not_supported('2.4')
|
@utils.skip_if_microversion_not_supported('2.4')
|
||||||
def test_get_share_with_consistency_groups_keys(self):
|
def test_get_share_with_consistency_groups_keys(self):
|
||||||
self._get_share('2.4')
|
self._get_share('2.4')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@utils.skip_if_microversion_not_supported('2.6')
|
@utils.skip_if_microversion_not_supported('2.6')
|
||||||
def test_get_share_with_share_type_name_key(self):
|
def test_get_share_with_share_type_name_key(self):
|
||||||
self._get_share('2.6')
|
self._get_share('2.6')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@utils.skip_if_microversion_not_supported('2.9')
|
@utils.skip_if_microversion_not_supported('2.9')
|
||||||
def test_get_share_export_locations_removed(self):
|
def test_get_share_export_locations_removed(self):
|
||||||
self._get_share('2.9')
|
self._get_share('2.9')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@utils.skip_if_microversion_not_supported('2.10')
|
@utils.skip_if_microversion_not_supported('2.10')
|
||||||
def test_get_share_with_access_rules_status(self):
|
def test_get_share_with_access_rules_status(self):
|
||||||
self._get_share('2.10')
|
self._get_share('2.10')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@utils.skip_if_microversion_not_supported('2.11')
|
@utils.skip_if_microversion_not_supported('2.11')
|
||||||
def test_get_share_with_replication_type_key(self):
|
def test_get_share_with_replication_type_key(self):
|
||||||
self._get_share('2.11')
|
self._get_share('2.11')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@utils.skip_if_microversion_not_supported('2.16')
|
@utils.skip_if_microversion_not_supported('2.16')
|
||||||
def test_get_share_with_user_id(self):
|
def test_get_share_with_user_id(self):
|
||||||
self._get_share('2.16')
|
self._get_share('2.16')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_shares(self):
|
def test_list_shares(self):
|
||||||
|
|
||||||
# list shares
|
# list shares
|
||||||
@ -209,45 +209,45 @@ class SharesActionsTest(base.BaseSharesTest):
|
|||||||
msg = "expected id lists %s times in share list" % (len(gen))
|
msg = "expected id lists %s times in share list" % (len(gen))
|
||||||
self.assertEqual(1, len(gen), msg)
|
self.assertEqual(1, len(gen), msg)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_shares_with_detail_v2_1(self):
|
def test_list_shares_with_detail_v2_1(self):
|
||||||
self._list_shares_with_detail('2.1')
|
self._list_shares_with_detail('2.1')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_shares_with_detail_and_snapshot_support_key(self):
|
def test_list_shares_with_detail_and_snapshot_support_key(self):
|
||||||
self._list_shares_with_detail('2.2')
|
self._list_shares_with_detail('2.2')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@utils.skip_if_microversion_not_supported('2.4')
|
@utils.skip_if_microversion_not_supported('2.4')
|
||||||
def test_list_shares_with_detail_consistency_groups_keys(self):
|
def test_list_shares_with_detail_consistency_groups_keys(self):
|
||||||
self._list_shares_with_detail('2.4')
|
self._list_shares_with_detail('2.4')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@utils.skip_if_microversion_not_supported('2.6')
|
@utils.skip_if_microversion_not_supported('2.6')
|
||||||
def test_list_shares_with_detail_share_type_name_key(self):
|
def test_list_shares_with_detail_share_type_name_key(self):
|
||||||
self._list_shares_with_detail('2.6')
|
self._list_shares_with_detail('2.6')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@utils.skip_if_microversion_not_supported('2.9')
|
@utils.skip_if_microversion_not_supported('2.9')
|
||||||
def test_list_shares_with_detail_export_locations_removed(self):
|
def test_list_shares_with_detail_export_locations_removed(self):
|
||||||
self._list_shares_with_detail('2.9')
|
self._list_shares_with_detail('2.9')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@utils.skip_if_microversion_not_supported('2.10')
|
@utils.skip_if_microversion_not_supported('2.10')
|
||||||
def test_list_shares_with_detail_with_access_rules_status(self):
|
def test_list_shares_with_detail_with_access_rules_status(self):
|
||||||
self._list_shares_with_detail('2.10')
|
self._list_shares_with_detail('2.10')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@utils.skip_if_microversion_not_supported('2.11')
|
@utils.skip_if_microversion_not_supported('2.11')
|
||||||
def test_list_shares_with_detail_replication_type_key(self):
|
def test_list_shares_with_detail_replication_type_key(self):
|
||||||
self._list_shares_with_detail('2.11')
|
self._list_shares_with_detail('2.11')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@utils.skip_if_microversion_not_supported('2.16')
|
@utils.skip_if_microversion_not_supported('2.16')
|
||||||
def test_list_shares_with_user_id(self):
|
def test_list_shares_with_user_id(self):
|
||||||
self._list_shares_with_detail('2.16')
|
self._list_shares_with_detail('2.16')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_shares_with_detail_filter_by_metadata(self):
|
def test_list_shares_with_detail_filter_by_metadata(self):
|
||||||
filters = {'metadata': self.metadata}
|
filters = {'metadata': self.metadata}
|
||||||
|
|
||||||
@ -262,7 +262,7 @@ class SharesActionsTest(base.BaseSharesTest):
|
|||||||
if CONF.share.run_snapshot_tests:
|
if CONF.share.run_snapshot_tests:
|
||||||
self.assertFalse(self.shares[1]['id'] in [s['id'] for s in shares])
|
self.assertFalse(self.shares[1]['id'] in [s['id'] for s in shares])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_shares_with_detail_filter_by_host(self):
|
def test_list_shares_with_detail_filter_by_host(self):
|
||||||
base_share = self.shares_client.get_share(self.shares[0]['id'])
|
base_share = self.shares_client.get_share(self.shares[0]['id'])
|
||||||
filters = {'host': base_share['host']}
|
filters = {'host': base_share['host']}
|
||||||
@ -275,7 +275,7 @@ class SharesActionsTest(base.BaseSharesTest):
|
|||||||
for share in shares:
|
for share in shares:
|
||||||
self.assertEqual(filters['host'], share['host'])
|
self.assertEqual(filters['host'], share['host'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipIf(
|
@testtools.skipIf(
|
||||||
not CONF.share.multitenancy_enabled, "Only for multitenancy.")
|
not CONF.share.multitenancy_enabled, "Only for multitenancy.")
|
||||||
def test_list_shares_with_detail_filter_by_share_network_id(self):
|
def test_list_shares_with_detail_filter_by_share_network_id(self):
|
||||||
@ -291,7 +291,7 @@ class SharesActionsTest(base.BaseSharesTest):
|
|||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
filters['share_network_id'], share['share_network_id'])
|
filters['share_network_id'], share['share_network_id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
def test_list_shares_with_detail_filter_by_snapshot_id(self):
|
def test_list_shares_with_detail_filter_by_snapshot_id(self):
|
||||||
@ -306,7 +306,7 @@ class SharesActionsTest(base.BaseSharesTest):
|
|||||||
self.assertEqual(filters['snapshot_id'], share['snapshot_id'])
|
self.assertEqual(filters['snapshot_id'], share['snapshot_id'])
|
||||||
self.assertFalse(self.shares[0]['id'] in [s['id'] for s in shares])
|
self.assertFalse(self.shares[0]['id'] in [s['id'] for s in shares])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_shares_with_detail_with_asc_sorting(self):
|
def test_list_shares_with_detail_with_asc_sorting(self):
|
||||||
filters = {'sort_key': 'created_at', 'sort_dir': 'asc'}
|
filters = {'sort_key': 'created_at', 'sort_dir': 'asc'}
|
||||||
|
|
||||||
@ -318,21 +318,21 @@ class SharesActionsTest(base.BaseSharesTest):
|
|||||||
sorted_list = [share['created_at'] for share in shares]
|
sorted_list = [share['created_at'] for share in shares]
|
||||||
self.assertEqual(sorted(sorted_list), sorted_list)
|
self.assertEqual(sorted(sorted_list), sorted_list)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_shares_with_detail_filter_by_existed_name(self):
|
def test_list_shares_with_detail_filter_by_existed_name(self):
|
||||||
# list shares by name, at least one share is expected
|
# list shares by name, at least one share is expected
|
||||||
params = {"name": self.share_name}
|
params = {"name": self.share_name}
|
||||||
shares = self.shares_client.list_shares_with_detail(params)
|
shares = self.shares_client.list_shares_with_detail(params)
|
||||||
self.assertEqual(self.share_name, shares[0]["name"])
|
self.assertEqual(self.share_name, shares[0]["name"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_shares_with_detail_filter_by_fake_name(self):
|
def test_list_shares_with_detail_filter_by_fake_name(self):
|
||||||
# list shares by fake name, no shares are expected
|
# list shares by fake name, no shares are expected
|
||||||
params = {"name": data_utils.rand_name("fake-nonexistent-name")}
|
params = {"name": data_utils.rand_name("fake-nonexistent-name")}
|
||||||
shares = self.shares_client.list_shares_with_detail(params)
|
shares = self.shares_client.list_shares_with_detail(params)
|
||||||
self.assertEqual(0, len(shares))
|
self.assertEqual(0, len(shares))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_shares_with_detail_filter_by_active_status(self):
|
def test_list_shares_with_detail_filter_by_active_status(self):
|
||||||
# list shares by active status, at least one share is expected
|
# list shares by active status, at least one share is expected
|
||||||
params = {"status": "available"}
|
params = {"status": "available"}
|
||||||
@ -341,14 +341,14 @@ class SharesActionsTest(base.BaseSharesTest):
|
|||||||
for share in shares:
|
for share in shares:
|
||||||
self.assertEqual(params["status"], share["status"])
|
self.assertEqual(params["status"], share["status"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_shares_with_detail_filter_by_fake_status(self):
|
def test_list_shares_with_detail_filter_by_fake_status(self):
|
||||||
# list shares by fake status, no shares are expected
|
# list shares by fake status, no shares are expected
|
||||||
params = {"status": 'fake'}
|
params = {"status": 'fake'}
|
||||||
shares = self.shares_client.list_shares_with_detail(params)
|
shares = self.shares_client.list_shares_with_detail(params)
|
||||||
self.assertEqual(0, len(shares))
|
self.assertEqual(0, len(shares))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_shares_with_detail_filter_by_all_tenants(self):
|
def test_list_shares_with_detail_filter_by_all_tenants(self):
|
||||||
# non-admin user can get shares only from his project
|
# non-admin user can get shares only from his project
|
||||||
params = {"all_tenants": 1}
|
params = {"all_tenants": 1}
|
||||||
@ -361,7 +361,7 @@ class SharesActionsTest(base.BaseSharesTest):
|
|||||||
for share in shares:
|
for share in shares:
|
||||||
self.assertEqual(project_id, share["project_id"])
|
self.assertEqual(project_id, share["project_id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_list_shares_public_with_detail(self):
|
def test_list_shares_public_with_detail(self):
|
||||||
public_share = self.create_share(
|
public_share = self.create_share(
|
||||||
name='public_share',
|
name='public_share',
|
||||||
@ -394,7 +394,7 @@ class SharesActionsTest(base.BaseSharesTest):
|
|||||||
|
|
||||||
self.assertFalse(any([s["id"] == private_share["id"] for s in shares]))
|
self.assertFalse(any([s["id"] == private_share["id"] for s in shares]))
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
@ddt.data(None, '2.16', LATEST_MICROVERSION)
|
@ddt.data(None, '2.16', LATEST_MICROVERSION)
|
||||||
@ -450,7 +450,7 @@ class SharesActionsTest(base.BaseSharesTest):
|
|||||||
'actual': snapshot['project_id'],
|
'actual': snapshot['project_id'],
|
||||||
'key': 'project_id'})
|
'key': 'project_id'})
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
def test_list_snapshots(self):
|
def test_list_snapshots(self):
|
||||||
@ -467,7 +467,7 @@ class SharesActionsTest(base.BaseSharesTest):
|
|||||||
msg = "expected id lists %s times in share list" % (len(gen))
|
msg = "expected id lists %s times in share list" % (len(gen))
|
||||||
self.assertEqual(1, len(gen), msg)
|
self.assertEqual(1, len(gen), msg)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
@ddt.data(None, '2.16', LATEST_MICROVERSION)
|
@ddt.data(None, '2.16', LATEST_MICROVERSION)
|
||||||
@ -496,7 +496,7 @@ class SharesActionsTest(base.BaseSharesTest):
|
|||||||
msg = "expected id lists %s times in share list" % (len(gen))
|
msg = "expected id lists %s times in share list" % (len(gen))
|
||||||
self.assertEqual(1, len(gen), msg)
|
self.assertEqual(1, len(gen), msg)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
def test_list_snapshots_with_detail_use_limit(self):
|
def test_list_snapshots_with_detail_use_limit(self):
|
||||||
@ -522,7 +522,7 @@ class SharesActionsTest(base.BaseSharesTest):
|
|||||||
self.assertEqual(1, len(snaps['snapshots']))
|
self.assertEqual(1, len(snaps['snapshots']))
|
||||||
self.assertEqual(self.snap['id'], snaps['snapshots'][0]['id'])
|
self.assertEqual(self.snap['id'], snaps['snapshots'][0]['id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
def test_list_snapshots_with_detail_filter_by_status_and_name(self):
|
def test_list_snapshots_with_detail_filter_by_status_and_name(self):
|
||||||
@ -538,7 +538,7 @@ class SharesActionsTest(base.BaseSharesTest):
|
|||||||
self.assertEqual(filters['status'], snap['status'])
|
self.assertEqual(filters['status'], snap['status'])
|
||||||
self.assertEqual(filters['name'], snap['name'])
|
self.assertEqual(filters['name'], snap['name'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
def test_list_snapshots_with_detail_and_asc_sorting(self):
|
def test_list_snapshots_with_detail_and_asc_sorting(self):
|
||||||
@ -553,7 +553,7 @@ class SharesActionsTest(base.BaseSharesTest):
|
|||||||
sorted_list = [snap['share_id'] for snap in snaps]
|
sorted_list = [snap['share_id'] for snap in snaps]
|
||||||
self.assertEqual(sorted(sorted_list), sorted_list)
|
self.assertEqual(sorted(sorted_list), sorted_list)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
@testtools.skipUnless(
|
@testtools.skipUnless(
|
||||||
CONF.share.run_extend_tests,
|
CONF.share.run_extend_tests,
|
||||||
"Share extend tests are disabled.")
|
"Share extend tests are disabled.")
|
||||||
@ -576,7 +576,7 @@ class SharesActionsTest(base.BaseSharesTest):
|
|||||||
)
|
)
|
||||||
self.assertEqual(new_size, share_get['size'], msg)
|
self.assertEqual(new_size, share_get['size'], msg)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
@testtools.skipUnless(
|
@testtools.skipUnless(
|
||||||
CONF.share.run_shrink_tests,
|
CONF.share.run_shrink_tests,
|
||||||
"Share shrink tests are disabled.")
|
"Share shrink tests are disabled.")
|
||||||
@ -621,7 +621,7 @@ class SharesRenameTest(base.BaseSharesTest):
|
|||||||
cls.snap = cls.create_snapshot_wait_for_active(
|
cls.snap = cls.create_snapshot_wait_for_active(
|
||||||
cls.share["id"], cls.snap_name, cls.snap_desc)
|
cls.share["id"], cls.snap_name, cls.snap_desc)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_update_share(self):
|
def test_update_share(self):
|
||||||
|
|
||||||
# get share
|
# get share
|
||||||
@ -645,7 +645,7 @@ class SharesRenameTest(base.BaseSharesTest):
|
|||||||
self.assertEqual(new_desc, share["description"])
|
self.assertEqual(new_desc, share["description"])
|
||||||
self.assertTrue(share["is_public"])
|
self.assertTrue(share["is_public"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
def test_rename_snapshot(self):
|
def test_rename_snapshot(self):
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
|
|
||||||
@ -30,7 +30,7 @@ class SharesActionsNegativeTest(base.BaseSharesMixedTest):
|
|||||||
cls.admin_client = cls.admin_shares_v2_client
|
cls.admin_client = cls.admin_shares_v2_client
|
||||||
cls.share = cls.create_share()
|
cls.share = cls.create_share()
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(
|
@testtools.skipUnless(
|
||||||
CONF.share.run_extend_tests,
|
CONF.share.run_extend_tests,
|
||||||
"Share extend tests are disabled.")
|
"Share extend tests are disabled.")
|
||||||
@ -48,7 +48,7 @@ class SharesActionsNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.share['id'],
|
self.share['id'],
|
||||||
new_size)
|
new_size)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(
|
@testtools.skipUnless(
|
||||||
CONF.share.run_extend_tests,
|
CONF.share.run_extend_tests,
|
||||||
"Share extend tests are disabled.")
|
"Share extend tests are disabled.")
|
||||||
@ -61,7 +61,7 @@ class SharesActionsNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.share['id'],
|
self.share['id'],
|
||||||
new_size)
|
new_size)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(
|
@testtools.skipUnless(
|
||||||
CONF.share.run_extend_tests,
|
CONF.share.run_extend_tests,
|
||||||
"Share extend tests are disabled.")
|
"Share extend tests are disabled.")
|
||||||
@ -74,7 +74,7 @@ class SharesActionsNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.share['id'],
|
self.share['id'],
|
||||||
new_size)
|
new_size)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(
|
@testtools.skipUnless(
|
||||||
CONF.share.run_extend_tests,
|
CONF.share.run_extend_tests,
|
||||||
"Share extend tests are disabled.")
|
"Share extend tests are disabled.")
|
||||||
@ -91,7 +91,7 @@ class SharesActionsNegativeTest(base.BaseSharesMixedTest):
|
|||||||
share['id'],
|
share['id'],
|
||||||
new_size)
|
new_size)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(
|
@testtools.skipUnless(
|
||||||
CONF.share.run_shrink_tests,
|
CONF.share.run_shrink_tests,
|
||||||
"Share shrink tests are disabled.")
|
"Share shrink tests are disabled.")
|
||||||
@ -104,7 +104,7 @@ class SharesActionsNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.share['id'],
|
self.share['id'],
|
||||||
new_size)
|
new_size)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(
|
@testtools.skipUnless(
|
||||||
CONF.share.run_shrink_tests,
|
CONF.share.run_shrink_tests,
|
||||||
"Share shrink tests are disabled.")
|
"Share shrink tests are disabled.")
|
||||||
@ -117,7 +117,7 @@ class SharesActionsNegativeTest(base.BaseSharesMixedTest):
|
|||||||
self.share['id'],
|
self.share['id'],
|
||||||
new_size)
|
new_size)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(
|
@testtools.skipUnless(
|
||||||
CONF.share.run_shrink_tests,
|
CONF.share.run_shrink_tests,
|
||||||
"Share shrink tests are disabled.")
|
"Share shrink tests are disabled.")
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
from tempest import config
|
from tempest import config
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests import share_exceptions
|
from manila_tempest_tests import share_exceptions
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
@ -35,13 +35,13 @@ class SharesNegativeTest(base.BaseSharesTest):
|
|||||||
metadata={'key': 'value'}
|
metadata={'key': 'value'}
|
||||||
)
|
)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_update_share_with_wrong_public_value(self):
|
def test_update_share_with_wrong_public_value(self):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
self.shares_client.update_share, self.share["id"],
|
self.shares_client.update_share, self.share["id"],
|
||||||
is_public="truebar")
|
is_public="truebar")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
def test_try_delete_share_with_existing_snapshot(self):
|
def test_try_delete_share_with_existing_snapshot(self):
|
||||||
@ -57,7 +57,7 @@ class SharesNegativeTest(base.BaseSharesTest):
|
|||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.shares_client.delete_share, share["id"])
|
self.shares_client.delete_share, share["id"])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
def test_create_share_from_snap_with_less_size(self):
|
def test_create_share_from_snap_with_less_size(self):
|
||||||
@ -83,7 +83,7 @@ class SharesNegativeTest(base.BaseSharesTest):
|
|||||||
snapshot_id=snap["id"],
|
snapshot_id=snap["id"],
|
||||||
cleanup_in_class=False)
|
cleanup_in_class=False)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipIf(not CONF.share.multitenancy_enabled,
|
@testtools.skipIf(not CONF.share.multitenancy_enabled,
|
||||||
"Only for multitenancy.")
|
"Only for multitenancy.")
|
||||||
def test_create_share_with_nonexistant_share_network(self):
|
def test_create_share_with_nonexistant_share_network(self):
|
||||||
@ -91,7 +91,7 @@ class SharesNegativeTest(base.BaseSharesTest):
|
|||||||
self.shares_client.create_share,
|
self.shares_client.create_share,
|
||||||
share_network_id="wrong_sn_id")
|
share_network_id="wrong_sn_id")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
@testtools.skipIf(not CONF.share.multitenancy_enabled,
|
@testtools.skipIf(not CONF.share.multitenancy_enabled,
|
||||||
"Only for multitenancy.")
|
"Only for multitenancy.")
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
@ -126,14 +126,14 @@ class SharesNegativeTest(base.BaseSharesTest):
|
|||||||
snapshot_id=snap["id"],
|
snapshot_id=snap["id"],
|
||||||
)
|
)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_update_other_tenants_public_share(self):
|
def test_update_other_tenants_public_share(self):
|
||||||
isolated_client = self.get_client_with_isolated_creds(
|
isolated_client = self.get_client_with_isolated_creds(
|
||||||
type_of_creds='alt')
|
type_of_creds='alt')
|
||||||
self.assertRaises(lib_exc.Forbidden, isolated_client.update_share,
|
self.assertRaises(lib_exc.Forbidden, isolated_client.update_share,
|
||||||
self.share["id"], name="new_name")
|
self.share["id"], name="new_name")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_delete_other_tenants_public_share(self):
|
def test_delete_other_tenants_public_share(self):
|
||||||
isolated_client = self.get_client_with_isolated_creds(
|
isolated_client = self.get_client_with_isolated_creds(
|
||||||
type_of_creds='alt')
|
type_of_creds='alt')
|
||||||
@ -141,7 +141,7 @@ class SharesNegativeTest(base.BaseSharesTest):
|
|||||||
isolated_client.delete_share,
|
isolated_client.delete_share,
|
||||||
self.share['id'])
|
self.share['id'])
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_set_metadata_of_other_tenants_public_share(self):
|
def test_set_metadata_of_other_tenants_public_share(self):
|
||||||
isolated_client = self.get_client_with_isolated_creds(
|
isolated_client = self.get_client_with_isolated_creds(
|
||||||
type_of_creds='alt')
|
type_of_creds='alt')
|
||||||
@ -150,7 +150,7 @@ class SharesNegativeTest(base.BaseSharesTest):
|
|||||||
self.share['id'],
|
self.share['id'],
|
||||||
{'key': 'value'})
|
{'key': 'value'})
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_update_metadata_of_other_tenants_public_share(self):
|
def test_update_metadata_of_other_tenants_public_share(self):
|
||||||
isolated_client = self.get_client_with_isolated_creds(
|
isolated_client = self.get_client_with_isolated_creds(
|
||||||
type_of_creds='alt')
|
type_of_creds='alt')
|
||||||
@ -159,7 +159,7 @@ class SharesNegativeTest(base.BaseSharesTest):
|
|||||||
self.share['id'],
|
self.share['id'],
|
||||||
{'key': 'value'})
|
{'key': 'value'})
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
|
||||||
def test_delete_metadata_of_other_tenants_public_share(self):
|
def test_delete_metadata_of_other_tenants_public_share(self):
|
||||||
isolated_client = self.get_client_with_isolated_creds(
|
isolated_client = self.get_client_with_isolated_creds(
|
||||||
type_of_creds='alt')
|
type_of_creds='alt')
|
||||||
@ -171,47 +171,47 @@ class SharesNegativeTest(base.BaseSharesTest):
|
|||||||
|
|
||||||
class SharesAPIOnlyNegativeTest(base.BaseSharesTest):
|
class SharesAPIOnlyNegativeTest(base.BaseSharesTest):
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_unmanage_share_by_user(self):
|
def test_unmanage_share_by_user(self):
|
||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.shares_client.unmanage_share,
|
self.shares_client.unmanage_share,
|
||||||
'fake-id')
|
'fake-id')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_manage_share_by_user(self):
|
def test_manage_share_by_user(self):
|
||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.shares_client.manage_share,
|
self.shares_client.manage_share,
|
||||||
'fake-host', 'nfs', '/export/path',
|
'fake-host', 'nfs', '/export/path',
|
||||||
'fake-type')
|
'fake-type')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_list_by_share_server_by_user(self):
|
def test_list_by_share_server_by_user(self):
|
||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.shares_client.list_shares,
|
self.shares_client.list_shares,
|
||||||
params={'share_server_id': 12345})
|
params={'share_server_id': 12345})
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_create_share_non_existent_az(self):
|
def test_create_share_non_existent_az(self):
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.shares_v2_client.create_share,
|
self.shares_v2_client.create_share,
|
||||||
availability_zone='fake_az')
|
availability_zone='fake_az')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_create_share_with_zero_size(self):
|
def test_create_share_with_zero_size(self):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
self.shares_client.create_share, size=0)
|
self.shares_client.create_share, size=0)
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_create_share_with_invalid_size(self):
|
def test_create_share_with_invalid_size(self):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
self.shares_client.create_share, size="#$%")
|
self.shares_client.create_share, size="#$%")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_create_share_with_out_passing_size(self):
|
def test_create_share_with_out_passing_size(self):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
self.shares_client.create_share, size="")
|
self.shares_client.create_share, size="")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
def test_delete_snapshot_with_wrong_id(self):
|
def test_delete_snapshot_with_wrong_id(self):
|
||||||
@ -219,7 +219,7 @@ class SharesAPIOnlyNegativeTest(base.BaseSharesTest):
|
|||||||
self.shares_client.delete_snapshot,
|
self.shares_client.delete_snapshot,
|
||||||
"wrong_share_id")
|
"wrong_share_id")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||||
"Snapshot tests are disabled.")
|
"Snapshot tests are disabled.")
|
||||||
def test_create_snapshot_with_wrong_id(self):
|
def test_create_snapshot_with_wrong_id(self):
|
||||||
@ -227,41 +227,41 @@ class SharesAPIOnlyNegativeTest(base.BaseSharesTest):
|
|||||||
self.shares_client.create_snapshot,
|
self.shares_client.create_snapshot,
|
||||||
"wrong_share_id")
|
"wrong_share_id")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_create_share_with_invalid_protocol(self):
|
def test_create_share_with_invalid_protocol(self):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
self.shares_client.create_share,
|
self.shares_client.create_share,
|
||||||
share_protocol="nonexistent_protocol")
|
share_protocol="nonexistent_protocol")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_create_share_with_wrong_public_value(self):
|
def test_create_share_with_wrong_public_value(self):
|
||||||
self.assertRaises(lib_exc.BadRequest,
|
self.assertRaises(lib_exc.BadRequest,
|
||||||
self.shares_client.create_share, is_public='truebar')
|
self.shares_client.create_share, is_public='truebar')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_get_share_with_wrong_id(self):
|
def test_get_share_with_wrong_id(self):
|
||||||
self.assertRaises(lib_exc.NotFound, self.shares_client.get_share,
|
self.assertRaises(lib_exc.NotFound, self.shares_client.get_share,
|
||||||
"wrong_share_id")
|
"wrong_share_id")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_get_share_without_passing_share_id(self):
|
def test_get_share_without_passing_share_id(self):
|
||||||
# Should not be able to get share when empty ID is passed
|
# Should not be able to get share when empty ID is passed
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
self.shares_client.get_share, '')
|
self.shares_client.get_share, '')
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_list_shares_nonadmin_with_nonexistent_share_server_filter(self):
|
def test_list_shares_nonadmin_with_nonexistent_share_server_filter(self):
|
||||||
# filtering by share server allowed only for admins by default
|
# filtering by share server allowed only for admins by default
|
||||||
self.assertRaises(lib_exc.Forbidden,
|
self.assertRaises(lib_exc.Forbidden,
|
||||||
self.shares_client.list_shares_with_detail,
|
self.shares_client.list_shares_with_detail,
|
||||||
{'share_server_id': 'fake_share_server_id'})
|
{'share_server_id': 'fake_share_server_id'})
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_delete_share_with_wrong_id(self):
|
def test_delete_share_with_wrong_id(self):
|
||||||
self.assertRaises(lib_exc.NotFound, self.shares_client.delete_share,
|
self.assertRaises(lib_exc.NotFound, self.shares_client.delete_share,
|
||||||
"wrong_share_id")
|
"wrong_share_id")
|
||||||
|
|
||||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API])
|
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
|
||||||
def test_delete_share_without_passing_share_id(self):
|
def test_delete_share_without_passing_share_id(self):
|
||||||
# Should not be able to delete share when empty ID is passed
|
# Should not be able to delete share when empty ID is passed
|
||||||
self.assertRaises(lib_exc.NotFound,
|
self.assertRaises(lib_exc.NotFound,
|
||||||
|
@ -19,8 +19,8 @@ from tempest import config
|
|||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
from tempest.lib.common.utils import test_utils
|
from tempest.lib.common.utils import test_utils
|
||||||
from tempest.lib import exceptions
|
from tempest.lib import exceptions
|
||||||
from tempest import test
|
|
||||||
import testtools
|
import testtools
|
||||||
|
from testtools import testcase as tc
|
||||||
|
|
||||||
from manila_tempest_tests.common import constants
|
from manila_tempest_tests.common import constants
|
||||||
from manila_tempest_tests.tests.api import base
|
from manila_tempest_tests.tests.api import base
|
||||||
@ -183,8 +183,7 @@ class ShareBasicOpsBase(manager.ShareScenarioTest):
|
|||||||
self.manager.servers_client, instance_id, "ACTIVE")
|
self.manager.servers_client, instance_id, "ACTIVE")
|
||||||
return self.manager.servers_client.show_server(instance_id)["server"]
|
return self.manager.servers_client.show_server(instance_id)["server"]
|
||||||
|
|
||||||
@test.services('compute', 'network')
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
|
||||||
def test_mount_share_one_vm(self):
|
def test_mount_share_one_vm(self):
|
||||||
instance = self.boot_instance(wait_until="BUILD")
|
instance = self.boot_instance(wait_until="BUILD")
|
||||||
self.create_share()
|
self.create_share()
|
||||||
@ -205,8 +204,7 @@ class ShareBasicOpsBase(manager.ShareScenarioTest):
|
|||||||
self.umount_share(ssh_client)
|
self.umount_share(ssh_client)
|
||||||
self.servers_client.delete_server(instance['id'])
|
self.servers_client.delete_server(instance['id'])
|
||||||
|
|
||||||
@test.services('compute', 'network')
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
|
||||||
def test_read_write_two_vms(self):
|
def test_read_write_two_vms(self):
|
||||||
"""Boots two vms and writes/reads data on it."""
|
"""Boots two vms and writes/reads data on it."""
|
||||||
test_data = "Some test data to write"
|
test_data = "Some test data to write"
|
||||||
@ -245,8 +243,7 @@ class ShareBasicOpsBase(manager.ShareScenarioTest):
|
|||||||
data = self.read_data(ssh_client_inst2)
|
data = self.read_data(ssh_client_inst2)
|
||||||
self.assertEqual(test_data, data)
|
self.assertEqual(test_data, data)
|
||||||
|
|
||||||
@test.services('compute', 'network')
|
@tc.attr(base.TAG_POSITIVE, base.TAG_BACKEND)
|
||||||
@test.attr(type=[base.TAG_POSITIVE, base.TAG_BACKEND])
|
|
||||||
@testtools.skipUnless(CONF.share.run_host_assisted_migration_tests or
|
@testtools.skipUnless(CONF.share.run_host_assisted_migration_tests or
|
||||||
CONF.share.run_driver_assisted_migration_tests,
|
CONF.share.run_driver_assisted_migration_tests,
|
||||||
"Share migration tests are disabled.")
|
"Share migration tests are disabled.")
|
||||||
|
Loading…
Reference in New Issue
Block a user