cloudbase / wnbd

Windows Ceph RBD NBD driver
GNU Lesser General Public License v2.1
57 stars 26 forks source link

tests: Drop MockWnbdDaemon excessive constructor params #110

Closed stefan-chivu closed 1 year ago

stefan-chivu commented 1 year ago

The number of constructor arguments for MockWnbdDaemon was getting out of hand, with some arguments only being necessary for one test.

With this commit, the constructor will only receive a pointer to a WNBD_PROPERTIES structure that will contain all the properties set accordingly for each test.

In every test, a default WNBD_PROPERTIES structure will be generated using the GetNewWnbdProps function from utils.cpp, which receives a reference to a WNBD_PROPERTIES structure, and for any custom requirements, the values can be modified before calling the Start method of the MockWnbdDaemon class.

Signed-off-by: Stefan Chivu schivu@cloudbasesolutions.com

petrutlucian94 commented 1 year ago

Looks good, unrelated CI failure.