summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2011-10-13 16:46:19 +0100
committerRichard Maw <richard.maw@codethink.co.uk>2011-10-13 16:46:19 +0100
commita9e869d4e050ef59b3cad83930a376fede692804 (patch)
treed0b5f93cfd6787e79c117154a10d4b1c0f41381c /tests
parentc131cb9586bfdd5ce19c33639e908b89c44104d7 (diff)
downloadtbdiff-a9e869d4e050ef59b3cad83930a376fede692804.tar.gz
Fixed some typos in tests
added test for group changes in symlinks symlinks change the group of what is referenced
Diffstat (limited to 'tests')
-rwxr-xr-xtests/02_fifo_diff.sh2
-rwxr-xr-xtests/04_symlink_diff.sh19
2 files changed, 19 insertions, 2 deletions
diff --git a/tests/02_fifo_diff.sh b/tests/02_fifo_diff.sh
index 14bc3ac..73faf6b 100755
--- a/tests/02_fifo_diff.sh
+++ b/tests/02_fifo_diff.sh
@@ -1,7 +1,7 @@
#!/bin/bash
TEST_ID="02"
-TEST_NAME="Named pipe (FIFO) add remove test"
+TEST_NAME="Named pipe (FIFO) diff test"
CREATE=`pwd`/$1
DEPLOY=`pwd`/$2
diff --git a/tests/04_symlink_diff.sh b/tests/04_symlink_diff.sh
index 5c8dc5f..7c03868 100755
--- a/tests/04_symlink_diff.sh
+++ b/tests/04_symlink_diff.sh
@@ -1,7 +1,7 @@
#!/bin/bash
TEST_ID="04"
-TEST_NAME="Symlink add/remove"
+TEST_NAME="Symlink diff"
CREATE=`pwd`/$1
DEPLOY=`pwd`/$2
@@ -12,12 +12,29 @@ TEST_TOOLS=$3
############# Test specific code ############
setup () {
+ for dir in $ORIGIN $TARGET; do
+ (
+ cd $dir &&
+ echo 1 >file &&
+ chown :cdrom file &&
+ mkdir -p dir &&
+ chown :cdrom dir &&
+ ln -s file flink &&
+ ln -s dir dlink
+ ); done &&
+ chgrp -h root $TARGET/flink $TARGET/dlink &&
ln -s /foo $ORIGIN/a && \
ln -s /bar $TARGET/a && \
chown -h :cdrom $TARGET/a
}
check_results () {
+ test -f $ORIGIN/file &&
+ check_group $ORIGIN/file cdrom &&
+ test -f $ORIGIN/dir &&
+ check_group $ORIGIN/dir cdrom &&
+ check_group $ORIGIN/flink root &&
+ check_group $ORIGIN/dlink root &&
test -L $ORIGIN/a && \
check_symlink $ORIGIN/a "/bar" && \
check_group $ORIGIN/a cdrom && \