Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- assertDirectoryMissing ∷ (MonadTest m, MonadIO m, HasCallStack) ⇒ FilePath → m ()
- checkTxCddlFormat ∷ (MonadTest m, MonadIO m, HasCallStack) ⇒ FilePath → FilePath → m ()
- checkTextEnvelopeFormat ∷ (MonadTest m, MonadIO m, HasCallStack) ⇒ TextEnvelopeType → FilePath → FilePath → m ()
- equivalence ∷ (MonadTest m, Eq a, Show a, HasCallStack) ⇒ a → a → m ()
- execCardanoCLI ∷ (MonadTest m, MonadCatch m, MonadIO m, HasCallStack) ⇒ [String] → m String
- execDetailCardanoCLI ∷ (MonadTest m, MonadCatch m, MonadIO m, HasCallStack) ⇒ [String] → m (ExitCode, String, String)
- tryExecCardanoCLI ∷ [String] → PropertyT IO (Either Failure String)
- propertyOnce ∷ PropertyT IO () → Property
- withSnd ∷ (a → b) → a → (a, b)
- noteInputFile ∷ (MonadTest m, HasCallStack) ⇒ FilePath → m FilePath
- noteTempFile ∷ (MonadTest m, HasCallStack) ⇒ FilePath → FilePath → m FilePath
- redactJsonField ∷ MonadTest m ⇒ MonadIO m ⇒ HasCallStack ⇒ Text → Text → FilePath → FilePath → m ()
- bracketSem ∷ MonadBaseControl IO m ⇒ FileSem → (FilePath → m c) → m c
- data FileSem
- newFileSem ∷ FilePath → FileSem
Documentation
assertDirectoryMissing ∷ (MonadTest m, MonadIO m, HasCallStack) ⇒ FilePath → m () Source #
Asserts that the given directory is missing.
∷ (MonadTest m, MonadIO m, HasCallStack) | |
⇒ FilePath | Reference/golden file |
→ FilePath | Newly created file |
→ m () |
checkTextEnvelopeFormat ∷ (MonadTest m, MonadIO m, HasCallStack) ⇒ TextEnvelopeType → FilePath → FilePath → m () Source #
Checks that the tvType
and tvDescription
are equivalent between two files.
equivalence ∷ (MonadTest m, Eq a, Show a, HasCallStack) ⇒ a → a → m () Source #
Check for equivalence between two types and perform a file cleanup on failure.
∷ (MonadTest m, MonadCatch m, MonadIO m, HasCallStack) | |
⇒ [String] | Arguments to the CLI command |
→ m String | Captured stdout |
Execute cardano-cli via the command line.
Waits for the process to finish and returns the stdout.
∷ (MonadTest m, MonadCatch m, MonadIO m, HasCallStack) | |
⇒ [String] | Arguments to the CLI command |
→ m (ExitCode, String, String) | Captured stdout |
Execute cardano-cli via the command line, expecting it to fail.
Waits for the process to finish and returns the exit code, stdout and stderr.
withSnd ∷ (a → b) → a → (a, b) Source #
Return the supply value with the result of the supplied function as a tuple
noteInputFile ∷ (MonadTest m, HasCallStack) ⇒ FilePath → m FilePath Source #
Return the input file path after annotating it relative to the project root directory
noteTempFile ∷ (MonadTest m, HasCallStack) ⇒ FilePath → FilePath → m FilePath Source #
Return the test file path after annotating it relative to the project root directory
redactJsonField ∷ MonadTest m ⇒ MonadIO m ⇒ HasCallStack ⇒ Text → Text → FilePath → FilePath → m () Source #
∷ MonadBaseControl IO m | |
⇒ FileSem | a file semaphore |
→ (FilePath → m c) | an action, a file path will be extracted from the semaphore |
→ m c |
Run action acquiring a semaphore, and releasing afterwards. Guards against concurrent access to a block of code.
A file semaphore protecting against a concurrent path access
Create new file semaphore. Always use with NOINLINE
pragma! Example:
createTestnetDataOutSem :: FileSem
createTestnetDataOutSem = newFileSem "testcardano-cli-goldenfilesgoldenconway/create-testnet-data.out"
{-# NOINLINE createTestnetDataOutSem #-}