Hi all,
Half a year ago I felt the need to write unit tests for my Lua modules for Heka
but didn’t find easy way to do that with standard Heka/LuaSandbox toolchain.
For that I’ve created a pure Lua mock for Heka:
https://github.com/timurb/heka_mock
That is you can write unit tests with standard Lua testing libraries (like
busted), make sure you are good with some basic logic and move on to real
testing with Heka afterwards.
Some usage examples can be found in test/spec folder.
It’s far from being complete: I’ve never intended to implement binary functions
(like correct decode_message() ) and some others may be missing too. Also it is
by no means a replacement for real testing against Heka.
Nevertheless it helped me to catch couple of bugs which I’d have hard time
catching with Heka (like passing array by reference rather than copying).
I’m no longer an active Heka user for now but I think I better send the
announcement anyway than keep the tool hidden from the community :-)
If you need help on using that I’d be happy to help and if you have pull
requests I’d be happy to merge them.
Also any feedback is very welcome.
Timur
_______________________________________________
Heka mailing list
[email protected]
https://mail.mozilla.org/listinfo/heka