浏览代码

move benchmark cmd tests to own module

Thomas Waldmann 2 年之前
父节点
当前提交
245bdef4eb
共有 2 个文件被更改,包括 9 次插入5 次删除
  1. 0 5
      src/borg/testsuite/archiver/__init__.py
  2. 9 0
      src/borg/testsuite/archiver/benchmark_cmd.py

+ 0 - 5
src/borg/testsuite/archiver/__init__.py

@@ -1990,11 +1990,6 @@ class ArchiverTestCase(ArchiverTestCaseBase):
         self.cmd(f"--repo={self.repository_location}", "create", "test", "input")
         self.cmd(f"--repo={self.repository_location}", "delete", "--first", "1", "--last", "1", fork=True, exit_code=2)
 
-    def test_benchmark_crud(self):
-        self.cmd(f"--repo={self.repository_location}", "rcreate", RK_ENCRYPTION)
-        with environment_variable(_BORG_BENCHMARK_CRUD_TEST="YES"):
-            self.cmd(f"--repo={self.repository_location}", "benchmark", "crud", self.input_path)
-
     def test_config(self):
         self.create_test_files()
         os.unlink("input/flagfile")

+ 9 - 0
src/borg/testsuite/archiver/benchmark_cmd.py

@@ -0,0 +1,9 @@
+from ...constants import *  # NOQA
+from . import ArchiverTestCaseBase, RK_ENCRYPTION, environment_variable
+
+
+class ArchiverTestCase(ArchiverTestCaseBase):
+    def test_benchmark_crud(self):
+        self.cmd(f"--repo={self.repository_location}", "rcreate", RK_ENCRYPTION)
+        with environment_variable(_BORG_BENCHMARK_CRUD_TEST="YES"):
+            self.cmd(f"--repo={self.repository_location}", "benchmark", "crud", self.input_path)