fix archiver test to not expect backup of the UF_NODUMP file, try 2

This commit is contained in:
Thomas Waldmann 2015-08-12 17:03:30 +02:00
parent 0481424128
commit 3100fac361
1 changed files with 7 additions and 3 deletions

View File

@ -187,11 +187,15 @@ class ArchiverTestCase(ArchiverTestCaseBase):
with changedir('output'):
self.cmd('extract', self.repository_location + '::test')
self.assert_equal(len(self.cmd('list', self.repository_location).splitlines()), 2)
file_count = 10 if has_lchflags else 11 # one file is UF_NODUMP
self.assert_equal(len(self.cmd('list', self.repository_location + '::test').splitlines()), file_count)
item_count = 10 if has_lchflags else 11 # one file is UF_NODUMP
self.assert_equal(len(self.cmd('list', self.repository_location + '::test').splitlines()), item_count)
if has_lchflags:
# remove the file we did not backup, so input and output become equal
os.remove(os.path.join('input', 'flagfile'))
self.assert_dirs_equal('input', 'output/input')
info_output = self.cmd('info', self.repository_location + '::test')
self.assert_in('Number of files: 4', info_output)
item_count = 3 if has_lchflags else 4 # one file is UF_NODUMP
self.assert_in('Number of files: %d' % item_count, info_output)
shutil.rmtree(self.cache_path)
with environment_variable(BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK='1'):
info_output2 = self.cmd('info', self.repository_location + '::test')