Skip to content
Permalink
Browse files

tests: Add DaedalusIPC test

  • Loading branch information...
rvl committed Jun 12, 2019
1 parent bcc8705 commit 2960fdefbcc9fa050f7e129aee562ecf5b30ccd4
Showing with 13 additions and 2 deletions.
  1. +13 −2 lib/core/test/integration/Test/Integration/Scenario/CLI/Server.hs
@@ -13,9 +13,15 @@ import System.Exit
import System.IO.Temp
( withSystemTempDirectory )
import System.Process
( CreateProcess, proc, withCreateProcess )
( CreateProcess
, createProcess
, proc
, terminateProcess
, waitForProcess
, withCreateProcess
)
import Test.Hspec
( Spec, describe, it, shouldContain )
( Spec, describe, it, shouldContain, shouldReturn )

spec :: Spec
spec = do
@@ -31,6 +37,11 @@ spec = do
ls <- listDirectory d
ls `shouldContain` ["wallet.db"]

describe "DaedalusIPC" $ do
it "should reply with the port when asked" $ do
(_, _, _, ph) <- createProcess (proc "test/integration/js/mock-daedalus.js" [])
waitForProcess ph `shouldReturn` ExitSuccess

withTempDir :: (FilePath -> IO a) -> IO a
withTempDir = withSystemTempDirectory "integration-state"

0 comments on commit 2960fde

Please sign in to comment.
You can’t perform that action at this time.