Replace test.attr with decorators.attr
Function 'tempest.test.attr()' has moved to 'tempest.lib.decorators .attr()' in Pike and will be removed in a future version[1]. This patch replaces the 'tempest.test.attr()' with the 'tempest.lib .decorators.attr().' 1)https://review.openstack.org/#/c/456236/ Change-Id: If30ad26c17f443b1ef0fbabd94a46b7cc23a51e8
This commit is contained in:
parent
8e63c5e841
commit
8ecd7c18ed
|
@ -16,7 +16,7 @@ import json
|
|||
import os
|
||||
import subprocess
|
||||
|
||||
from tempest import test
|
||||
from tempest.lib import decorators
|
||||
|
||||
from freezer.tests.freezer_tempest_plugin.tests.api import base
|
||||
from freezer.tests.integration import common
|
||||
|
@ -123,7 +123,7 @@ class TestFreezerCompressGzip(base.BaseFreezerTest):
|
|||
|
||||
return out.strip()
|
||||
|
||||
@test.attr(type="gate")
|
||||
@decorators.attr(type="gate")
|
||||
def test_freezer_backup_compress_gzip(self):
|
||||
backup_name = 'freezer-test-backup-gzip-0'
|
||||
|
||||
|
@ -146,7 +146,7 @@ class TestFreezerCompressGzip(base.BaseFreezerTest):
|
|||
self.run_subprocess(diff_args, 'Verify restored copy is identical to '
|
||||
'original.')
|
||||
|
||||
@test.attr(type="gate")
|
||||
@decorators.attr(type="gate")
|
||||
def test_freezer_backup_compress_bzip2(self):
|
||||
backup_name = 'freezer-test-backup-bzip2-0'
|
||||
|
||||
|
@ -166,7 +166,7 @@ class TestFreezerCompressGzip(base.BaseFreezerTest):
|
|||
self.run_subprocess(diff_args, 'Verify restored copy is identical to '
|
||||
'original.')
|
||||
|
||||
@test.attr(type="gate")
|
||||
@decorators.attr(type="gate")
|
||||
def test_freezer_backup_compress_xz(self):
|
||||
backup_name = 'freezer-test-backup-xz-0'
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import os
|
|||
import shutil
|
||||
|
||||
from oslo_utils import uuidutils
|
||||
from tempest import test
|
||||
from tempest.lib import decorators
|
||||
|
||||
from freezer.tests.freezer_tempest_plugin.tests.api import base
|
||||
|
||||
|
@ -71,7 +71,7 @@ class TestFreezerFSBackup(base.BaseFreezerTest):
|
|||
shutil.rmtree(self.restore_target_dir, True)
|
||||
shutil.rmtree(self.backup_local_storage_dir)
|
||||
|
||||
@test.attr(type="gate")
|
||||
@decorators.attr(type="gate")
|
||||
def test_freezer_fs_backup(self):
|
||||
backup_args = ['freezer-agent',
|
||||
'--path-to-backup',
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
# under the License.
|
||||
import subprocess
|
||||
|
||||
from tempest import test
|
||||
from tempest.lib import decorators
|
||||
|
||||
from freezer.tests.freezer_tempest_plugin.tests.api import base
|
||||
from freezer.tests.integration import common
|
||||
|
@ -36,7 +36,7 @@ class TestFreezerMetadataChecksum(base.BaseFreezerTest):
|
|||
|
||||
self.dest_tree.cleanup()
|
||||
|
||||
@test.attr(type="gate")
|
||||
@decorators.attr(type="gate")
|
||||
def test_freezer_fs_backup_valid_checksum(self):
|
||||
# perform a normal backup, but enable consistency checks and save the
|
||||
# metadata to disk
|
||||
|
@ -61,7 +61,7 @@ class TestFreezerMetadataChecksum(base.BaseFreezerTest):
|
|||
'Test restore from local storage with '
|
||||
'computed checksum.')
|
||||
|
||||
@test.attr(type="gate")
|
||||
@decorators.attr(type="gate")
|
||||
def test_freezer_fs_backup_bad_checksum(self):
|
||||
# as above, but we'll ignore the computed checksum
|
||||
metadata_path = self.create_local_backup(consistency_check=True)
|
||||
|
|
|
@ -16,7 +16,7 @@ import os
|
|||
import shutil
|
||||
|
||||
from oslo_utils import uuidutils
|
||||
from tempest import test
|
||||
from tempest.lib import decorators
|
||||
|
||||
from freezer.tests.freezer_tempest_plugin.tests.api import base
|
||||
|
||||
|
@ -64,7 +64,7 @@ class TestFreezerSwiftBackup(base.BaseFreezerTest):
|
|||
shutil.rmtree(self.backup_source_dir, True)
|
||||
shutil.rmtree(self.restore_target_dir, True)
|
||||
|
||||
@test.attr(type="gate")
|
||||
@decorators.attr(type="gate")
|
||||
def test_freezer_swift_backup(self):
|
||||
backup_args = ['freezer-agent',
|
||||
'--path-to-backup',
|
||||
|
|
|
@ -12,14 +12,14 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tempest import test
|
||||
from tempest.lib import decorators
|
||||
|
||||
from freezer.tests.freezer_tempest_plugin.tests.api import base
|
||||
|
||||
|
||||
class TestFreezerTestsRunning(base.BaseFreezerTest):
|
||||
|
||||
@test.attr(type="gate")
|
||||
@decorators.attr(type="gate")
|
||||
def test_tests_running(self):
|
||||
# See if tempest plugin tests run.
|
||||
self.assertEqual(1, 1, 'Tests are running')
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
import subprocess
|
||||
|
||||
from tempest import test
|
||||
from tempest.lib import decorators
|
||||
|
||||
from freezer import __version__ as freezer_version
|
||||
from freezer.tests.freezer_tempest_plugin.tests.api import base
|
||||
|
@ -22,7 +22,7 @@ from freezer.tests.freezer_tempest_plugin.tests.api import base
|
|||
|
||||
class TestFreezerVersion(base.BaseFreezerTest):
|
||||
|
||||
@test.attr(type="gate")
|
||||
@decorators.attr(type="gate")
|
||||
def test_version(self):
|
||||
|
||||
version = subprocess.check_output(['freezer-agent', '--version'],
|
||||
|
|
Loading…
Reference in New Issue