summaryrefslogtreecommitdiff
path: root/tests/02_symlink_add_remove.sh
blob: b3280c246d922fbb4d680aee98d6ebe5c428b62d (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
30
31
32
#!/bin/bash

TEST_ID="01"
TEST_NAME="Simple symlink diff"

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 {
	ln -s /foo $ORIGIN/a && \
	ln -s /bar $TARGET/a && \
	chown -h :cdrom $TARGET/a
}

# check_same_mtime FILE_A FILE_B

function check_results {
	test -L $ORIGIN/a           && \
	check_symlink    $ORIGIN/a "/bar"        && \
	check_group      $ORIGIN/a cdrom         && \
	check_same_mtime $ORIGIN/a $ORIGIN/a
}

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