Closed jrha closed 10 years ago
I completely agree but I'm afraid unfortunately this is difficult to implement with the code as it it is today... Most of the work happen in the "event loop" (appearance of a new profile) that is difficult to test in unit tests. I'm happy to receive any suggestion!
I know, it's a long term wish perhaps.
I thinked about this issue and my proposal would be to split ncm-cdispd
in 2 parts:
main()
would remain /usr/sbin/ncm-cdispd
and remain untestable (an infinite loop, main thing to test is the behaviour with respect to ncm-ncd
status, something difficult to emulate...)/usr/lib/perl/NCM
and thus eligible to unit testing.Is this proposal sensible? @piojo and other Perl gurus, what do you think?
If agreed, could be implemented as part of #9.
See https://github.com/quattor/ncm-cdispd/issues/8#issuecomment-49561541 for the current plan.
It would be lovely to have something that we could run as a test to make sure we haven't broken
ncm-cdispd
, unit tests would be wonderful, but anything would be better than nothing.