Stop relying on false exiting with status code 1

According to the manpage, it's only guaranteed to return with
an exit code indicating an error. However, the manpage is silent
on the exact code returned.

Likely fixes #5273.
This commit is contained in:
Peter Gerber 2020-07-29 06:12:08 +00:00
parent 85e6c0afd8
commit 97f84a6cb2

View file

@ -1060,8 +1060,8 @@ class ArchiverTestCase(ArchiverTestCaseBase):
def test_create_content_from_command_with_failed_command(self):
self.cmd('init', '--encryption=repokey', self.repository_location)
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))
assert archive_list['archives'] == []