Skip to content

Commit ea8c83a

Browse files
geo2aamesgen
authored andcommitted
storage-test: move TestBlock to testlib
1 parent d644a7d commit ea8c83a

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

ouroboros-consensus/ouroboros-consensus.cabal

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ library unstable-consensus-testlib
383383
Test.Ouroboros.Consensus.ChainGenerator.Some
384384
Test.Ouroboros.Consensus.DiffusionPipelining
385385
Test.Ouroboros.Consensus.Protocol
386+
Test.Ouroboros.Storage.TestBlock
386387
Test.QuickCheck.Extras
387388
Test.Util.BoolProps
388389
Test.Util.ChainDB
@@ -453,6 +454,7 @@ library unstable-consensus-testlib
453454
fs-api ^>=0.3,
454455
fs-sim ^>=0.3,
455456
generics-sop,
457+
hashable,
456458
io-classes,
457459
io-sim,
458460
mempack,
@@ -724,7 +726,6 @@ test-suite storage-test
724726
Test.Ouroboros.Storage.PerasCertDB
725727
Test.Ouroboros.Storage.PerasCertDB.Model
726728
Test.Ouroboros.Storage.PerasCertDB.StateMachine
727-
Test.Ouroboros.Storage.TestBlock
728729
Test.Ouroboros.Storage.VolatileDB
729730
Test.Ouroboros.Storage.VolatileDB.Mock
730731
Test.Ouroboros.Storage.VolatileDB.Model
@@ -735,10 +736,8 @@ test-suite storage-test
735736
aeson,
736737
base,
737738
bifunctors,
738-
binary,
739739
bytestring,
740740
cardano-binary,
741-
cardano-crypto-class ^>=2.2,
742741
cardano-ledger-binary:testlib,
743742
cardano-ledger-core:{cardano-ledger-core, testlib},
744743
cardano-slotting:{cardano-slotting, testlib},
@@ -753,7 +752,6 @@ test-suite storage-test
753752
fs-api ^>=0.3,
754753
fs-sim ^>=0.3,
755754
generics-sop,
756-
hashable,
757755
io-classes,
758756
io-sim,
759757
mempack,

ouroboros-consensus/test/storage-test/Test/Ouroboros/Storage/TestBlock.hs renamed to ouroboros-consensus/src/unstable-consensus-testlib/Test/Ouroboros/Storage/TestBlock.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ import qualified Ouroboros.Network.Mock.Chain as Chain
125125
import System.FS.API.Lazy
126126
import Test.Cardano.Slotting.Numeric ()
127127
import Test.Cardano.Slotting.TreeDiff ()
128-
import Test.Ouroboros.Storage.ChainDB.Model
129128
import Test.QuickCheck
130129
import Test.Util.Orphans.Arbitrary ()
131130
import Test.Util.Orphans.SignableRepresentation ()
@@ -935,8 +934,6 @@ deriving instance ToExpr (HeaderEnvelopeError TestBlock)
935934
deriving instance ToExpr BftValidationErr
936935
deriving instance ToExpr (ExtValidationError TestBlock)
937936

938-
instance ModelSupportsBlock TestBlock
939-
940937
deriving anyclass instance ToExpr FsPath
941938
deriving anyclass instance ToExpr BlocksPerFile
942939
deriving instance ToExpr BinaryBlockInfo

ouroboros-consensus/test/storage-test/Test/Ouroboros/Storage/ChainDB/StateMachine.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,8 @@ deriving instance
345345
(TestConstraints blk, Show it, Show flr) =>
346346
Show (Success blk it flr)
347347

348+
instance ModelSupportsBlock TestBlock
349+
348350
-- | Short-hand
349351
type TestIterator m blk = WithEq (Iterator m blk (AllComponents blk))
350352

0 commit comments

Comments
 (0)