summaryrefslogtreecommitdiff
path: root/tests/02_symlink_add_remove.sh
blob: 6fe54d81b97dca2007ff845a6ec3d42a5934167d (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="03"
TEST_NAME="Symlink add/remove"

CREATE=`pwd`/$1
DEPLOY=`pwd`/$2
TEST_TOOLS=$3

. ./test_lib.sh

############# Test specific code ############

function setup {
	ln -s /foo $ORIGIN/remove && \
	ln -s /bar $TARGET/add && \
	chown -h :cdrom $TARGET/add
}

function check_results {
	test   -L $ORIGIN/add    && \
	test ! -L $ORIGIN/remove && \
	check_symlink     $ORIGIN/add "/bar"      && \
	check_same_mtime  $ORIGIN/add $TARGET/add && \
	check_same_uidgid $ORIGIN/add $TARGET/add
}

#############################################
main $@