-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test syncing into target root folder
- Loading branch information
1 parent
db8eaa3
commit 2066119
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
. ~/assert.sh | ||
set -e | ||
|
||
# create source file | ||
mkdir -p /root/my_project | ||
echo 'file content' > /root/my_project/file.txt | ||
|
||
# livesync should create the target file and run the on-change command | ||
cd /root/my_project | ||
livesync --target-port 2222 --target-root foo/bar target & | ||
sleep 5 | ||
assert_eq "file content" "$(cat /target/foo/bar/my_project/file.txt)" "wrong file content" | ||
|
||
# change source file, livesync should update the target file and run the on-change command again | ||
echo 'new file content' > file.txt | ||
sleep 5 | ||
assert_eq "new file content" "$(cat /target/foo/bar/my_project/file.txt)" "wrong file content" |