test data dir migration

This commit is contained in:
Girish Ramakrishnan
2019-09-09 16:37:59 -07:00
parent d8cb100fc0
commit 6f53723169
5 changed files with 85 additions and 6 deletions
+2 -2
View File
@@ -22,8 +22,8 @@ target_dir="$2"
if [[ "${BOX_ENV}" == "test" ]]; then
# be careful not to nuke some random directory when testing
[[ "${source_dir}" != *"./cloudron_test/"* ]] && exit 1
[[ "${target_dir}" != *"./cloudron_test/"* ]] && exit 1
[[ "${source_dir}" != *"/.cloudron_test/"* ]] && exit 1
[[ "${target_dir}" != *"/.cloudron_test/"* ]] && exit 1
fi
# copy and remove - this way if the copy fails, the original is intact