hedgehog-extras-0.6.1.0: Supplemental library for hedgehog
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hedgehog.Extras.Test.Network

Synopsis

Documentation

doesFileExists :: (MonadTest m, MonadIO m, HasCallStack) => FilePath -> m Bool Source #

Test if a file exists

isPortOpen :: (MonadTest m, MonadIO m, HasCallStack) => Int -> m Bool Source #

Test if a port is open

doesSocketExist :: (MonadTest m, MonadIO m, HasCallStack) => FilePath -> m Bool Source #

Test if a socket file exists

assertPortOpen :: (MonadTest m, MonadIO m, HasCallStack) => Int -> m () Source #

Assert that a port is open

assertSocketExists :: (MonadTest m, MonadIO m, HasCallStack) => FilePath -> m () Source #

Assert that a socket file exists is open

doesSprocketExist :: (MonadTest m, MonadIO m, HasCallStack) => Sprocket -> m Bool Source #

Test if the sprocket exists

downloadToFile :: (MonadTest m, MonadIO m, HasCallStack) => String -> FilePath -> m () Source #

Download from a URl to a file

downloadAndExtractGithubCommitToTemp :: (MonadTest m, MonadIO m, HasCallStack) => FilePath -> String -> String -> m FilePath Source #

Download a github commit to a temporary directory, extract it and return the path to the extracted directory.

If the file is already downloaded, it will not be downloaded again. If the file is already extracted, it will not be extracted again.