Commit Graph

2 Commits

Author SHA1 Message Date
Ján Tomko
743bda062b tests: mock gnutls_dh_params_generate2
This function generates some big random numbers.

Cache the result and supply it to any subsequent generate2 calls.
2016-06-20 18:12:53 +02:00
John Ferlan
6a3f4121a5 tests: Add mock for virRandomBytes
Create a mock for virRandomBytes to generate a not so random value.
This should be usable by other tests that need a not so random number
to be generated by including the virrandommock at preload.

The "random number" generated is based upon the size of the expected
stream of bytes being returned where each byte in the result gets
the index of the array - hence a 4 byte array returns 0x00010203.
2016-05-20 09:36:28 -04:00