cardano-cli:cardano-cli-test-lib
Safe HaskellNone
LanguageHaskell2010

Test.Cardano.CLI.Hash

Synopsis

Documentation

serveFilesWhile Source #

Arguments

:: (MonadBaseControl IO m, MonadTest m, MonadIO m, HasCallStack) 
=> [([String], FilePath)]

List of pairs of a relative URL where a file will be served and the file path for the file to serve. Each element in the relative URL is a segment of the URL.

-> (Int -> m a)

Action to run while the file is being served. It receives the port the server is listening on

-> m a 

Takes a relative url (as a list of segments), a file path, and an action, and it serves the file in the url provided in a random free port that is passed as a parameter to the action. After the action returns, it shuts down the server. It returns the result of the action. It also ensures the server is shut down even if the action throws an exception.

tamperBase16Hash :: String -> Maybe String Source #

Tamper with the base16 hash by adding one to the first character