From 9654126247959f41e349291b2a1545c75f8844bd Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Mon, 6 Aug 2018 14:28:46 +0200 Subject: [PATCH] minor change: simplify test setup most of the files created via self.create_test_files() are not needed. the only one is the empty file, so just create it here. also: move repo init to after test file creation. --- src/borg/testsuite/archiver.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/borg/testsuite/archiver.py b/src/borg/testsuite/archiver.py index 807841225..b9a003883 100644 --- a/src/borg/testsuite/archiver.py +++ b/src/borg/testsuite/archiver.py @@ -3384,11 +3384,8 @@ def test_old_version_interfered(self): class DiffArchiverTestCase(ArchiverTestCaseBase): def test_basic_functionality(self): - # Initialize test folder - self.create_test_files() - self.cmd('init', '--encryption=repokey', self.repository_location) - # Setup files for the first snapshot + self.create_regular_file('empty', size=0) self.create_regular_file('file_unchanged', size=128) self.create_regular_file('file_removed', size=256) self.create_regular_file('file_removed2', size=512) @@ -3409,6 +3406,8 @@ def test_basic_functionality(self): os.link('input/file_removed', 'input/hardlink_removed') os.link('input/file_removed2', 'input/hardlink_target_removed') + self.cmd('init', '--encryption=repokey', self.repository_location) + # Create the first snapshot self.cmd('create', self.repository_location + '::test0', 'input')