mirror of https://github.com/borgbackup/borg.git
make basic test more robust, try 2
check if we have all expected files in list output (but ignore extra lines, like "can't load libfakeroot" or so).
This commit is contained in:
parent
eb3bc1023b
commit
8cc726a107
|
@ -304,9 +304,9 @@ class ArchiverTestCase(ArchiverTestCaseBase):
|
||||||
self.cmd('create', '--stats', self.repository_location + '::test.2', 'input')
|
self.cmd('create', '--stats', self.repository_location + '::test.2', 'input')
|
||||||
with changedir('output'):
|
with changedir('output'):
|
||||||
self.cmd('extract', self.repository_location + '::test')
|
self.cmd('extract', self.repository_location + '::test')
|
||||||
list_output = self.cmd('list', self.repository_location)
|
list_output = self.cmd('list', '--short', self.repository_location)
|
||||||
self.assert_in('test ', list_output)
|
self.assert_in('test', list_output)
|
||||||
self.assert_in('test.2 ', list_output)
|
self.assert_in('test.2', list_output)
|
||||||
expected = [
|
expected = [
|
||||||
'input',
|
'input',
|
||||||
'input/bdev',
|
'input/bdev',
|
||||||
|
@ -328,7 +328,9 @@ class ArchiverTestCase(ArchiverTestCaseBase):
|
||||||
# remove the file we did not backup, so input and output become equal
|
# remove the file we did not backup, so input and output become equal
|
||||||
expected.remove('input/flagfile') # this file is UF_NODUMP
|
expected.remove('input/flagfile') # this file is UF_NODUMP
|
||||||
os.remove(os.path.join('input', 'flagfile'))
|
os.remove(os.path.join('input', 'flagfile'))
|
||||||
self.assert_equal(self.cmd('list', '--short', self.repository_location + '::test').splitlines(), expected)
|
list_output = self.cmd('list', '--short', self.repository_location + '::test')
|
||||||
|
for name in expected:
|
||||||
|
self.assert_in(name, list_output)
|
||||||
self.assert_dirs_equal('input', 'output/input')
|
self.assert_dirs_equal('input', 'output/input')
|
||||||
info_output = self.cmd('info', self.repository_location + '::test')
|
info_output = self.cmd('info', self.repository_location + '::test')
|
||||||
item_count = 3 if has_lchflags else 4 # one file is UF_NODUMP
|
item_count = 3 if has_lchflags else 4 # one file is UF_NODUMP
|
||||||
|
|
Loading…
Reference in New Issue