diff --git a/cardano-chain-gen/cardano-chain-gen.cabal b/cardano-chain-gen/cardano-chain-gen.cabal index 286fe6468..1978008a2 100644 --- a/cardano-chain-gen/cardano-chain-gen.cabal +++ b/cardano-chain-gen/cardano-chain-gen.cabal @@ -44,12 +44,15 @@ library Cardano.Mock.ChainDB Cardano.Mock.ChainSync.Server Cardano.Mock.ChainSync.State + Cardano.Mock.Db.Config + Cardano.Mock.Db.Validate Cardano.Mock.Forging.Interpreter Cardano.Mock.Forging.Tx.Alonzo Cardano.Mock.Forging.Tx.Alonzo.ScriptsExamples Cardano.Mock.Forging.Tx.Generic Cardano.Mock.Forging.Tx.Shelley Cardano.Mock.Forging.Types + Cardano.Mock.UnifiedApi build-depends: base >= 4.14 && < 4.16 , async @@ -63,6 +66,10 @@ library , cardano-crypto-class , cardano-crypto-praos , cardano-crypto-wrapper + , cardano-cli + , cardano-db + , cardano-db-sync + , cardano-smash-server , cardano-ledger-alonzo , cardano-ledger-byron , cardano-ledger-core @@ -90,6 +97,7 @@ library , memory , mtl , monad-control + , monad-logger , network-mux , nothunks , ouroboros-consensus @@ -102,11 +110,13 @@ library , persistent-postgresql , plutus-core , plutus-example + , postgresql-simple , pretty-show , prometheus , random-shuffle , serialise , set-algebra + , silently , small-steps , split , stm @@ -114,6 +124,7 @@ library , strict-containers , strict-stm , swagger2 + , tasty-hunit , text , text-ansi , time @@ -146,11 +157,8 @@ test-suite cardano-chain-gen other-modules: Paths_cardano_chain_gen MigrationValidations - other-modules: Test.Cardano.Db.Mock.Config - Test.Cardano.Db.Mock.Examples + other-modules: Test.Cardano.Db.Mock.Examples Test.Cardano.Db.Mock.Unit - Test.Cardano.Db.Mock.UnifiedApi - Test.Cardano.Db.Mock.Validate build-depends: async , base >= 4.12 && < 4.15 diff --git a/cardano-chain-gen/test/Test/Cardano/Db/Mock/Config.hs b/cardano-chain-gen/src/Cardano/Mock/Db/Config.hs similarity index 99% rename from cardano-chain-gen/test/Test/Cardano/Db/Mock/Config.hs rename to cardano-chain-gen/src/Cardano/Mock/Db/Config.hs index 8b528dc5b..9b2e9dc90 100644 --- a/cardano-chain-gen/test/Test/Cardano/Db/Mock/Config.hs +++ b/cardano-chain-gen/src/Cardano/Mock/Db/Config.hs @@ -2,7 +2,7 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} -module Test.Cardano.Db.Mock.Config where +module Cardano.Mock.Db.Config where import Cardano.Prelude (ReaderT, panic, stderr) diff --git a/cardano-chain-gen/test/Test/Cardano/Db/Mock/Validate.hs b/cardano-chain-gen/src/Cardano/Mock/Db/Validate.hs similarity index 99% rename from cardano-chain-gen/test/Test/Cardano/Db/Mock/Validate.hs rename to cardano-chain-gen/src/Cardano/Mock/Db/Validate.hs index 5ba17b016..2db9efe4b 100644 --- a/cardano-chain-gen/test/Test/Cardano/Db/Mock/Validate.hs +++ b/cardano-chain-gen/src/Cardano/Mock/Db/Validate.hs @@ -5,7 +5,7 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} -module Test.Cardano.Db.Mock.Validate where +module Cardano.Mock.Db.Validate where import Cardano.Db import Control.Concurrent @@ -42,10 +42,10 @@ import Cardano.SMASH.Server.Types import Ouroboros.Consensus.Cardano.Block import Ouroboros.Consensus.Shelley.Ledger (ShelleyBlock) +import Cardano.Mock.Db.Config import Cardano.Mock.Forging.Tx.Generic import Cardano.Mock.Forging.Types -import Test.Cardano.Db.Mock.Config import Test.Tasty.HUnit diff --git a/cardano-chain-gen/test/Test/Cardano/Db/Mock/UnifiedApi.hs b/cardano-chain-gen/src/Cardano/Mock/UnifiedApi.hs similarity index 99% rename from cardano-chain-gen/test/Test/Cardano/Db/Mock/UnifiedApi.hs rename to cardano-chain-gen/src/Cardano/Mock/UnifiedApi.hs index afaf817fb..be1567aa9 100644 --- a/cardano-chain-gen/test/Test/Cardano/Db/Mock/UnifiedApi.hs +++ b/cardano-chain-gen/src/Cardano/Mock/UnifiedApi.hs @@ -1,4 +1,4 @@ -module Test.Cardano.Db.Mock.UnifiedApi where +module Cardano.Mock.UnifiedApi where import Control.Monad.Class.MonadSTM.Strict diff --git a/cardano-chain-gen/test/Test/Cardano/Db/Mock/Unit.hs b/cardano-chain-gen/test/Test/Cardano/Db/Mock/Unit.hs index 6dfbc3cfe..1c0f8dafa 100644 --- a/cardano-chain-gen/test/Test/Cardano/Db/Mock/Unit.hs +++ b/cardano-chain-gen/test/Test/Cardano/Db/Mock/Unit.hs @@ -36,20 +36,20 @@ import Cardano.SMASH.Server.PoolDataLayer import Cardano.SMASH.Server.Types import Cardano.Mock.ChainSync.Server +import Cardano.Mock.Db.Validate +import Cardano.Mock.Db.Config import Cardano.Mock.Forging.Interpreter import qualified Cardano.Mock.Forging.Tx.Alonzo as Alonzo import Cardano.Mock.Forging.Tx.Alonzo.ScriptsExamples import Cardano.Mock.Forging.Tx.Generic import qualified Cardano.Mock.Forging.Tx.Shelley as Shelley import Cardano.Mock.Forging.Types +import Cardano.Mock.UnifiedApi import Test.Tasty (TestTree, testGroup) import Test.Tasty.HUnit (Assertion, assertBool, assertEqual, assertFailure, testCase) -import Test.Cardano.Db.Mock.Config import Test.Cardano.Db.Mock.Examples -import Test.Cardano.Db.Mock.UnifiedApi -import Test.Cardano.Db.Mock.Validate unitTests :: IOManager -> [(Text, Text)] -> TestTree unitTests iom knownMigrations =