File: test_mount.py

package info (click to toggle)
rauc 1.15-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,336 kB
  • sloc: ansic: 36,989; python: 3,354; sh: 1,391; xml: 53; makefile: 41
file content (23 lines) | stat: -rw-r--r-- 604 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import os
import shutil

from conftest import root
from helper import run


@root
def test_mount(tmp_path):
    shutil.copyfile("good-bundle.raucb", tmp_path / "good-bundle.raucb")

    try:
        out, err, exitcode = run(f"rauc --conf=test.conf mount {tmp_path}/good-bundle.raucb")

        assert exitcode == 0
        assert "Mounted bundle at /mnt/rauc/bundle" in out

        assert os.path.exists("/mnt/rauc/bundle/manifest.raucm")
        assert os.path.exists("/mnt/rauc/bundle/rootfs.img")

    finally:
        out, err, exitcode = run("umount /mnt/rauc/bundle")
        assert exitcode == 0