Minor test cleanup
This commit is contained in:
parent
e67422a803
commit
cf342648cd
@ -23,8 +23,8 @@ install:
|
||||
- export PATH=$HOME/.local/bin:$PATH
|
||||
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
|
||||
- stack --version
|
||||
- createuser -s --no-password test
|
||||
- createdb -O test test
|
||||
- echo "CREATE USER esqutest WITH PASSWORD 'esqutest';" | sudo -u postgres psql
|
||||
- sudo -u postgres createdb -O esqutest esqutest
|
||||
|
||||
script:
|
||||
- stack setup
|
||||
|
||||
15
Makefile
15
Makefile
@ -12,5 +12,20 @@ ghci:
|
||||
test:
|
||||
stack test
|
||||
|
||||
test-postgresql:
|
||||
stack test --flag esqueleto:postgresql
|
||||
|
||||
test-mysql:
|
||||
stack test --flag esqueleto:mysql
|
||||
|
||||
test-ghci:
|
||||
stack ghci esqueleto:test:test
|
||||
|
||||
# sudo -u postgres createuser -s - esqueleto-test
|
||||
reset-pgsql:
|
||||
-sudo -u postgres dropdb esqutest
|
||||
-sudo -u postgres dropuser esqutest
|
||||
echo "CREATE USER esqutest WITH PASSWORD 'esqutest';" | sudo -u postgres psql
|
||||
sudo -u postgres createdb -O esqutest esqutest
|
||||
|
||||
.PHONY: build build-7.10 build-8.0 ghci test test-ghci
|
||||
|
||||
@ -1528,13 +1528,13 @@ withConn :: RunDbMonad m => (SqlBackend -> R.ResourceT m a) -> m a
|
||||
withConn =
|
||||
R.runResourceT .
|
||||
#if defined(WITH_POSTGRESQL)
|
||||
withPostgresqlConn "host=localhost port=5432 user=test dbname=test"
|
||||
withPostgresqlConn "host=localhost port=5432 user=esqutest password=esqutest dbname=esqutest"
|
||||
#elif defined (WITH_MYSQL)
|
||||
withMySQLConn defaultConnectInfo
|
||||
{ connectHost = "localhost"
|
||||
, connectUser = "test"
|
||||
, connectPassword = "test"
|
||||
, connectDatabase = "test"
|
||||
, connectUser = "esqutest"
|
||||
, connectPassword = "esqutest"
|
||||
, connectDatabase = "esqutest"
|
||||
}
|
||||
#else
|
||||
withSqliteConn ":memory:"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user