can sync file!
integration test works
This commit is contained in:
@@ -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"]
|
||||
|
||||
@@ -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
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user