Fix share migration test with snapshot support
Test 'test_migrate_share_with_snapshot_v2_5' validates that share migration returns an error when a share has a snapshot created, but to do so, it tries to create a snapshot, which would fail in a backend that does not support snapshot. This fix adds a validation that skips the test in this situation. Change-Id: Icd6b04266ac2de83747b99295cb3538967922d65 Closes-bug: #1608293
This commit is contained in:
parent
00f8908984
commit
4c2a69c7e1
@ -16,6 +16,7 @@
|
||||
from tempest import config
|
||||
from tempest.lib import exceptions as lib_exc
|
||||
from tempest import test
|
||||
import testtools
|
||||
|
||||
from manila_tempest_tests.tests.api import base
|
||||
|
||||
@ -70,6 +71,8 @@ class MigrationNFSTest(base.BaseSharesAdminTest):
|
||||
|
||||
@test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND])
|
||||
@base.skip_if_microversion_lt("2.5")
|
||||
@testtools.skipUnless(CONF.share.run_snapshot_tests,
|
||||
"Snapshot tests are disabled.")
|
||||
def test_migrate_share_with_snapshot_v2_5(self):
|
||||
snap = self.create_snapshot_wait_for_active(self.share['id'])
|
||||
self.assertRaises(
|
||||
|
Loading…
Reference in New Issue
Block a user