Skip to content

Commit

Permalink
test syncing into target root folder
Browse files Browse the repository at this point in the history
  • Loading branch information
falkoschindler committed Aug 25, 2023
1 parent db8eaa3 commit 2066119
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/test_target_root.sh
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"

0 comments on commit 2066119

Please sign in to comment.