Skip to content

Commit

Permalink
create-testnet-data: extend an existing golden test to use --committe…
Browse files Browse the repository at this point in the history
…e-keys
  • Loading branch information
smelc committed Nov 5, 2024
1 parent e455813 commit b6f391b
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ import qualified Hedgehog.Extras.Test.Golden as H
networkMagic :: Word32
networkMagic = 623

numCommitteeKeys :: Int
numCommitteeKeys = 7

numDReps :: Int
numDReps = 5

Expand Down Expand Up @@ -62,6 +65,8 @@ mkArguments outputDir =
, show numPools
, "--drep-keys"
, show numDReps
, "--committee-keys"
, show numCommitteeKeys
, -- Relays file specifies two relays, like the number of SPOs
"--relays"
, "test/cardano-cli-golden/files/input/shelley/genesis/relays.json"
Expand Down Expand Up @@ -137,6 +142,9 @@ golden_create_testnet_data mShelleyTemplate =
forM_ (L.sgsPools $ sgStaking shelleyGenesis) $ \pool ->
Seq.length (L.ppRelays pool) H.=== 1

actualNumCCs <- liftIO $ listDirectories $ outputDir </> "cc-keys"
length actualNumCCs H.=== numCommitteeKeys

actualNumDReps <- liftIO $ listDirectories $ outputDir </> "drep-keys"
length actualNumDReps H.=== numDReps

Expand All @@ -146,6 +154,8 @@ golden_create_testnet_data mShelleyTemplate =
conwayGenesis :: ConwayGenesis StandardCrypto <-
H.readJsonFileOk $ outputDir </> "conway-genesis.json"

length (L.committeeMembers $ cgCommittee conwayGenesis) H.=== numCommitteeKeys

length (cgInitialDReps conwayGenesis) H.=== numDReps

length (cgDelegs conwayGenesis) H.=== numStakeDelegs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,33 @@
alonzo-genesis.json
cc-keys/README.md
cc-keys/cc1/cc.cold.skey
cc-keys/cc1/cc.cold.vkey
cc-keys/cc1/cc.hot.skey
cc-keys/cc1/cc.hot.vkey
cc-keys/cc2/cc.cold.skey
cc-keys/cc2/cc.cold.vkey
cc-keys/cc2/cc.hot.skey
cc-keys/cc2/cc.hot.vkey
cc-keys/cc3/cc.cold.skey
cc-keys/cc3/cc.cold.vkey
cc-keys/cc3/cc.hot.skey
cc-keys/cc3/cc.hot.vkey
cc-keys/cc4/cc.cold.skey
cc-keys/cc4/cc.cold.vkey
cc-keys/cc4/cc.hot.skey
cc-keys/cc4/cc.hot.vkey
cc-keys/cc5/cc.cold.skey
cc-keys/cc5/cc.cold.vkey
cc-keys/cc5/cc.hot.skey
cc-keys/cc5/cc.hot.vkey
cc-keys/cc6/cc.cold.skey
cc-keys/cc6/cc.cold.vkey
cc-keys/cc6/cc.hot.skey
cc-keys/cc6/cc.hot.vkey
cc-keys/cc7/cc.cold.skey
cc-keys/cc7/cc.cold.vkey
cc-keys/cc7/cc.hot.skey
cc-keys/cc7/cc.hot.vkey
conway-genesis.json
delegate-keys/README.md
delegate-keys/delegate1/kes.skey
Expand Down

0 comments on commit b6f391b

Please sign in to comment.