Skip to content

Commit 2066119

Browse files
test syncing into target root folder
1 parent db8eaa3 commit 2066119

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/test_target_root.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
. ~/assert.sh
2+
set -e
3+
4+
# create source file
5+
mkdir -p /root/my_project
6+
echo 'file content' > /root/my_project/file.txt
7+
8+
# livesync should create the target file and run the on-change command
9+
cd /root/my_project
10+
livesync --target-port 2222 --target-root foo/bar target &
11+
sleep 5
12+
assert_eq "file content" "$(cat /target/foo/bar/my_project/file.txt)" "wrong file content"
13+
14+
# change source file, livesync should update the target file and run the on-change command again
15+
echo 'new file content' > file.txt
16+
sleep 5
17+
assert_eq "new file content" "$(cat /target/foo/bar/my_project/file.txt)" "wrong file content"

0 commit comments

Comments
 (0)