Add proxy awareness for OpenAPI spec generation
Proxy uri from command line options takes precedence over host and port
This commit is contained in:
@@ -20,6 +20,7 @@ import qualified Feature.QuerySpec
|
||||
import qualified Feature.RangeSpec
|
||||
import qualified Feature.StructureSpec
|
||||
import qualified Feature.UnicodeSpec
|
||||
import qualified Feature.ProxySpec
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
@@ -32,6 +33,7 @@ main = do
|
||||
let withApp = return $ postgrest testCfg refDbStructure pool
|
||||
ltdApp = return $ postgrest testLtdRowsCfg refDbStructure pool
|
||||
unicodeApp = return $ postgrest testUnicodeCfg refDbStructure pool
|
||||
proxyApp = return $ postgrest testProxyCfg refDbStructure pool
|
||||
|
||||
hspec $ do
|
||||
mapM_ (beforeAll_ resetDb . before withApp) specs
|
||||
@@ -44,6 +46,10 @@ main = do
|
||||
beforeAll_ resetDb . before unicodeApp $
|
||||
describe "Feature.UnicodeSpec" Feature.UnicodeSpec.spec
|
||||
|
||||
-- this test runs with a proxy
|
||||
beforeAll_ resetDb . before proxyApp $
|
||||
describe "Feature.ProxySpec" Feature.ProxySpec.spec
|
||||
|
||||
where
|
||||
specs = map (uncurry describe) [
|
||||
("Feature.AuthSpec" , Feature.AuthSpec.spec)
|
||||
|
||||
Reference in New Issue
Block a user