From 031de4d35e225b2fb6da77dce02e599e66e54149 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Fri, 10 Dec 2021 22:53:06 +0100 Subject: [PATCH] fix: Dump db-config option without quotes as it's a boolean --- src/PostgREST/Config.hs | 2 +- test/io-tests/configs/expected/aliases.config | 2 +- test/io-tests/configs/expected/boolean-numeric.config | 2 +- test/io-tests/configs/expected/boolean-string.config | 2 +- test/io-tests/configs/expected/defaults.config | 2 +- .../expected/no-defaults-with-db-other-authenticator.config | 2 +- test/io-tests/configs/expected/no-defaults-with-db.config | 2 +- test/io-tests/configs/expected/no-defaults.config | 2 +- test/io-tests/configs/expected/types.config | 2 +- test/io-tests/configs/no-defaults.config | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/PostgREST/Config.hs b/src/PostgREST/Config.hs index 6f8c19abe..d5d63cd92 100644 --- a/src/PostgREST/Config.hs +++ b/src/PostgREST/Config.hs @@ -131,7 +131,7 @@ toText conf = ,("db-prepared-statements", T.toLower . show . configDbPreparedStatements) ,("db-root-spec", q . maybe mempty dumpQi . configDbRootSpec) ,("db-schemas", q . T.intercalate "," . toList . configDbSchemas) - ,("db-config", q . T.toLower . show . configDbConfig) + ,("db-config", T.toLower . show . configDbConfig) ,("db-tx-end", q . showTxEnd) ,("db-uri", q . configDbUri) ,("db-use-legacy-gucs", T.toLower . show . configDbUseLegacyGucs) diff --git a/test/io-tests/configs/expected/aliases.config b/test/io-tests/configs/expected/aliases.config index b8cd55fd9..24d89f462 100644 --- a/test/io-tests/configs/expected/aliases.config +++ b/test/io-tests/configs/expected/aliases.config @@ -9,7 +9,7 @@ db-pre-request = "check_alias" db-prepared-statements = true db-root-spec = "open_alias" db-schemas = "provided_through_alias" -db-config = "false" +db-config = false db-tx-end = "commit" db-uri = "required" db-use-legacy-gucs = true diff --git a/test/io-tests/configs/expected/boolean-numeric.config b/test/io-tests/configs/expected/boolean-numeric.config index cc67e0890..819368bb2 100644 --- a/test/io-tests/configs/expected/boolean-numeric.config +++ b/test/io-tests/configs/expected/boolean-numeric.config @@ -9,7 +9,7 @@ db-pre-request = "" db-prepared-statements = false db-root-spec = "" db-schemas = "required" -db-config = "false" +db-config = false db-tx-end = "commit" db-uri = "required" db-use-legacy-gucs = true diff --git a/test/io-tests/configs/expected/boolean-string.config b/test/io-tests/configs/expected/boolean-string.config index cc67e0890..819368bb2 100644 --- a/test/io-tests/configs/expected/boolean-string.config +++ b/test/io-tests/configs/expected/boolean-string.config @@ -9,7 +9,7 @@ db-pre-request = "" db-prepared-statements = false db-root-spec = "" db-schemas = "required" -db-config = "false" +db-config = false db-tx-end = "commit" db-uri = "required" db-use-legacy-gucs = true diff --git a/test/io-tests/configs/expected/defaults.config b/test/io-tests/configs/expected/defaults.config index 792b60e07..14b97dee9 100644 --- a/test/io-tests/configs/expected/defaults.config +++ b/test/io-tests/configs/expected/defaults.config @@ -9,7 +9,7 @@ db-pre-request = "" db-prepared-statements = true db-root-spec = "" db-schemas = "required" -db-config = "false" +db-config = false db-tx-end = "commit" db-uri = "required" db-use-legacy-gucs = true diff --git a/test/io-tests/configs/expected/no-defaults-with-db-other-authenticator.config b/test/io-tests/configs/expected/no-defaults-with-db-other-authenticator.config index f40efe775..ff5ec9676 100644 --- a/test/io-tests/configs/expected/no-defaults-with-db-other-authenticator.config +++ b/test/io-tests/configs/expected/no-defaults-with-db-other-authenticator.config @@ -9,7 +9,7 @@ db-pre-request = "test.other_custom_headers" db-prepared-statements = false db-root-spec = "other_root" db-schemas = "test,other_tenant1,other_tenant2" -db-config = "true" +db-config = true db-tx-end = "rollback-allow-override" db-uri = "" db-use-legacy-gucs = false diff --git a/test/io-tests/configs/expected/no-defaults-with-db.config b/test/io-tests/configs/expected/no-defaults-with-db.config index 82850fca5..4159b6b4d 100644 --- a/test/io-tests/configs/expected/no-defaults-with-db.config +++ b/test/io-tests/configs/expected/no-defaults-with-db.config @@ -9,7 +9,7 @@ db-pre-request = "test.custom_headers" db-prepared-statements = false db-root-spec = "root" db-schemas = "test,tenant1,tenant2" -db-config = "true" +db-config = true db-tx-end = "commit-allow-override" db-uri = "" db-use-legacy-gucs = false diff --git a/test/io-tests/configs/expected/no-defaults.config b/test/io-tests/configs/expected/no-defaults.config index 8723c036a..e782643fb 100644 --- a/test/io-tests/configs/expected/no-defaults.config +++ b/test/io-tests/configs/expected/no-defaults.config @@ -9,7 +9,7 @@ db-pre-request = "please_run_fast" db-prepared-statements = false db-root-spec = "openapi_v3" db-schemas = "multi,tenant,setup" -db-config = "false" +db-config = false db-tx-end = "rollback-allow-override" db-uri = "tmp_db" db-use-legacy-gucs = false diff --git a/test/io-tests/configs/expected/types.config b/test/io-tests/configs/expected/types.config index b2b858989..f77e97cc0 100644 --- a/test/io-tests/configs/expected/types.config +++ b/test/io-tests/configs/expected/types.config @@ -9,7 +9,7 @@ db-pre-request = "" db-prepared-statements = true db-root-spec = "" db-schemas = "required" -db-config = "true" +db-config = true db-tx-end = "commit" db-uri = "required" db-use-legacy-gucs = true diff --git a/test/io-tests/configs/no-defaults.config b/test/io-tests/configs/no-defaults.config index 01cd53a73..8284a74c2 100644 --- a/test/io-tests/configs/no-defaults.config +++ b/test/io-tests/configs/no-defaults.config @@ -9,7 +9,7 @@ db-pre-request = "please_run_fast" db-prepared-statements = false db-root-spec = "openapi_v3" db-schemas = "multi, tenant,setup" -db-config = "false" +db-config = false db-tx-end = "rollback-allow-override" db-uri = "tmp_db" db-use-legacy-gucs = false