diff --git a/test/units/TEST-58-REPART.sh b/test/units/TEST-58-REPART.sh index 6a70464887..968d332f06 100755 --- a/test/units/TEST-58-REPART.sh +++ b/test/units/TEST-58-REPART.sh @@ -1067,11 +1067,6 @@ EOF testcase_minimize() { local defs imgs output - if systemd-detect-virt --quiet --container; then - echo "Skipping minimize test in container." - return - fi - echo "*** minimization ***" defs="$(mktemp --directory "/tmp/test-repart.defs.XXXXXXXXXX")" @@ -1114,6 +1109,11 @@ EOF # Check that we can dissect, mount and unmount a minimized image. + if systemd-detect-virt --quiet --container; then + echo "Skipping minimize dissect, mount and unmount test in container." + return + fi + systemd-dissect "$imgs/zzz" systemd-dissect "$imgs/zzz" -M "$imgs/mnt" systemd-dissect -U "$imgs/mnt"