| Safe Haskell | None |
|---|
Test.Ganeti.Confd.Utils
Description
Unittests for ganeti-htools.
Synopsis
- prop_req_sign :: HashKey -> NonNegative Integer -> Positive Integer -> Bool -> ConfdRequest -> Property
- prop_rep_salt :: HashKey -> ConfdReply -> Property
- prop_bad_key :: String -> ConfdRequest -> Property
- testConfd_Utils :: Test
Documentation
Arguments
| :: HashKey | The hash key |
| -> NonNegative Integer | The base timestamp |
| -> Positive Integer | Delta for out of window |
| -> Bool | Whether delta should be + or - |
| -> ConfdRequest | |
| -> Property |
Test that signing messages and checking signatures is correct. It also tests, indirectly the serialisation of messages so we don't need a separate test for that.
Arguments
| :: HashKey | The hash key |
| -> ConfdReply | A Confd reply |
| -> Property |
Tests that a ConfdReply can be properly encoded, signed and parsed using the proper salt, but fails parsing with the wrong salt.
Arguments
| :: String | Salt |
| -> ConfdRequest | Request |
| -> Property |
Tests that signing with a different key fails detects failure correctly.
testConfd_Utils :: Test Source #