diff --git a/cabal.project b/cabal.project index 755a4158311..2ae44e26103 100644 --- a/cabal.project +++ b/cabal.project @@ -1,5 +1,5 @@ -- run `nix flake lock --update-input hackageNix` after updating index-state. -index-state: 2022-05-09T00:00:00Z +index-state: 2022-05-14T00:00:00Z packages: cardano-api diff --git a/cardano-node-chairman/test/Main.hs b/cardano-node-chairman/test/Main.hs index 65c41b501d7..5ec1c17f58e 100644 --- a/cardano-node-chairman/test/Main.hs +++ b/cardano-node-chairman/test/Main.hs @@ -1,6 +1,5 @@ {-# LANGUAGE FlexibleInstances #-} - -{-# OPTIONS_GHC -Wno-deprecations #-} -- TODO Fix deprecations +{-# LANGUAGE OverloadedStrings #-} module Main ( main @@ -20,11 +19,11 @@ import qualified Spec.Network tests :: IO T.TestTree tests = do - let t0 = H.testProperty "isPortOpen False" Spec.Network.hprop_isPortOpen_False - let t1 = H.testProperty "isPortOpen True" Spec.Network.hprop_isPortOpen_True - let t2 = H.testProperty "chairman" Spec.Chairman.Byron.hprop_chairman - let t3 = H.testProperty "chairman" Spec.Chairman.Cardano.hprop_chairman - let t4 = H.testProperty "chairman" Spec.Chairman.Shelley.hprop_chairman + let t0 = H.testPropertyNamed "isPortOpen False" "isportopen-true" Spec.Network.hprop_isPortOpen_False + let t1 = H.testPropertyNamed "isPortOpen True" "isportopen-false" Spec.Network.hprop_isPortOpen_True + let t2 = H.testPropertyNamed "chairman Byron" "chairman-byron" Spec.Chairman.Byron.hprop_chairman + let t3 = H.testPropertyNamed "chairman Cardano" "chairman-cardano" Spec.Chairman.Cardano.hprop_chairman + let t4 = H.testPropertyNamed "chairman Shelley" "chairman-shell" Spec.Chairman.Shelley.hprop_chairman pure $ T.testGroup "test/Spec.hs" [ T.testGroup "Spec" diff --git a/cardano-testnet/test/Main.hs b/cardano-testnet/test/Main.hs index 185b3b944b4..62caf870568 100644 --- a/cardano-testnet/test/Main.hs +++ b/cardano-testnet/test/Main.hs @@ -1,7 +1,6 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ImportQualifiedPost #-} - -{-# OPTIONS_GHC -Wno-deprecations #-} -- TODO Fix deprecations +{-# LANGUAGE OverloadedStrings #-} module Main ( main @@ -20,11 +19,11 @@ import Test.Util qualified as H tests :: IO TestTree tests = pure $ T.testGroup "test/Spec.hs" [ T.testGroup "Spec" - [ H.ignoreOnWindows "Shutdown" Spec.Node.Shutdown.hprop_shutdown - , H.ignoreOnWindows "ShutdownOnSlotSynced" Spec.ShutdownOnSlotSynced.hprop_shutdownOnSlotSynced + [ H.ignoreOnWindows "Spec.Node.Shutdown" "Spec.Node.Shutdown" Spec.Node.Shutdown.hprop_shutdown + , H.ignoreOnWindows "Spec.ShutdownOnSlotSynced" "Spec.ShutdownOnSlotSynced" Spec.ShutdownOnSlotSynced.hprop_shutdownOnSlotSynced -- Ignored on Windows due to : commitBuffer: invalid argument (invalid character) -- as a result of the kes-period-info output to stdout. - , H.ignoreOnWindows "kes-period-info" Spec.Cli.KesPeriodInfo.hprop_kes_period_info + , H.ignoreOnWindows "Spec.Cli.KesPeriodInfo" "Spec.Cli.KesPeriodInfo" Spec.Cli.KesPeriodInfo.hprop_kes_period_info ] ] diff --git a/cardano-testnet/test/Test/Util.hs b/cardano-testnet/test/Test/Util.hs index 762d6156c46..385f1d5e2c7 100644 --- a/cardano-testnet/test/Test/Util.hs +++ b/cardano-testnet/test/Test/Util.hs @@ -8,9 +8,10 @@ module Test.Util ) where import Data.Bool (bool) -import Hedgehog (Property) +import Hedgehog (Property, PropertyName) import Hedgehog.Extras.Stock.OS (isWin32) import Prelude +import Test.Tasty (TestName) import Test.Tasty.ExpectedFailure (wrapTest) import Test.Tasty.Providers (testPassed) import Test.Tasty.Runners (TestTree, Result(resultShortDescription)) @@ -20,17 +21,17 @@ import qualified System.Info as SYS type Os = String -ignoreOnWindows :: String -> Property -> TestTree -ignoreOnWindows pName prop = - bool id (ignoreOn "Windows") isWin32 $ H.testProperty pName prop +ignoreOnWindows :: TestName -> PropertyName -> Property -> TestTree +ignoreOnWindows name propName prop = + bool id (ignoreOn "Windows") isWin32 $ H.testPropertyNamed name propName prop -ignoreOnMac :: String -> Property -> TestTree -ignoreOnMac pName prop = - bool id (ignoreOn "MacOS") isMacOS $ H.testProperty pName prop +ignoreOnMac :: TestName -> PropertyName -> Property -> TestTree +ignoreOnMac name propName prop = + bool id (ignoreOn "MacOS") isMacOS $ H.testPropertyNamed name propName prop -ignoreOnMacAndWindows :: String -> Property -> TestTree -ignoreOnMacAndWindows pName prop = - bool id (ignoreOn "MacOS and Windows") (isMacOS || isWin32) $ H.testProperty pName prop +ignoreOnMacAndWindows :: TestName -> PropertyName -> Property -> TestTree +ignoreOnMacAndWindows name propName prop = + bool id (ignoreOn "MacOS and Windows") (isMacOS || isWin32) $ H.testPropertyNamed name propName prop isMacOS :: Bool isMacOS = SYS.os == "darwin"