summaryrefslogtreecommitdiff
path: root/tests/03_regular_file_add_remove.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/03_regular_file_add_remove.sh')
-rwxr-xr-xtests/03_regular_file_add_remove.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/03_regular_file_add_remove.sh b/tests/03_regular_file_add_remove.sh
new file mode 100755
index 0000000..f8b5652
--- /dev/null
+++ b/tests/03_regular_file_add_remove.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+TEST_ID="01"
+TEST_NAME="Regular file add remove"
+
+CREATE=`pwd`/$1
+DEPLOY=`pwd`/$2
+TEST_TOOLS=$3
+
+. ./test_lib.sh
+
+############# Test specific code ############
+
+# This test checks that normal files content and metadata are
+
+function setup {
+ touch $ORIGIN/remove && \
+ echo 1 > $TARGET/add && \
+ chown -h :cdrom $TARGET/add
+}
+
+# check_same_mtime FILE_A FILE_B
+
+function check_results {
+ test -f $ORIGIN/add && \
+ test ! -f $ORIGIN/remove && \
+ check_content $ORIGIN/add "1" && \
+ check_same_mtime $ORIGIN/add $TARGET/add && \
+ check_same_uidgid $ORIGIN/add $TARGET/add
+}
+
+#############################################
+main $@