summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/setup.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/setup.sh b/test/setup.sh
index 64ba88f2..b71e73e8 100644
--- a/test/setup.sh
+++ b/test/setup.sh
@@ -105,8 +105,10 @@ SSH_TTY=/dev/pts/0
export SSH_CLIENT SSH_CONNECTION SSH_TTY
# Initialize the test database.
+DBSCHEMA="$TOPLEVEL/schema/aur-schema-sqlite.sql"
+[ -f "$DBSCHEMA" ] || error 'SQLite database schema not found'
rm -f aur.db
-sqlite3 aur.db <"$TOPLEVEL/schema/aur-schema-sqlite.sql"
+sqlite3 aur.db <"$DBSCHEMA"
echo "INSERT INTO Users (ID, UserName, Passwd, Email, AccountTypeID) VALUES (1, 'user', '!', 'user@localhost', 1);" | sqlite3 aur.db
echo "INSERT INTO Users (ID, UserName, Passwd, Email, AccountTypeID) VALUES (2, 'tu', '!', 'tu@localhost', 2);" | sqlite3 aur.db