-
Notifications
You must be signed in to change notification settings - Fork 721
/
KeyGen.hs
28 lines (21 loc) · 887 Bytes
/
KeyGen.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{-# LANGUAGE OverloadedStrings #-}
module Test.Golden.Shelley.StakeAddress.KeyGen
( golden_shelleyStakeAddressKeyGen
) where
import Hedgehog (Property)
import Test.OptParse
import Control.Monad (void)
import qualified Hedgehog.Extras.Test.Base as H
import qualified Hedgehog.Extras.Test.File as H
{- HLINT ignore "Use camelCase" -}
golden_shelleyStakeAddressKeyGen :: Property
golden_shelleyStakeAddressKeyGen = propertyOnce . H.moduleWorkspace "tmp" $ \tempDir -> do
verificationKeyFile <- noteTempFile tempDir "kes.vkey"
signingKeyFile <- noteTempFile tempDir "kes.skey"
void $ execCardanoCLI
[ "stake-address","key-gen"
, "--verification-key-file", verificationKeyFile
, "--signing-key-file", signingKeyFile
]
H.assertFileOccurences 1 "stake_vk" verificationKeyFile
H.assertFileOccurences 1 "stake_sk" signingKeyFile