File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
cardano-testnet/src/Testnet Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ module Testnet.Components.Configuration
14
14
, getByronGenesisHash
15
15
, getShelleyGenesisHash
16
16
17
- , NumPools
17
+ , NumPools ( .. )
18
18
, numPools
19
19
, NumDReps
20
20
, numDReps
Original file line number Diff line number Diff line change @@ -312,7 +312,11 @@ data ExecutableError
312
312
= CannotDecodePlanJSON FilePath String
313
313
| RetrievePlanJsonFailure IOException
314
314
| ReadFileFailure IOException
315
- | MissingExecutable FilePath String
315
+ | ExecutableMissingInComponent FilePath String
316
+ -- ^ Component with key @component-name@ is found, but it is missing
317
+ -- the @bin-file@ key.
318
+ | ExecutableNotFoundInPlan String
319
+ -- ^ Component with key @component-name@ cannot be found
316
320
deriving Show
317
321
318
322
@@ -333,8 +337,8 @@ binDist pkg = do
333
337
Right plan -> case List. filter matching (plan & installPlan) of
334
338
(component: _) -> case component & binFile of
335
339
Just bin -> return $ addExeSuffix (Text. unpack bin)
336
- Nothing -> left $ MissingExecutable pJsonFp $ " missing bin-file in : " <> show component
337
- [] -> error $ " Cannot find exe:" <> pkg <> " in plan "
340
+ Nothing -> left $ ExecutableMissingInComponent pJsonFp $ " missing \" bin-file\" key in plan component : " <> show component
341
+ [] -> left $ ExecutableNotFoundInPlan $ " Cannot find \" component-name \" key with value \" exe:" <> pkg <> " \" "
338
342
Left message -> left $ CannotDecodePlanJSON pJsonFp $ " Cannot decode plan: " <> message
339
343
where matching :: Component -> Bool
340
344
matching component = case componentName component of
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ import Data.Type.Equality
40
40
import Data.Word (Word8 )
41
41
import GHC.Stack as GHC
42
42
43
+ import Testnet.Components.Configuration (NumPools (.. ), numPools )
43
44
import Testnet.Process.Run
44
45
import Testnet.Start.Types
45
46
@@ -87,7 +88,7 @@ assertExpectedSposInLedgerState
87
88
-> ExecConfig
88
89
-> m ()
89
90
assertExpectedSposInLedgerState output tNetOptions execConfig = withFrozenCallStack $ do
90
- let numExpectedPools = length $ cardanoNodes tNetOptions
91
+ let NumPools numExpectedPools = numPools tNetOptions
91
92
92
93
void $ execCli' execConfig
93
94
[ " query" , " stake-pools"
You can’t perform that action at this time.
0 commit comments