Skip to content

Commit

Permalink
fix: restore Testnet tests
Browse files Browse the repository at this point in the history
They were removed in some previous commit.
  • Loading branch information
marcusbfs committed Feb 26, 2025
1 parent 1b59842 commit 29e75ad
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion test/Testnet.purs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ module Test.Ctl.Testnet

import Prelude

import Contract.Test.Testnet (defaultTestnetConfig, testTestnetContracts)
import Contract.Test (noWallet)
import Contract.Test.Testnet
( defaultTestnetConfig
, runTestnetTestPlan
, testTestnetContracts
)
import Contract.Test.Utils (exitCode, interruptOnSignal)
import Ctl.Internal.Contract.Monad (wrapQueryM)
import Data.Maybe (Maybe(Just))
import Data.Posix.Signal (Signal(SIGINT))
import Effect (Effect)
Expand All @@ -16,8 +22,19 @@ import Effect.Aff
, launchAff
)
import Mote (group)
import Mote.Monad (mapTest)
import Mote.TestPlanM as Utils
import Test.Ctl.BalanceTx.ChangeGeneration as ChangeGeneration
import Test.Ctl.QueryM.AffInterface as QueryM.AffInterface
import Test.Ctl.Testnet.Contract as Contract
import Test.Ctl.Testnet.Contract.Assert as Assert
import Test.Ctl.Testnet.Contract.Mnemonics as Mnemonics
import Test.Ctl.Testnet.Contract.OgmiosMempool as OgmiosMempool
import Test.Ctl.Testnet.ExUnits as ExUnits
import Test.Ctl.Testnet.Gov as Gov
import Test.Ctl.Testnet.Logging as Logging
import Test.Ctl.Testnet.SameWallets as SameWallets
import Test.Ctl.Testnet.UtxoDistribution as UtxoDistribution
import Test.Spec.Runner (defaultConfig)

-- Run with `npm run testnet-test`
Expand All @@ -28,8 +45,25 @@ main = interruptOnSignal SIGINT =<< launchAff do
Utils.interpretWithConfig
defaultConfig { timeout = Just $ Milliseconds 70_000.0, exit = true }
$ group "cardano-testnet" do
testTestnetContracts config Mnemonics.suite
group "ExUnits - normal limits" do
testTestnetContracts config $ ExUnits.mkFailingSuite 8000
testTestnetContracts config $ ExUnits.mkSuite 2550
-- FIXME: group "ExUnits - relaxed limits" do
-- testTestnetContracts configWithMaxExUnits $ ExUnits.mkSuite 3000
testTestnetContracts config Assert.suite
Logging.suite
-- FIXME: testStartPlutipCluster
testTestnetContracts config $ do
flip mapTest QueryM.AffInterface.suite
(noWallet <<< wrapQueryM)
ChangeGeneration.suite
Contract.suite
Gov.suite
UtxoDistribution.suite
testTestnetContracts config OgmiosMempool.suite
-- FIXME: ClusterParameters.runTest
runTestnetTestPlan config SameWallets.suite

{-
configWithMaxExUnits :: PlutipConfig
Expand Down

0 comments on commit 29e75ad

Please sign in to comment.