Skip to content

Commit 182e6cb

Browse files
authored
Fix the check on invalid decommit (#2213)
Before we were sending the invalid decommit to both the websocket and the HTTP endpoint, but only checking the failure in the case of it going to the websocket. Let's not worry about over-doing the test here; just send to the websocket and assume that the /decommit endpoint will just work the same (we tested it above anyway, for the valid decommit). Fixes #2212
2 parents 26ea404 + 62be0d3 commit 182e6cb

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

hydra-cluster/src/Hydra/Cluster/Scenarios.hs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,12 +1683,10 @@ canDecommit tracer workDir backend hydraScriptsTxId =
16831683
expectFailureOnUnsignedDecommitTx :: HydraClient -> HeadId -> Tx -> IO ()
16841684
expectFailureOnUnsignedDecommitTx n headId decommitTx = do
16851685
let unsignedDecommitTx = makeSignedTransaction [] $ getTxBody decommitTx
1686-
join . generate $
1687-
elements
1688-
[ send n $ input "Decommit" ["decommitTx" .= unsignedDecommitTx]
1689-
, postDecommit n unsignedDecommitTx
1690-
]
1691-
1686+
-- Note: Just send to websocket, as that's how the following code checks
1687+
-- that it failed. We could do the same for the HTTP endpoint, but doesn't
1688+
-- quite seem worth the effort.
1689+
send n $ input "Decommit" ["decommitTx" .= unsignedDecommitTx]
16921690
validationError <- waitMatch 10 n $ \v -> do
16931691
guard $ v ^? key "headId" == Just (toJSON headId)
16941692
guard $ v ^? key "tag" == Just (Aeson.String "DecommitInvalid")

0 commit comments

Comments
 (0)