Skip to content

Commit

Permalink
Integration tests: logging is shut down when CLI finished
Browse files Browse the repository at this point in the history
  • Loading branch information
rvl authored and paweljakubas committed Oct 31, 2019
1 parent 3218f08 commit a7e29d0
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,22 @@ spec = do
--
-- but in practice, we only have INFO logs on start-up.

it "LOGGING - Serve shuts down logging correctly" $ \ctx -> do
let args =
["serve"
, "--database"
, "/does-not-exist"
, "--node-port"
, show (ctx ^. typed @(Port "node"))
, "--random-port"
, "--verbose"
, "--genesis-block-hash"
, block0H
]
let process = proc' (commandName @t) args
(out, _) <- collectStreams (2, 0) process
out `shouldContainT` "Logging shutdown."

describe "LOGGING - Exits nicely on wrong genesis hash" $ do
let hashes =
[ replicate 40 '1'
Expand Down

0 comments on commit a7e29d0

Please sign in to comment.