-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #163 from input-output-hk/mgalazyn/feature/drep-ke…
…y-gen #128 DRep key generation
- Loading branch information
Showing
14 changed files
with
122 additions
and
3 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
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
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
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
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
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
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
30 changes: 30 additions & 0 deletions
30
cardano-cli/test/cardano-cli-golden/Test/Golden/Governance/DRep.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,30 @@ | ||
{- HLINT ignore "Use camelCase" -} | ||
|
||
module Test.Golden.Governance.DRep where | ||
|
||
import Control.Monad (void) | ||
|
||
import Test.Cardano.CLI.Util | ||
|
||
import Hedgehog (Property) | ||
import qualified Hedgehog.Extras.Test.Base as H | ||
import qualified Hedgehog.Extras.Test.File as H | ||
|
||
hprop_golden_governanceDRepKeyGen :: Property | ||
hprop_golden_governanceDRepKeyGen = | ||
propertyOnce . H.moduleWorkspace "tmp" $ \tempDir -> do | ||
verificationKeyFile <- noteTempFile tempDir "key-gen.vkey" | ||
signingKeyFile <- noteTempFile tempDir "key-gen.skey" | ||
|
||
void $ execCardanoCLI | ||
[ "conway", "governance", "drep", "key-gen" | ||
, "--verification-key-file", verificationKeyFile | ||
, "--signing-key-file", signingKeyFile | ||
] | ||
|
||
H.assertFileOccurences 1 "DRepVerificationKey_ed25519" verificationKeyFile | ||
H.assertFileOccurences 1 "DRepSigningKey_ed25519" signingKeyFile | ||
|
||
H.assertFileOccurences 1 "Delegate Representative Verification Key" verificationKeyFile | ||
H.assertFileOccurences 1 "Delegate Representative Signing Key" signingKeyFile | ||
|
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
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
10 changes: 10 additions & 0 deletions
10
cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_drep_key-gen.cli
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,10 @@ | ||
Usage: cardano-cli conway governance drep key-gen --verification-key-file FILE | ||
--signing-key-file FILE | ||
|
||
Generate Delegate Representative verification and signing keys. | ||
|
||
Available options: | ||
--verification-key-file FILE | ||
Output filepath of the verification key. | ||
--signing-key-file FILE Output filepath of the signing key. | ||
-h,--help Show this help text |
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
10 changes: 10 additions & 0 deletions
10
...no-cli/test/cardano-cli-golden/files/golden/help/experimental_governance_drep_key-gen.cli
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,10 @@ | ||
Usage: cardano-cli experimental governance drep key-gen --verification-key-file FILE | ||
--signing-key-file FILE | ||
|
||
Generate Delegate Representative verification and signing keys. | ||
|
||
Available options: | ||
--verification-key-file FILE | ||
Output filepath of the verification key. | ||
--signing-key-file FILE Output filepath of the signing key. | ||
-h,--help Show this help text |