Move allow_other tests into main test suite

This commit is contained in:
Tor Arne Vestbø
2018-09-18 00:26:21 +02:00
parent 3a95b0cd73
commit 970ad5e38d
2 changed files with 9 additions and 16 deletions

View File

@@ -21,6 +21,15 @@ function test_dmg_has_correct_permissions() {
test $permissions = "-r--------"
}
function test_dmg_permissions_reflect_allow_other() {
local mount_dir
local dmg_file
read -r mount_dir dmg_file < <(mount_sparsebundle -o allow_other)
permissions=$(ls -l $dmg_file | awk '{print $1; exit}')
test $permissions = "-r-----r--"
umount $mount_dir && rm -Rf $mount_dir
}
function teardown() {
umount $mount_dir && rm -Rf $mount_dir
}

View File

@@ -1,16 +0,0 @@
#!/usr/bin/env testrunner.sh
source "$(dirname "$0")/testhelpers.sh"
function setup() {
read -r mount_dir dmg_file < <(mount_sparsebundle -o allow_other)
}
function test_dmg_has_correct_permissions() {
permissions=$(ls -l $dmg_file | awk '{print $1; exit}')
test $permissions = "-r-----r--"
}
function teardown() {
umount $mount_dir && rm -Rf $mount_dir
}