Open nemesifier opened 3 years ago
The current problem I am facing with this is that if we create a function in monitoring_utils.lua
and load it, then the io defined in first table, TestNeighbor
or TestInterface
is getting used by the next one, i.e. TestNetJSON
Opened a thread here:- https://www.luaforum.com/threads/not-able-to-mock-io-library.505/
Hi, would like to contribute to this issue
It would be good to create a utility function which does the read, close and returning of the output when using io.popen().
This would also ensure that whoever will put their hands on this code will keep reusing our function and avoid messing it up again by forgetting to close a pipe.