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
diff --git a/manila_tempest_tests/tests/api/admin/test_migration_negative.py b/manila_tempest_tests/tests/api/admin/test_migration_negative.py
index 127be01..908abec 100644
--- a/manila_tempest_tests/tests/api/admin/test_migration_negative.py
+++ b/manila_tempest_tests/tests/api/admin/test_migration_negative.py
@@ -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 @@
@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(