From 53ca035e9b490ded376f5273f9ec1ec2e0a48888 Mon Sep 17 00:00:00 2001 From: Taimoor Zaeem Date: Thu, 6 Mar 2025 12:59:41 +0500 Subject: [PATCH] test: rename module NoJwtSpec.hs -> NoJwtSecretSpec.hs --- postgrest.cabal | 2 +- .../Feature/Auth/{NoJwtSpec.hs => NoJwtSecretSpec.hs} | 2 +- test/spec/Main.hs | 8 ++++---- test/spec/SpecHelper.hs | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) rename test/spec/Feature/Auth/{NoJwtSpec.hs => NoJwtSecretSpec.hs} (95%) diff --git a/postgrest.cabal b/postgrest.cabal index e5d81219a..f06fe783b 100644 --- a/postgrest.cabal +++ b/postgrest.cabal @@ -208,7 +208,7 @@ test-suite spec Feature.Auth.AuthSpec Feature.Auth.BinaryJwtSecretSpec Feature.Auth.NoAnonSpec - Feature.Auth.NoJwtSpec + Feature.Auth.NoJwtSecretSpec Feature.ConcurrentSpec Feature.CorsSpec Feature.ExtraSearchPathSpec diff --git a/test/spec/Feature/Auth/NoJwtSpec.hs b/test/spec/Feature/Auth/NoJwtSecretSpec.hs similarity index 95% rename from test/spec/Feature/Auth/NoJwtSpec.hs rename to test/spec/Feature/Auth/NoJwtSecretSpec.hs index cccd1baf2..cafd95564 100644 --- a/test/spec/Feature/Auth/NoJwtSpec.hs +++ b/test/spec/Feature/Auth/NoJwtSecretSpec.hs @@ -1,4 +1,4 @@ -module Feature.Auth.NoJwtSpec where +module Feature.Auth.NoJwtSecretSpec where import Network.Wai (Application) diff --git a/test/spec/Main.hs b/test/spec/Main.hs index 09fa5ac77..16c5f3930 100644 --- a/test/spec/Main.hs +++ b/test/spec/Main.hs @@ -25,7 +25,7 @@ import qualified Feature.Auth.AudienceJwtSecretSpec import qualified Feature.Auth.AuthSpec import qualified Feature.Auth.BinaryJwtSecretSpec import qualified Feature.Auth.NoAnonSpec -import qualified Feature.Auth.NoJwtSpec +import qualified Feature.Auth.NoJwtSecretSpec import qualified Feature.ConcurrentSpec import qualified Feature.CorsSpec import qualified Feature.ExtraSearchPathSpec @@ -110,7 +110,7 @@ main = do securityOpenApi = app testSecurityOpenApiCfg proxyApp = app testProxyCfg noAnonApp = app testCfgNoAnon - noJwtApp = app testCfgNoJWT + noJwtSecretApp = app testCfgNoJwtSecret binaryJwtApp = app testCfgBinaryJWT audJwtApp = app testCfgAudienceJWT asymJwkApp = app testCfgAsymJWK @@ -202,8 +202,8 @@ main = do describe "Feature.Auth.NoAnonSpec" Feature.Auth.NoAnonSpec.spec -- this test runs without a JWT secret - parallel $ before noJwtApp $ - describe "Feature.Auth.NoJwtSpec" Feature.Auth.NoJwtSpec.spec + parallel $ before noJwtSecretApp $ + describe "Feature.Auth.NoJwtSecretSpec" Feature.Auth.NoJwtSecretSpec.spec -- this test runs with a binary JWT secret parallel $ before binaryJwtApp $ diff --git a/test/spec/SpecHelper.hs b/test/spec/SpecHelper.hs index 341802cde..d3bcc5fd3 100644 --- a/test/spec/SpecHelper.hs +++ b/test/spec/SpecHelper.hs @@ -171,8 +171,8 @@ testCfgForceRollback = baseCfg { configDbTxAllowOverride = False, configDbTxRoll testCfgNoAnon :: AppConfig testCfgNoAnon = baseCfg { configDbAnonRole = Nothing } -testCfgNoJWT :: AppConfig -testCfgNoJWT = baseCfg { configJwtSecret = Nothing, configJWKS = Nothing } +testCfgNoJwtSecret :: AppConfig +testCfgNoJwtSecret = baseCfg { configJwtSecret = Nothing, configJWKS = Nothing } testUnicodeCfg :: AppConfig testUnicodeCfg = baseCfg { configDbSchemas = fromList ["تست"] }