summary: Check that /media is available to snaps installed in --devmode
# This is blacklisted on debian because we first have to get the dpkg-vendor patches
systems: [-debian-8]
prepare: |
    echo "Having installed the snapd-hacker-toolbelt snap in devmode"
    snap install --devmode snapd-hacker-toolbelt
    echo "Having added a canary file in /media"
    echo "test" > /media/canary
execute: |
    cd /
    echo "We can see the canary file in /media"
    [ "$(snapd-hacker-toolbelt.busybox cat /media/canary)" = "test" ]
restore: |
    snap remove --purge snapd-hacker-toolbelt
    rm -f /media/canary
