diff --git a/lib/shelley/test/unit/Cardano/Wallet/Shelley/Launch/BlockfrostSpec.hs b/lib/shelley/test/unit/Cardano/Wallet/Shelley/Launch/BlockfrostSpec.hs index 04325624489..4416c701659 100644 --- a/lib/shelley/test/unit/Cardano/Wallet/Shelley/Launch/BlockfrostSpec.hs +++ b/lib/shelley/test/unit/Cardano/Wallet/Shelley/Launch/BlockfrostSpec.hs @@ -22,14 +22,9 @@ import Options.Applicative , info ) import Test.Hspec - ( Spec - , describe - , expectationFailure - , it - , pendingWith - , shouldBe - , shouldReturn - ) + ( Spec, describe, expectationFailure, it, shouldBe, shouldReturn ) +import Test.Utils.Platform + ( isWindows ) import UnliftIO ( withSystemTempFile ) import UnliftIO.IO @@ -38,10 +33,8 @@ import UnliftIO.IO spec :: Spec spec = describe "Blockfrost CLI options" $ do it "modeOption --node-socket" $ do - -- Named pipes are used on windows - pendingWith "Fails on windows: https://github.com/input-output-hk/cardano-wallet/pull/3160#issuecomment-1071163285" let parserInfo = info modeOption fullDesc - args = ["--node-socket", "/tmp/file"] + args = ["--node-socket", mockSocketOrPipe] case execParserPure defaultPrefs parserInfo args of Failure pf -> expectationFailure $ show pf CompletionInvoked cr -> expectationFailure $ show cr @@ -63,10 +56,8 @@ spec = describe "Blockfrost CLI options" $ do Blockfrost.Project Testnet (T.pack projectId) it "modeOption requires --light flag" $ do - -- Named pipes are used on windows - pendingWith "Fails on windows: https://github.com/input-output-hk/cardano-wallet/pull/3160#issuecomment-1071163285" let parserInfo = info modeOption fullDesc - args = ["--blockfrost-token-file", "/tmp/file"] + args = ["--blockfrost-token-file", mockSocketOrPipe] case execParserPure defaultPrefs parserInfo args of Failure pf | (help, _code, _int) <- execFailure pf "" -> show help `shouldBe` @@ -74,3 +65,6 @@ spec = describe "Blockfrost CLI options" $ do \Usage: (--node-socket FILE | \ \--light --blockfrost-token-file FILE)" result -> expectationFailure $ show result + +mockSocketOrPipe :: String +mockSocketOrPipe = if isWindows then"\\\\.\\pipe\\test" else "/tmp/pipe"