The test suite can be run against different database backends. Set the DB environment variable to select the target database after performing the following setup steps:
PostgreSQL
Create a user and database named lazysignup:
psql -c "CREATE USER lazysignup with login createdb password 'lazysignup';"
psql -c "CREATE DATABASE lazysignup with OWNER lazysignup;"
export DB="local-postgres"
MySQL
Create the database and user with appropriate privileges:
mysql -e "CREATE DATABASE lazysignup CHARACTER SET utf8;"
mysql -e "CREATE USER 'lazysignup'@'localhost' IDENTIFIED BY 'lazysignup';"
mysql -e "GRANT ALL PRIVILEGES ON lazysignup.* to 'lazysignup'@'localhost';"
mysql -e "FLUSH PRIVILEGES;"
export DB="local-mysql"
SQLite
For a lightweight local test, use SQLite:
export DB="sqlite"
# PostgreSQL
export DB="local-postgres"
# MySQL
export DB="local-mysql"
# SQLite
export DB="sqlite"