Skip to content

Commit

Permalink
cardano-wallet-server no longer takes a mnemonic
Browse files Browse the repository at this point in the history
  • Loading branch information
Anviking authored and rvl committed Mar 20, 2019
1 parent 34086d6 commit 948e595
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions test/integration/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,6 @@ import Test.Integration.Framework.Request

import qualified Cardano.NetworkLayer.HttpBridgeSpec as HttpBridge

withWallet :: ((Text, Manager) -> IO a) -> IO a
withWallet action = do
let launch = proc "cardano-wallet-server" testMnemonic
testMnemonic = ["ring","congress","face","smile","torch","length","purse","bind","rule","reopen","label","ask","town","town","argue"]
baseURL = T.pack "http://localhost:8090/"
manager <- newManager defaultManagerSettings
withCreateProcess launch $ \_ _ _ _ph -> do
threadDelay 1000000
action (baseURL, manager)

main :: IO ()
main = withWallet $ \http -> do
hspec $ do
Expand All @@ -51,6 +41,19 @@ main = withWallet $ \http -> do
beforeAll (newMVar $ Context () http) $ do
describe "Integration test framework" dummySpec

-- Runs the wallet server only. The API is not implemented yet, so this is
-- basically a placeholder until then.
withWallet :: ((Text, Manager) -> IO a) -> IO a
withWallet action = do
let port = "8091"
launch = proc "cardano-wallet-server" ["--wallet-server-port", port]
baseURL = T.pack ("http://localhost:" <> port <> "/")
manager <- newManager defaultManagerSettings
withCreateProcess launch $ \_ _ _ _ph -> do
threadDelay 1000000
action (baseURL, manager)

-- Exercise the request functions, which just fail at the moment.
dummySpec :: Scenarios Context
dummySpec = do
scenario "Try the API which isn't implemented yet" $ do
Expand Down

0 comments on commit 948e595

Please sign in to comment.