-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add golden test: calculate-min-fee for babbage tx
- Loading branch information
1 parent
0d5f14b
commit 27981c1
Showing
4 changed files
with
417 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
cardano-cli/test/cardano-cli-golden/Test/Golden/Babbage/Transaction/CalculateMinFee.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{-# LANGUAGE OverloadedStrings #-} | ||
|
||
module Test.Golden.Babbage.Transaction.CalculateMinFee | ||
where | ||
|
||
import Test.Cardano.CLI.Util | ||
|
||
import Hedgehog (Property) | ||
import qualified Hedgehog as H | ||
|
||
{- HLINT ignore "Use camelCase" -} | ||
|
||
hprop_golden_shelley_transaction_calculate_min_fee :: Property | ||
hprop_golden_shelley_transaction_calculate_min_fee = propertyOnce $ do | ||
protocolParamsJsonFile <- noteInputFile "test/cardano-cli-golden/files/input/babbage/transaction-calculate-min-fee/protocol-params.json" | ||
txBodyFile <- noteInputFile "test/cardano-cli-golden/files/input/babbage/tx/txbody" | ||
|
||
minFeeTxt <- execCardanoCLI | ||
[ "transaction","calculate-min-fee" | ||
, "--witness-count", "1" | ||
, "--protocol-params-file", protocolParamsJsonFile | ||
, "--tx-body-file", txBodyFile | ||
] | ||
|
||
H.diff minFeeTxt (==) "165633 Lovelace\n" |
Oops, something went wrong.