Skip to content

Commit

Permalink
Move modules to library
Browse files Browse the repository at this point in the history
  • Loading branch information
kderme authored and erikd committed Feb 14, 2022
1 parent 2bf6dca commit 3012270
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
16 changes: 12 additions & 4 deletions cardano-chain-gen/cardano-chain-gen.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -90,6 +97,7 @@ library
, memory
, mtl
, monad-control
, monad-logger
, network-mux
, nothunks
, ouroboros-consensus
Expand All @@ -102,18 +110,21 @@ library
, persistent-postgresql
, plutus-core
, plutus-example
, postgresql-simple
, pretty-show
, prometheus
, random-shuffle
, serialise
, set-algebra
, silently
, small-steps
, split
, stm
, strict
, strict-containers
, strict-stm
, swagger2
, tasty-hunit
, text
, text-ansi
, time
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Test.Cardano.Db.Mock.UnifiedApi where
module Cardano.Mock.UnifiedApi where

import Control.Monad.Class.MonadSTM.Strict

Expand Down
6 changes: 3 additions & 3 deletions cardano-chain-gen/test/Test/Cardano/Db/Mock/Unit.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit 3012270

Please sign in to comment.