Test: make run/test_mount.py not depend on installed osbuild

Previously, the unit test depended on osbuild modules being installed on
the system. As a result, this made the test not work in CI where we do
not install osbuild when running unit tests. In addition, the stage
executed by the unit test would use different version of osbuild
internals than the version that is being tests, which could result in
issues or not testing the intended code.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
Tomáš Hozza 2023-04-06 16:27:07 +02:00 committed by Tomáš Hozza
parent 975965510b
commit 56987fdda4

View file

@ -70,8 +70,11 @@ def create_image(tmpdir):
}
with make_arguments(mkfsopts):
env = os.environ.copy()
env["PYTHONPATH"] = os.curdir
subprocess.run(
[os.path.join(os.curdir, "stages", "org.osbuild.mkfs.fat")],
env=env,
check=True,
stdout=sys.stdout,
stderr=sys.stderr)