Skip to content

Commit

Permalink
Adapt tests
Browse files Browse the repository at this point in the history
  • Loading branch information
smelc committed Dec 13, 2023
1 parent 279eda4 commit b503e57
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ hprop_golden_create_testnet_data =
, "--out-dir", outputDir
, "--testnet-magic", "42"
, "--pools", "2"
, "--stake-delegators", "4"
]

generated <- liftIO $ tree outputDir
Expand All @@ -52,3 +53,24 @@ hprop_golden_create_testnet_data =
void $ H.note generated''

H.diffVsGoldenFile generated'' "test/cardano-cli-golden/files/golden/conway/create-testnet-data.out"

hprop_golden_create_testnet_data_transient_stake_delegators :: Property
hprop_golden_create_testnet_data_transient_stake_delegators =
propertyOnce $ moduleWorkspace "tmp" $ \tempDir -> do

let outputDir = tempDir </> "out"

void $
execCardanoCLI
["conway", "genesis", "create-testnet-data"
, "--genesis-keys", "2"
, "--utxo-keys", "3"
, "--out-dir", outputDir
, "--testnet-magic", "42"
, "--pools", "2"
, "--stake-delegators", "4"
]

-- We just test that the command doesn't crash when we execute a different path.
-- For the golden part of this test, we are anyway covered by 'hprop_golden_create_testnet_data'
-- that generates strictly more stuff.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,22 @@ pools-keys/pool2/staking-reward.skey
pools-keys/pool2/staking-reward.vkey
pools-keys/pool2/vrf.skey
pools-keys/pool2/vrf.vkey
stake-delegators/delegator1/payment.skey
stake-delegators/delegator1/payment.vkey
stake-delegators/delegator1/staking.skey
stake-delegators/delegator1/staking.vkey
stake-delegators/delegator2/payment.skey
stake-delegators/delegator2/payment.vkey
stake-delegators/delegator2/staking.skey
stake-delegators/delegator2/staking.vkey
stake-delegators/delegator3/payment.skey
stake-delegators/delegator3/payment.vkey
stake-delegators/delegator3/staking.skey
stake-delegators/delegator3/staking.vkey
stake-delegators/delegator4/payment.skey
stake-delegators/delegator4/payment.vkey
stake-delegators/delegator4/staking.skey
stake-delegators/delegator4/staking.vkey
utxo-keys/README.md
utxo-keys/utxo1/utxo.skey
utxo-keys/utxo1/utxo.vkey
Expand Down

0 comments on commit b503e57

Please sign in to comment.