Skip to content

Commit

Permalink
Fixed tests not import IHPSchema.sql and thus failing when built-in d…
Browse files Browse the repository at this point in the history
…ata types are used. Fixes #1155
  • Loading branch information
mpscholten committed Oct 19, 2021
1 parent 02622fd commit 7d73729
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion IHP/Test/Database.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import qualified Data.UUID as UUID
import qualified System.Process as Process
import qualified Data.Text as Text
import qualified Data.ByteString as ByteString

import qualified IHP.LibDir as LibDir

data TestDatabase = TestDatabase
{ name :: Text
Expand All @@ -35,6 +35,8 @@ createTestDatabase databaseUrl = do
|> Text.replace "postgresql:///app" ("postgresql:///" <> databaseName)
|> cs

libDir <- LibDir.findLibDirectory
importSql newUrl (cs libDir <> "/IHPSchema.sql")
importSql newUrl "Application/Schema.sql"

pure TestDatabase { name = databaseName, url = newUrl }
Expand Down

0 comments on commit 7d73729

Please sign in to comment.