summaryrefslogtreecommitdiff
path: root/tests/01_regular_file_add_remove.sh
blob: f97d40736675ccd4a602b2cf9ced98cbb9ab8305 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/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 ############

setup () {
	touch $ORIGIN/remove && \
	echo 1 > $TARGET/add && \
	chown -h :cdrom $TARGET/add
}

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 $@