mirror of https://github.com/borgbackup/borg.git
Use a dedicated file for bsdflags tests
This commit is contained in:
parent
337892c635
commit
29f95bba68
|
@ -119,6 +119,7 @@ class ArchiverTestCase(ArchiverTestCaseBase):
|
||||||
# File
|
# File
|
||||||
self.create_regual_file('empty', size=0)
|
self.create_regual_file('empty', size=0)
|
||||||
self.create_regual_file('file1', size=1024 * 80)
|
self.create_regual_file('file1', size=1024 * 80)
|
||||||
|
self.create_regual_file('flagfile', size=1024)
|
||||||
# Directory
|
# Directory
|
||||||
self.create_regual_file('dir2/file2', size=1024 * 80)
|
self.create_regual_file('dir2/file2', size=1024 * 80)
|
||||||
# File owner
|
# File owner
|
||||||
|
@ -141,7 +142,7 @@ class ArchiverTestCase(ArchiverTestCaseBase):
|
||||||
# FIFO node
|
# FIFO node
|
||||||
os.mkfifo(os.path.join(self.input_path, 'fifo1'))
|
os.mkfifo(os.path.join(self.input_path, 'fifo1'))
|
||||||
if has_lchflags:
|
if has_lchflags:
|
||||||
os.lchflags(os.path.join(self.input_path, 'file1'), stat.UF_NODUMP)
|
os.lchflags(os.path.join(self.input_path, 'flagfile'), stat.UF_NODUMP)
|
||||||
|
|
||||||
def test_basic_functionality(self):
|
def test_basic_functionality(self):
|
||||||
self.create_test_files()
|
self.create_test_files()
|
||||||
|
@ -151,7 +152,7 @@ class ArchiverTestCase(ArchiverTestCaseBase):
|
||||||
with changedir('output'):
|
with changedir('output'):
|
||||||
self.attic('extract', self.repository_location + '::test')
|
self.attic('extract', self.repository_location + '::test')
|
||||||
self.assert_equal(len(self.attic('list', self.repository_location).splitlines()), 2)
|
self.assert_equal(len(self.attic('list', self.repository_location).splitlines()), 2)
|
||||||
self.assert_equal(len(self.attic('list', self.repository_location + '::test').splitlines()), 10)
|
self.assert_equal(len(self.attic('list', self.repository_location + '::test').splitlines()), 11)
|
||||||
self.assert_dirs_equal('input', 'output/input')
|
self.assert_dirs_equal('input', 'output/input')
|
||||||
info_output = self.attic('info', self.repository_location + '::test')
|
info_output = self.attic('info', self.repository_location + '::test')
|
||||||
shutil.rmtree(self.cache_path)
|
shutil.rmtree(self.cache_path)
|
||||||
|
|
Loading…
Reference in New Issue