can sync file!

integration test works
This commit is contained in:
bj
2021-01-31 10:44:14 +02:00
parent 0af5811c96
commit afb1a2f7bd
9 changed files with 111 additions and 17 deletions
+4 -2
View File
@@ -4,6 +4,8 @@ RUN apt-get update && apt-get install -yq curl && apt-get clean
WORKDIR /app
ADD test.sh /app/test.sh
ADD test_file_sync.sh /app/test_file_sync.sh
CMD ["bash", "test.sh"]
VOLUME [ "/data1", "/data2" ]
CMD ["bash", "test_file_sync.sh"]
-12
View File
@@ -1,12 +0,0 @@
sleep 5
echo "test string" > /sync1/testfile
echo /sync1/testfile
echo /sync2/testfile
#if curl web | grep -q '<b>Visits:</b> '; then
# echo "Tests passed!"
# exit 0
#else
# echo "Tests failed!"
# exit 1
#fi
+9
View File
@@ -0,0 +1,9 @@
TEST_TEXT="test string"
echo "${TEST_TEXT}" > /data1/testfile
# shellcheck disable=SC2034
for i in $(seq 1 30); do
[ "${TEST_TEXT}" == "$(cat /data2/testfile)" ] && s=0 && break || s=$? && sleep 2
done
(exit $s)