Skip to content

Commit d113bdc

Browse files
authored
Merge pull request #5962 from IntersectMBO/smelc/cardano-testnet-remove-unused-option
cardano-testnet-test: small improvements
2 parents b8f38f5 + 47cc7cc commit d113bdc

File tree

6 files changed

+18
-51
lines changed

6 files changed

+18
-51
lines changed

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/LeadershipSchedule.hs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,9 @@ hprop_leadershipSchedule = integrationRetryWorkspace 2 "babbage-leadership-sched
5959
H.note_ SYS.os
6060
conf@Conf { tempAbsPath=tempAbsPath@(TmpAbsolutePath work) } <- mkConf tempAbsBasePath'
6161
let tempBaseAbsPath = makeTmpBaseAbsPath tempAbsPath
62-
63-
let sbe = shelleyBasedEra @BabbageEra
62+
sbe = shelleyBasedEra @BabbageEra
6463
cTestnetOptions = cardanoDefaultTestnetOptions
65-
{ cardanoNodes = cardanoDefaultTestnetNodeOptions
66-
, cardanoNodeEra = AnyShelleyBasedEra sbe -- TODO: We should only support the latest era and the upcoming era
67-
, cardanoActiveSlotsCoeff = 0.1
64+
{ cardanoNodeEra = AnyShelleyBasedEra sbe -- TODO: We should only support the latest era and the upcoming era
6865
}
6966

7067
tr@TestnetRuntime

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Babbage/StakeSnapshot.hs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,13 @@ hprop_stakeSnapshot = integrationRetryWorkspace 2 "babbage-stake-snapshot" $ \te
3434
H.note_ SYS.os
3535
conf@Conf { tempAbsPath } <- mkConf tempAbsBasePath'
3636
let tempAbsPath' = unTmpAbsPath tempAbsPath
37-
38-
let
39-
tempBaseAbsPath = makeTmpBaseAbsPath $ TmpAbsolutePath tempAbsPath'
40-
sbe = ShelleyBasedEraBabbage
41-
options = cardanoDefaultTestnetOptions
42-
{ cardanoNodes = cardanoDefaultTestnetNodeOptions
43-
, cardanoSlotLength = 0.1
44-
, cardanoNodeEra = AnyShelleyBasedEra sbe -- TODO: We should only support the latest era and the upcoming era
45-
}
37+
tempBaseAbsPath = makeTmpBaseAbsPath $ TmpAbsolutePath tempAbsPath'
4638

4739
TestnetRuntime
4840
{ testnetMagic
4941
, poolNodes
5042
, configurationFile
51-
} <- cardanoTestnetDefault options conf
43+
} <- cardanoTestnetDefault cardanoDefaultTestnetOptions conf
5244

5345
poolNode1 <- H.headM poolNodes
5446
poolSprocket1 <- H.noteShow $ nodeSprocket $ poolRuntime poolNode1

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Conway/StakeSnapshot.hs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,13 @@ hprop_stakeSnapshot = integrationRetryWorkspace 2 "conway-stake-snapshot" $ \tem
3333
H.note_ SYS.os
3434
conf@Conf { tempAbsPath } <- mkConf tempAbsBasePath'
3535
let tempAbsPath' = unTmpAbsPath tempAbsPath
36-
37-
let
38-
tempBaseAbsPath = makeTmpBaseAbsPath $ TmpAbsolutePath tempAbsPath'
39-
sbe = ShelleyBasedEraBabbage
40-
options = cardanoDefaultTestnetOptions
41-
{ cardanoNodes = cardanoDefaultTestnetNodeOptions
42-
, cardanoNodeEra = AnyShelleyBasedEra sbe -- TODO: We should only support the latest era and the upcoming era
43-
}
36+
tempBaseAbsPath = makeTmpBaseAbsPath $ TmpAbsolutePath tempAbsPath'
4437

4538
TestnetRuntime
4639
{ testnetMagic
4740
, poolNodes
4841
, configurationFile
49-
} <- cardanoTestnetDefault options conf
42+
} <- cardanoTestnetDefault cardanoDefaultTestnetOptions conf
5043

5144
poolNode1 <- H.headM poolNodes
5245
poolSprocket1 <- H.noteShow $ nodeSprocket $ poolRuntime poolNode1

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/KesPeriodInfo.hs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,9 @@ hprop_kes_period_info = integrationRetryWorkspace 2 "kes-period-info" $ \tempAbs
5757

