From 47cc7cc5fdc8a80989eb1bbe1fc609dfcdccfb7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Hurlin?= Date: Wed, 28 Aug 2024 11:02:24 +0200 Subject: [PATCH] cardano-testnet-test: adapt to previous change, remove useless customizations --- .../Test/Cli/Babbage/LeadershipSchedule.hs | 7 ++----- .../Testnet/Test/Cli/Babbage/StakeSnapshot.hs | 12 ++---------- .../Testnet/Test/Cli/Conway/StakeSnapshot.hs | 11 ++--------- .../Cardano/Testnet/Test/Cli/KesPeriodInfo.hs | 4 +--- .../Cardano/Testnet/Test/Cli/QuerySlotNumber.hs | 10 +--------- .../Testnet/Test/SubmitApi/Babbage/Transaction.hs | 15 ++++++--------- 6 files changed, 14 insertions(+), 45 deletions(-) diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/LeadershipSchedule.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/LeadershipSchedule.hs index 98c390d4fa0..cd3e8b6209c 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/LeadershipSchedule.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/LeadershipSchedule.hs @@ -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 diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/StakeSnapshot.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/StakeSnapshot.hs index 517f1d45b1e..7dfd0273842 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/StakeSnapshot.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/StakeSnapshot.hs @@ -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 diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Conway/StakeSnapshot.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Conway/StakeSnapshot.hs index 1ea3266e9fb..ffd28a6f02c 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Conway/StakeSnapshot.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Conway/StakeSnapshot.hs @@ -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 diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/KesPeriodInfo.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/KesPeriodInfo.hs index 0e115df7e54..00b32ee2837 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/KesPeriodInfo.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/KesPeriodInfo.hs @@ -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 diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/QuerySlotNumber.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/QuerySlotNumber.hs index 95ac54d5c58..25257229c1a 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/QuerySlotNumber.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/QuerySlotNumber.hs @@ -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 @@ -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 diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/SubmitApi/Babbage/Transaction.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/SubmitApi/Babbage/Transaction.hs index 924d76c3805..fc6c6c93788 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/SubmitApi/Babbage/Transaction.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/SubmitApi/Babbage/Transaction.hs @@ -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