Skip to content

Commit

Permalink
Update index state to 2022-05-24T00:00:00Z
Browse files Browse the repository at this point in the history
  • Loading branch information
newhoggy committed May 25, 2022
1 parent 074d14d commit 8bab5f3
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 35 deletions.
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
@@ -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-24T00:00:00Z

packages:
cardano-api
Expand Down
5 changes: 4 additions & 1 deletion cardano-api/test/Test/Cardano/Api/Typed/TxBody.hs
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TemplateHaskell #-}

{-# OPTIONS_GHC -Wno-deprecations #-} -- TODO Fix deprecations

module Test.Cardano.Api.Typed.TxBody
( tests
) where

import Cardano.Prelude

import Hedgehog (Property, annotateShow, failure, (===), MonadTest)
import qualified Hedgehog as H
import Test.Tasty (TestTree)
import Test.Tasty.Hedgehog (testProperty)
import Test.Tasty.TH (testGroupGenerator)
Expand All @@ -19,6 +20,8 @@ import Data.Type.Equality (TestEquality (testEquality))
import Gen.Cardano.Api.Typed
import Test.Cardano.Api.Typed.Orphans ()

import qualified Hedgehog as H

{- HLINT ignore "Use camelCase" -}

-- | Check the txOuts in a TxBodyContent after a ledger roundtrip.
Expand Down
13 changes: 6 additions & 7 deletions cardano-node-chairman/test/Main.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{-# LANGUAGE FlexibleInstances #-}

{-# OPTIONS_GHC -Wno-deprecations #-} -- TODO Fix deprecations
{-# LANGUAGE OverloadedStrings #-}

module Main
( main
Expand All @@ -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"
Expand Down
19 changes: 12 additions & 7 deletions cardano-testnet/test/Main.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ImportQualifiedPost #-}
{-# LANGUAGE OverloadedStrings #-}

{-# OPTIONS_GHC -Wno-deprecations #-} -- TODO Fix deprecations

Expand All @@ -7,24 +10,26 @@ module Main
) where

import Prelude
-- import qualified Spec.Cli.KesPeriodInfo
import qualified Spec.Node.Shutdown
import qualified Spec.ShutdownOnSlotSynced
import qualified System.Environment as E
import Test.Tasty (TestTree)

import qualified System.Environment as E
import qualified Test.Tasty as T
import qualified Test.Tasty.Ingredients as T
import qualified Test.Util as H

-- import qualified Spec.Cli.KesPeriodInfo
import qualified Spec.Node.Shutdown
import qualified Spec.ShutdownOnSlotSynced

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 <stdout>: commitBuffer: invalid argument (invalid character)
-- as a result of the kes-period-info output to stdout.
-- TODO: Babbage temporarily ignored due to broken protocol-state query
-- 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
]
]

Expand Down
21 changes: 11 additions & 10 deletions cardano-testnet/test/Test/Util.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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"
Expand Down
18 changes: 9 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8bab5f3

Please sign in to comment.