mirror of
https://github.com/mgree/ffs.git
synced 2024-07-14 23:00:24 +03:00
added test for empty log to see if quiet was successful and rm all tmp files (#64)
This commit is contained in:
parent
2dee504113
commit
aa6c2307ee
@ -7,16 +7,18 @@ fail() {
|
||||
cd
|
||||
umount "$MNT"
|
||||
rmdir "$MNT"
|
||||
rm "$JSON" "$LOG"
|
||||
fi
|
||||
exit 1
|
||||
}
|
||||
|
||||
MNT=$(mktemp -d)
|
||||
JSON=$(mktemp)
|
||||
LOG=$(mktemp)
|
||||
|
||||
cp ../json/object.json "$JSON"
|
||||
|
||||
ffs -qi -m "$MNT" "$JSON" &
|
||||
ffs -qi -m "$MNT" "$JSON" >"$LOG" 2>&1 &
|
||||
PID=$!
|
||||
sleep 2
|
||||
echo hi >"$MNT"/greeting
|
||||
@ -26,6 +28,7 @@ sleep 1
|
||||
kill -0 $PID >/dev/null 2>&1 && fail process1
|
||||
|
||||
diff ../json/object.json "$JSON" >/dev/null && fail same
|
||||
[ "$(cat $LOG )" = "" ] || fail quiet
|
||||
|
||||
ffs --readonly -m "$MNT" "$JSON" &
|
||||
PID=$!
|
||||
|
Loading…
Reference in New Issue
Block a user