update _do_gen_handler_tests for new paths

This commit is contained in:
sentriz
2021-02-03 23:07:08 +00:00
parent e69cd4c71b
commit 3df1d09d50

View File

@@ -1,25 +1,19 @@
#!/usr/bin/env bash #!/usr/bin/env bash
test_data_path=server/ctrlsubsonic/testdata
test_listen_addr=localhost:9353 test_listen_addr=localhost:9353
test_music_path=~/music test_data_path=server/ctrlsubsonic/testdata
test_db_path=$test_data_path/db test_db_path=$test_data_path/db
if [[ "$1" == "--scan" ]]; then test_music_path=~/music
echo -e "\e[91mwarning: \e[39mthe --scan option was passed" test_podcast_path="$(mktemp -d)"
echo "- this option should only be used if the database schema changes" test_cache_path="$(mktemp -d)"
echo "- the test json will likely change a lot"
echo "- make sure you carefully read the diff of old and new json after this script"
rm "$test_db_path" 2>/dev/null
./_do_run_scanner \
-music-path "$test_music_path" \
-db-path "$test_db_path"
fi
mkdir "$test_music_path" 2>/dev/null mkdir "$test_music_path" 2>/dev/null
echo "waiting for server to start" echo "waiting for server to start"
./_do_run_server \ ./_do_run_server \
-music-path "$test_music_path" \ -music-path "$test_music_path" \
-podcast-path "$test_podcast_path" \
-cache-path "$test_cache_path" \
-db-path "$test_db_path" \ -db-path "$test_db_path" \
-listen-addr "$test_listen_addr" 2>&1 \ -listen-addr "$test_listen_addr" 2>&1 \
| while read line; do | while read line; do