-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create-testnet-data: test minimal example
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 deletions.
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
29 changes: 29 additions & 0 deletions
29
cardano-cli/test/cardano-cli-test/Test/Cli/CreateTestnetData.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,29 @@ | ||
module Test.Cli.CreateTestnetData where | ||
|
||
|
||
|
||
import System.FilePath | ||
|
||
import Test.Cardano.CLI.Util (execCardanoCLI) | ||
|
||
import Hedgehog (Property) | ||
import Hedgehog.Extras (moduleWorkspace, propertyOnce) | ||
import qualified Hedgehog.Extras as H | ||
|
||
-- | Test case for https://github.com/IntersectMBO/cardano-cli/issues/587 | ||
-- Execute this test with: | ||
-- @cabal test cardano-cli-test --test-options '-p "/create testnet data minimal/"'@ | ||
hprop_create_testnet_data_minimal :: Property | ||
hprop_create_testnet_data_minimal = | ||
propertyOnce $ moduleWorkspace "tmp" $ \tempDir -> do | ||
|
||
let outputDir = tempDir </> "out" | ||
|
||
H.noteM_ $ execCardanoCLI | ||
["conway", "genesis", "create-testnet-data" | ||
, "--testnet-magic", "42" | ||
, "--out-dir", outputDir | ||
] | ||
|
||
-- We test that the command doesn't crash, because otherwise | ||
-- execCardanoCLI would fail. |