File tree Expand file tree Collapse file tree
cardano-chain-gen/test/Test/Cardano/Db/Mock Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -281,8 +281,15 @@ withConfig staticDir mutableDir cmdLineArgs config action = do
281281{-# ANN withConfig ("HLint: ignore Redundant pure" :: String) #-}
282282
283283mkSyncNodeConfig :: FilePath -> CommandLineArgs -> IO SyncNodeConfig
284- mkSyncNodeConfig configFilePath cmdLineArgs =
285- readSyncNodeConfig $ mkConfigFile configDir configFilename
284+ mkSyncNodeConfig configFilePath cmdLineArgs = do
285+ cfg <- readSyncNodeConfig $ mkConfigFile configDir configFilename
286+ -- Allow env-var override of the ledger backend so CI can run the
287+ -- full suite against both "inmemory" and "lsm" without per-test config changes.
288+ mBackend <- lookupEnv " DB_SYNC_TEST_LEDGER_BACKEND"
289+ pure $ case mBackend of
290+ Just " lsm" -> cfg {dncLedgerBackend = LedgerBackendLSM Nothing }
291+ Just " inmemory" -> cfg {dncLedgerBackend = LedgerBackendInMemory }
292+ _ -> cfg
286293 where
287294 configFilename = claConfigFilename cmdLineArgs
288295 configDir = mkConfigDir configFilePath
You can’t perform that action at this time.
0 commit comments