Skip to content

Commit

Permalink
Make all tests green
Browse files Browse the repository at this point in the history
  • Loading branch information
v0d1ch committed Sep 23, 2024
1 parent b3d67fa commit 0acc645
Show file tree
Hide file tree
Showing 22 changed files with 2,479 additions and 152 deletions.
2 changes: 1 addition & 1 deletion hydra-cluster/hydra-cluster.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ library
, aeson
, async
, base >=4.7 && <5
, bytestring
, base16-bytestring
, bytestring
, cardano-slotting
, containers
, contra-tracer
Expand Down
5 changes: 4 additions & 1 deletion hydra-cluster/src/Hydra/Cluster/Scenarios.hs
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,9 @@ canRecoverDeposit tracer workDir node hydraScriptsTxId =
guard $ v ^? key "tag" == Just "CommitRecorded"
pure ()

(selectLovelace . balance <$> queryUTxOFor networkId nodeSocket QueryTip walletVk)
`shouldReturn` 0

ChainPoint slotNo _ <- queryTip networkId nodeSocket
let recoverRequest =
object
Expand All @@ -716,7 +719,7 @@ canRecoverDeposit tracer workDir node hydraScriptsTxId =
>>= httpJSON

waitForAllMatch 20 [n1] $ \v -> do
guard $ v ^? key "tag" == Just "RecoverFinalized"
guard $ v ^? key "tag" == Just "CommitRecovered"
pure ()

(balance <$> queryUTxOFor networkId nodeSocket QueryTip walletVk)
Expand Down
4 changes: 2 additions & 2 deletions hydra-cluster/src/HydraNode.hs
Original file line number Diff line number Diff line change
Expand Up @@ -380,14 +380,14 @@ withHydraNode' tracer chainConfig workDir hydraNodeId hydraSKey hydraVKeys allNo
}
)
{ std_out = maybe CreatePipe UseHandle mGivenStdOut
, std_err = Inherit
, std_err = CreatePipe
}

traceWith tracer $ HydraNodeCommandSpec $ show $ cmdspec p

withCreateProcess p $ \_stdin mCreatedStdOut mCreatedStdErr processHandle ->
case (mCreatedStdOut <|> mGivenStdOut, mCreatedStdErr) of
(Just out, Nothing) -> action out stderr processHandle
(Just out, Just err) -> action out err processHandle
(Nothing, _) -> error "Should not happen™"
(_, Nothing) -> error "Should not happen™"
where
Expand Down
2 changes: 1 addition & 1 deletion hydra-cluster/test/Test/EndToEndSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ import Hydra.Cluster.Scenarios (
EndToEndLog (..),
canCloseWithLongContestationPeriod,
canCommit,
canRecoverDeposit,
canDecommit,
canRecoverDeposit,
canSubmitTransactionThroughAPI,
headIsInitializingWith,
initWithWrongKeys,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,56 +1,7 @@
{
"samples": [
{
"recoverDeadline": -4,
"recoverHeadId": "01080305010400080404060501050702",
"recoverStart": 0,
"recoverUTxO": {
"0000030601010003080307050307060603020101080603010203040706050705#23": {
"address": "addr_test1zr30qjnnzsj25qj5mnv5vqsy5jx8xx5zw73257vt8v3te7gu9t3jdgw4l7k9etqqy0c9uedjnjlewjxx6j8k2ju6wxtq0vnj63",
"datum": null,
"datumhash": "517149add56d8056965a5f1e890a04c115a7d10d4c3583818356125a28d9e02b",
"inlineDatum": null,
"referenceScript": null,
"value": {
"2db8410d969b6ad6b6969703c77ebf6c44061aa51c5d6ceba46557e2": {
"80f0d6": 1
},
"lovelace": 1807725733820881937
}
},
"0005070404060202040204060703060504020801080006050600010106070303#62": {
"address": "addr1y9uzvy8u7gj2cd062qq23jexc7dmwxey94374pjkkkfr93azxccjmsxect2dy6mdmway3gx5m4h2kkekja9qwc20wfpqjkn6nn",
"datum": null,
"datumhash": null,
"inlineDatum": null,
"referenceScript": null,
"value": {
"8600a7febd45652c1a2e9930569eb0463733a845d705476d1a8fa5ff": {
"39": 1
},
"lovelace": 815794582948710859
}
},
"0305060502030501020005000402080505020005000201030100070702010005#73": {
"address": "addr1wxgqrdmcsh6ss68rn993q6sugpu8rtfatfvsexwwwy52k0srquu59",
"datum": null,
"datumhash": null,
"inlineDatum": null,
"referenceScript": {
"script": {
"cborHex": "8200581cb2aeae6028d1c39e7a1309d612427267cfe731352aa9036027fccc16",
"description": "",
"type": "SimpleScript"
},
"scriptLanguage": "SimpleScriptLanguage"
},
"value": {
"6db635dcef600b0ab43e4592baa30872c7c650578df14e02d0e1a182": {
"37": 1
}
}
}
}
"recoverStart": 0
},
{
"blueprintTx": {
Expand Down
Loading

0 comments on commit 0acc645

Please sign in to comment.