Test updates: add timezone, some fixes for debug callers

This commit is contained in:
2026-06-25 15:52:53 +09:00
parent e1109e925b
commit 7e01886ad8
4 changed files with 29 additions and 21 deletions
@@ -24,25 +24,25 @@ if [ -z "${db_user}" ] || [ -z "${db_name}" ] || [ -z "${db_host}" ]; then
exit 2;
fi;
# drop database, on error exit with 3
dropdb -U ${db_user} -h ${db_host} ${db_name} 2>&1;
if [ $? -ne 0 ]; then
dropdb -U "${db_user}" -h "${db_host}" "${db_name}" 2>&1;
if ! $?; then
echo 3;
exit 3;
fi;
# create database, on error exit with 4
createdb -U ${db_user} -O ${db_user} -h ${db_host} -E utf8 ${db_name} 2>&1;
if [ $? -ne 0 ]; then
createdb -U "${db_user}" -O "${db_user}" -h "${db_host}" -E utf8 "${db_name}" 2>&1;
if ! $?; then
echo 4;
exit 4;
fi;
# if error 5 thrown, test with enabled below
if [ ! -z "${5}" ]; then
psql -U ${db_user} -h ${db_host} -f ${load_sql} ${db_name};
if [ -n "${5}" ]; then
psql -U "${db_user}" -h "${db_host}" -f "${load_sql}" "${db_name}";
else
# load data (redirect ALL error to null), on error exit with 5
psql -U ${db_user} -h ${db_host} -f ${load_sql} ${db_name} 2>&1 1>/dev/null 2>/dev/null;
psql -U "${db_user}" -h "${db_host}" -f "${load_sql}" "${db_name}" 2>&1 1>/dev/null 2>/dev/null;
fi;
if [ $? -ne 0 ]; then
if ! $?; then
echo 5;
exit 5;
fi;