Przeglądaj źródła

Merge pull request #4010 from ThomasWaldmann/difftest-minor

minor change: simplify test setup
TW 6 lat temu
rodzic
commit
1f911a7d2d
1 zmienionych plików z 3 dodań i 4 usunięć
  1. 3 4
      src/borg/testsuite/archiver.py

+ 3 - 4
src/borg/testsuite/archiver.py

@@ -3384,11 +3384,8 @@ class ArchiverCorruptionTestCase(ArchiverTestCaseBase):
 
 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 @@ class DiffArchiverTestCase(ArchiverTestCaseBase):
             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')