mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-21 13:47:16 +00:00
Merge pull request #6186 from hexagonrecursion/move-test
Refactor: move a test to ArchiverTestCase
This commit is contained in:
commit
b931befd65
1 changed files with 8 additions and 8 deletions
|
@ -3499,6 +3499,13 @@ def patched_setxattr_EACCES(*args, **kwargs):
|
|||
with patch.object(xattr, 'setxattr', patched_setxattr_EACCES):
|
||||
self.cmd('extract', self.repository_location + '::test', exit_code=EXIT_WARNING)
|
||||
|
||||
def test_do_not_mention_archive_if_you_can_not_find_repo(self):
|
||||
"""https://github.com/borgbackup/borg/issues/6014"""
|
||||
archive = self.repository_location + '-this-repository-does-not-exist' + '::test'
|
||||
output = self.cmd('info', archive, exit_code=2, fork=True)
|
||||
self.assert_in('this-repository-does-not-exist', output)
|
||||
self.assert_not_in('this-repository-does-not-exist::test', output)
|
||||
|
||||
|
||||
@unittest.skipUnless('binary' in BORG_EXES, 'no borg.exe available')
|
||||
class ArchiverTestCaseBinary(ArchiverTestCase):
|
||||
|
@ -3910,7 +3917,7 @@ def test_config(self):
|
|||
def test_migrate_lock_alive(self):
|
||||
pass
|
||||
|
||||
def test_strip_components_doesnt_leak(self):
|
||||
def test_remote_repo_strip_components_doesnt_leak(self):
|
||||
self.cmd('init', '--encryption=repokey', self.repository_location)
|
||||
self.create_regular_file('dir/file', contents=b"test file contents 1")
|
||||
self.create_regular_file('dir/file2', contents=b"test file contents 2")
|
||||
|
@ -3932,13 +3939,6 @@ def test_strip_components_doesnt_leak(self):
|
|||
res = self.cmd('extract', "--debug", self.repository_location + '::test', '--strip-components', '0')
|
||||
self.assert_true(marker not in res)
|
||||
|
||||
def test_do_not_mention_archive_if_you_can_not_find_repo(self):
|
||||
"""https://github.com/borgbackup/borg/issues/6014"""
|
||||
archive = self.repository_location + '-this-repository-does-not-exist' + '::test'
|
||||
output = self.cmd('info', archive, exit_code=2, fork=True)
|
||||
self.assert_in('this-repository-does-not-exist', output)
|
||||
self.assert_not_in('this-repository-does-not-exist::test', output)
|
||||
|
||||
|
||||
class ArchiverCorruptionTestCase(ArchiverTestCaseBase):
|
||||
def setUp(self):
|
||||
|
|
Loading…
Reference in a new issue