[TEST] Add extra logging for vagrant test output

The $user, $group, and $privileges are echoed when they are being
compared.
This commit is contained in:
Lee Hinman 2016-04-11 09:36:50 -06:00
parent 13c1efd4d1
commit dd8afc9567
1 changed files with 3 additions and 0 deletions

View File

@ -165,16 +165,19 @@ assert_file() {
if [ "x$user" != "x" ]; then
realuser=$(find "$file" -maxdepth 0 -printf "%u")
echo "Expected user: $user, found $realuser"
[ "$realuser" = "$user" ]
fi
if [ "x$group" != "x" ]; then
realgroup=$(find "$file" -maxdepth 0 -printf "%g")
echo "Expected group: $group, found $realgroup"
[ "$realgroup" = "$group" ]
fi
if [ "x$privileges" != "x" ]; then
realprivileges=$(find "$file" -maxdepth 0 -printf "%m")
echo "Expected privileges: $privileges, found $realprivileges"
[ "$realprivileges" = "$privileges" ]
fi
}