5858
let tempBaseAbsPath = makeTmpBaseAbsPath tempAbsPath
5959
sbe = ShelleyBasedEraBabbage
60-
era = toCardanoEra sbe
61-
anyEra = AnyCardanoEra era
60+
eraString = eraToString sbe
6261
cTestnetOptions = cardanoDefaultTestnetOptions
63-
{ cardanoNodes = cardanoDefaultTestnetNodeOptions
64-
, cardanoNodeEra = AnyShelleyBasedEra sbe -- TODO: We should only support the latest era and the upcoming era
65-
, cardanoActiveSlotsCoeff = 0.1
62+
{ cardanoNodeEra = AnyShelleyBasedEra sbe -- TODO: We should only support the latest era and the upcoming era
6663
}
6764

6865
runTime@TestnetRuntime
@@ -78,7 +75,7 @@ hprop_kes_period_info = integrationRetryWorkspace 2 "kes-period-info" $ \tempAbs
7875
let utxoAddr = Text.unpack $ paymentKeyInfoAddr wallet0
7976
utxoSKeyFile = signingKeyFp $ paymentKeyInfoPair wallet0
8077
void $ execCli' execConfig
81-
[ anyEraToString anyEra, "query", "utxo"
78+
[ eraString, "query", "utxo"
8279
, "--address", utxoAddr
8380
, "--cardano-mode"
8481
, "--out-file", work </> "utxo-1.json"
@@ -153,7 +150,7 @@ hprop_kes_period_info = integrationRetryWorkspace 2 "kes-period-info" $ \tempAbs
153150
H.note_ "Get updated UTxO"
154151

155152
void $ execCli' execConfig
156-
[ anyEraToString anyEra, "query", "utxo"
153+
[ eraString, "query", "utxo"
157154
, "--address", utxoAddr
158155
, "--cardano-mode"
159156
, "--out-file", work </> "utxo-2.json"
@@ -165,8 +162,7 @@ hprop_kes_period_info = integrationRetryWorkspace 2 "kes-period-info" $ \tempAbs
165162
UTxO utxo2 <- H.noteShowM $ decodeEraUTxO sbe utxo2Json
166163
txin2 <- H.noteShow =<< H.headM (Map.keys utxo2)
167164

168-
let eraString = eraToString sbe
169-
delegRegTestDelegatorTxBodyFp = work </> "deleg-register-test-delegator.txbody"
165+
let delegRegTestDelegatorTxBodyFp = work </> "deleg-register-test-delegator.txbody"
170166

171167
void $ execCli' execConfig
172168
[ eraString

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/QuerySlotNumber.hs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ module Cardano.Testnet.Test.Cli.QuerySlotNumber
1212
( hprop_querySlotNumber
1313
) where
1414

15-
import Cardano.Api
16-
1715
import Cardano.Ledger.Shelley.Genesis (fromNominalDiffTimeMicro)
1816
import Cardano.Slotting.Slot
1917
import Cardano.Testnet
@@ -42,17 +40,11 @@ hprop_querySlotNumber = integrationRetryWorkspace 2 "query-slot-number" $ \tempA
4240
conf <- mkConf tempAbsBasePath'
4341

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

5244
tr@TestnetRuntime
5345
{ testnetMagic
5446
, poolNodes
55-
} <- cardanoTestnetDefault options conf
47+
} <- cardanoTestnetDefault cardanoDefaultTestnetOptions conf
5648
ShelleyGenesis{sgSlotLength, sgEpochLength} <- H.noteShowM $ shelleyGenesis tr
5749
startTime <- H.noteShowM $ getStartTime tempAbsBasePath' tr
5850

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/SubmitApi/Babbage/Transaction.hs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,13 @@ hprop_transaction = integrationRetryWorkspace 0 "submit-api-babbage-transaction"
5252
H.note_ SYS.os
5353
conf@Conf { tempAbsPath } <- mkConf tempAbsBasePath'
5454
let tempAbsPath' = unTmpAbsPath tempAbsPath
55-
work <- H.createDirectoryIfMissing $ tempAbsPath' </> "work"
55+
sbe = ShelleyBasedEraBabbage
56+
tempBaseAbsPath = makeTmpBaseAbsPath $ TmpAbsolutePath tempAbsPath'
57+
options = cardanoDefaultTestnetOptions
58+
{ cardanoNodeEra = AnyShelleyBasedEra sbe -- TODO: We should only support the latest era and the upcoming era
59+
}
5660

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

6663
TestnetRuntime
6764
{ configurationFile

0 commit comments

Comments
 (0)