Skip to content

Commit f11f36e

Browse files
authored
Remove testlib dependencies from hydra-chain-observer (#2464)
2 parents 067a9d1 + 384ccca commit f11f36e

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

hydra-chain-observer/hydra-chain-observer.cabal

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,10 @@ library
4646
, blockfrost-client >=0.11.0.0
4747
, http-conduit
4848
, hydra-cardano-api
49-
, hydra-cardano-api:testlib
5049
, hydra-node
5150
, hydra-plutus
5251
, hydra-prelude
53-
, hydra-test-utils
5452
, hydra-tx
55-
, hydra-tx:testlib
5653
, io-classes
5754
, network-uri
5855
, optparse-applicative

hydra-chain-observer/src/Hydra/ChainObserver/NodeClient.hs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
module Hydra.ChainObserver.NodeClient where
44

55
import Hydra.Prelude
6-
import Test.Hydra.Prelude
76

87
import Hydra.Cardano.Api (
98
BlockNo,
@@ -13,7 +12,6 @@ import Hydra.Cardano.Api (
1312
Tx,
1413
UTxO,
1514
)
16-
import Hydra.Cardano.Api.Gen ()
1715
import Hydra.Cardano.Api.Prelude (TxId)
1816
import Hydra.Contract (HydraScriptCatalogue)
1917
import Hydra.Ledger.Cardano (adjustUTxO)
@@ -34,8 +32,6 @@ import Hydra.Tx.Observe (
3432
observeHeadTx,
3533
)
3634

37-
import Test.Hydra.Tx.Gen ()
38-
3935
type ObserverHandler m = [ChainObservation] -> m ()
4036

4137
data ChainObservation
@@ -47,10 +43,6 @@ data ChainObservation
4743
deriving stock (Eq, Show, Generic)
4844
deriving anyclass (ToJSON, FromJSON)
4945

50-
instance Arbitrary ChainObservation where
51-
arbitrary = genericArbitrary
52-
shrink = genericShrink
53-
5446
data NodeClient m = NodeClient
5547
{ follow :: Maybe ChainPoint -> ObserverHandler m -> m ()
5648
, networkId :: NetworkId

hydra-chain-observer/test/Hydra/ChainObserverSpec.hs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
{-# OPTIONS_GHC -Wno-orphans #-}
2+
13
module Hydra.ChainObserverSpec where
24

35
import Hydra.Prelude
@@ -20,6 +22,10 @@ import Test.Hydra.Tx.Fixture (testNetworkId)
2022
import Test.QuickCheck (counterexample, forAll, forAllBlind, property, (=/=), (===))
2123
import Test.QuickCheck.Property (checkCoverage)
2224

25+
instance Arbitrary ChainObservation where
26+
arbitrary = genericArbitrary
27+
shrink = genericShrink
28+
2329
spec :: Spec
2430
spec =
2531
parallel $ do

0 commit comments

Comments
 (0)