浏览代码

Merge pull request #5276 from pgerber/false

Stop relying on `false` exiting with status code 1
TW 4 年之前
父节点
当前提交
23528954c5
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/borg/testsuite/archiver.py

+ 2 - 2
src/borg/testsuite/archiver.py

@@ -1060,8 +1060,8 @@ class ArchiverTestCase(ArchiverTestCaseBase):
     def test_create_content_from_command_with_failed_command(self):
     def test_create_content_from_command_with_failed_command(self):
         self.cmd('init', '--encryption=repokey', self.repository_location)
         self.cmd('init', '--encryption=repokey', self.repository_location)
         output = self.cmd('create', '--content-from-command', self.repository_location + '::test',
         output = self.cmd('create', '--content-from-command', self.repository_location + '::test',
-                          '--', 'false', '--arg-passed-to-false', exit_code=2)
-        assert output.endswith("Command 'false' exited with status 1\n")
+                          '--', 'sh', '-c', 'exit 73;', exit_code=2)
+        assert output.endswith("Command 'sh' exited with status 73\n")
         archive_list = json.loads(self.cmd('list', '--json', self.repository_location))
         archive_list = json.loads(self.cmd('list', '--json', self.repository_location))
         assert archive_list['archives'] == []
         assert archive_list['archives'] == []