Skip to content

Commit

Permalink
cardano-testnet-test: adapt to previous change, remove useless custom…
Browse files Browse the repository at this point in the history
…izations
  • Loading branch information
smelc committed Sep 4, 2024
1 parent 73d48ab commit 47cc7cc
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,9 @@ hprop_leadershipSchedule = integrationRetryWorkspace 2 "babbage-leadership-sched
H.note_ SYS.os
conf@Conf { tempAbsPath=tempAbsPath@(TmpAbsolutePath work) } <- mkConf tempAbsBasePath'
let tempBaseAbsPath = makeTmpBaseAbsPath tempAbsPath

let sbe = shelleyBasedEra @BabbageEra
sbe = shelleyBasedEra @BabbageEra
cTestnetOptions = cardanoDefaultTestnetOptions
{ cardanoNodes = cardanoDefaultTestnetNodeOptions
, cardanoNodeEra = AnyShelleyBasedEra sbe -- TODO: We should only support the latest era and the upcoming era
, cardanoActiveSlotsCoeff = 0.1
{ cardanoNodeEra = AnyShelleyBasedEra sbe -- TODO: We should only support the latest era and the upcoming era
}

tr@TestnetRuntime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,13 @@ hprop_stakeSnapshot = integrationRetryWorkspace 2 "babbage-stake-snapshot" $ \te
H.note_ SYS.os
conf@Conf { tempAbsPath } <- mkConf tempAbsBasePath'
let tempAbsPath' = unTmpAbsPath tempAbsPath

let
tempBaseAbsPath = makeTmpBaseAbsPath $ TmpAbsolutePath tempAbsPath'
sbe = ShelleyBasedEraBabbage
options = cardanoDefaultTestnetOptions
{ cardanoNodes = cardanoDefaultTestnetNodeOptions
, cardanoSlotLength = 0.1
, cardanoNodeEra = AnyShelleyBasedEra sbe -- TODO: We should only support the latest era and the upcoming era
}
tempBaseAbsPath = makeTmpBaseAbsPath $ TmpAbsolutePath tempAbsPath'

TestnetRuntime
{ testnetMagic
, poolNodes
, configurationFile
} <- cardanoTestnetDefault options conf
} <- cardanoTestnetDefault cardanoDefaultTestnetOptions conf

poolNode1 <- H.headM poolNodes
poolSprocket1 <- H.noteShow $ nodeSprocket $ poolRuntime poolNode1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,13 @@ hprop_stakeSnapshot = integrationRetryWorkspace 2 "conway-stake-snapshot" $ \tem
H.note_ SYS.os
conf@Conf { tempAbsPath } <- mkConf tempAbsBasePath'
let tempAbsPath' = unTmpAbsPath tempAbsPath

let
tempBaseAbsPath = makeTmpBaseAbsPath $ TmpAbsolutePath tempAbsPath'
sbe = ShelleyBasedEraBabbage
options = cardanoDefaultTestnetOptions
{ cardanoNodes = cardanoDefaultTestnetNodeOptions
, cardanoNodeEra = AnyShelleyBasedEra sbe -- TODO: We should only support the latest era and the upcoming era
}
tempBaseAbsPath = makeTmpBaseAbsPath $ TmpAbsolutePath tempAbsPath'

TestnetRuntime
{ testnetMagic
, poolNodes
, configurationFile
} <- cardanoTestnetDefault options conf
} <- cardanoTestnetDefault cardanoDefaultTestnetOptions conf

poolNode1 <- H.headM poolNodes
poolSprocket1 <- H.noteShow $ nodeSprocket $ poolRuntime poolNode1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ hprop_kes_period_info = integrationRetryWorkspace 2 "kes-period-info" $ \tempAbs
sbe = ShelleyBasedEraBabbage
eraString = eraToString sbe
cTestnetOptions = cardanoDefaultTestnetOptions
{ cardanoNodes = cardanoDefaultTestnetNodeOptions
, cardanoNodeEra = AnyShelleyBasedEra sbe -- TODO: We should only support the latest era and the upcoming era
, cardanoActiveSlotsCoeff = 0.1
{ cardanoNodeEra = AnyShelleyBasedEra sbe -- TODO: We should only support the latest era and the upcoming era
}

runTime@TestnetRuntime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ module Cardano.Testnet.Test.Cli.QuerySlotNumber
( hprop_querySlotNumber
) where

import Cardano.Api

import Cardano.Ledger.Shelley.Genesis (fromNominalDiffTimeMicro)
import Cardano.Slotting.Slot
import Cardano.Testnet
Expand Down Expand Up @@ -42,17 +40,11 @@ hprop_querySlotNumber = integrationRetryWorkspace 2 "query-slot-number" $ \tempA
conf <- mkConf tempAbsBasePath'

let tempBaseAbsPath' = makeTmpBaseAbsPath $ tempAbsPath conf
sbe = ShelleyBasedEraBabbage
options = cardanoDefaultTestnetOptions
{ cardanoNodes = cardanoDefaultTestnetNodeOptions
, cardanoSlotLength = 0.1
, cardanoNodeEra = AnyShelleyBasedEra sbe -- TODO: We should only support the latest era and the upcoming era
}

tr@TestnetRuntime
{ testnetMagic
, poolNodes
} <- cardanoTestnetDefault options conf
} <- cardanoTestnetDefault cardanoDefaultTestnetOptions conf
ShelleyGenesis{sgSlotLength, sgEpochLength} <- H.noteShowM $ shelleyGenesis tr
startTime <- H.noteShowM $ getStartTime tempAbsBasePath' tr

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,13 @@ hprop_transaction = integrationRetryWorkspace 0 "submit-api-babbage-transaction"
H.note_ SYS.os
conf@Conf { tempAbsPath } <- mkConf tempAbsBasePath'
let tempAbsPath' = unTmpAbsPath tempAbsPath
work <- H.createDirectoryIfMissing $ tempAbsPath' </> "work"
sbe = ShelleyBasedEraBabbage
tempBaseAbsPath = makeTmpBaseAbsPath $ TmpAbsolutePath tempAbsPath'
options = cardanoDefaultTestnetOptions
{ cardanoNodeEra = AnyShelleyBasedEra sbe -- TODO: We should only support the latest era and the upcoming era
}

let
sbe = ShelleyBasedEraBabbage
tempBaseAbsPath = makeTmpBaseAbsPath $ TmpAbsolutePath tempAbsPath'
options = cardanoDefaultTestnetOptions
{ cardanoNodes = cardanoDefaultTestnetNodeOptions
, cardanoSlotLength = 0.1
, cardanoNodeEra = AnyShelleyBasedEra sbe -- TODO: We should only support the latest era and the upcoming era
}
work <- H.createDirectoryIfMissing $ tempAbsPath' </> "work"

TestnetRuntime
{ configurationFile
Expand Down

0 comments on commit 47cc7cc

Please sign in to comment.