osbuild: ensure a usable /var/tmp is available inside the buildroot
Colin asked for this in https://github.com/osbuild/bootc-image-builder/issues/223 and it's easy enough.
This commit is contained in:
parent
a895aa177c
commit
2f0ed8c755
2 changed files with 15 additions and 1 deletions
|
|
@ -44,11 +44,19 @@ def test_basic(tempdir, runner):
|
|||
|
||||
# Test we can use `.run` multiple times
|
||||
r = root.run(["/usr/bin/true"], monitor)
|
||||
assert r.returncode == 0
|
||||
assert r.returncode == 0, f"{r.stdout} {r.stderr}"
|
||||
|
||||
r = root.run(["/usr/bin/false"], monitor)
|
||||
assert r.returncode != 0
|
||||
|
||||
# Test that fs setup looks correct
|
||||
r = root.run(["readlink", "-f", "/var/tmp"], monitor)
|
||||
assert r.returncode == 0
|
||||
assert r.stdout.strip().split("\n")[-1] == "/tmp"
|
||||
r = root.run(["stat", "-L", "--format=%a", "/var/tmp"], monitor)
|
||||
assert r.returncode == 0
|
||||
assert r.stdout.strip().split("\n")[-1] == "1777"
|
||||
|
||||
|
||||
@pytest.mark.skipif(not TestBase.can_bind_mount(), reason="root only")
|
||||
def test_runner_fail(tempdir):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue