Skip to content

Commit

Permalink
test: add test that ensures return value of chroot.run()
Browse files Browse the repository at this point in the history
Small followup for osbuild#1854
which added the return value to `util.Chroot.run`. This commit
now adds a (super trivial) test for this.
  • Loading branch information
mvo5 committed Sep 11, 2024
1 parent 66a0033 commit 5ad2a26
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/mod/test_util_chroot.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ def returncode(self):
def test_chroot_context(mocked_run, tmp_path):

with Chroot(os.fspath(tmp_path)) as chroot:
chroot.run(["/bin/true"], check=True)
ret = chroot.run(["/bin/true"], check=True)
assert isinstance(ret, RunReturn)
chroot.run(["/bin/false"], check=False)

assert mocked_run.call_args_list == [
Expand Down

0 comments on commit 5ad2a26

Please sign in to comment.