cardano-cli-8.23.1.0: The Cardano command-line interface
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Cardano.CLI.Aeson

Synopsis

Documentation

assertEqualModuloDesc Source #

Arguments

∷ (HasCallStack, MonadIO m, MonadTest m) 
FilePath

The file of the first generated verification key

FilePath

The file of the second generated verification key, i.e. the one generated by calling "key verification-key"

→ m () 

assertEqualModuloDesc file1 file2 loads file1 and file2 from disk, then it strips the field description from the loaded content, and finally compare the two values. The values must be equal, otherwise the test is failed.

Required, because command "key" "verification-key" generates keys without descriptions. Note that it would be better to write descriptions, see: https://github.com/IntersectMBO/cardano-cli/issues/429#issuecomment-2003880575

assertHasKeysHasCallStackMonadTest m ⇒ MonadIO m ⇒ [Text] → FilePath → m () Source #

assertHasKeys keys path succeeds if path is a file containing a JSON object whose keys is a superset of keys.

For example. if path contains "{ "a":0, "b":1.0, "c": "foo"}", hasKeys ["b", "a"] path succeeds.

assertHasMappingsHasCallStackMonadTest m ⇒ MonadIO m ⇒ [(Text, Text)] → FilePath → m () Source #

assertHasMappings pairs path succeeds if path is a file containing a JSON object whose mappings is a superset of pairs.

For example, if path contains "{ "a":"bar", "b":"buzz", "c":"foo"}", assertHasMappings "[("b", "buzz"), ("a", "bar")] path succeeds.