golang-lvs icon indicating copy to clipboard operation
golang-lvs copied to clipboard

unit testing difficulties

Open jdamick opened this issue 7 years ago • 1 comments

Without being able to change the "backend/backendStdin/backendRun" or having defined interfaces for Ipvs, Service, etc. it is difficult to mock out this library. Would you be open to either exposing the backend variables or providing a way to set them or creating interfaces for the existing structs? I am happy to create a PR to help.

I have had to resort to creating a set of adapters around the library in order to mock it, however this is time consuming and only benefits me. So i'm happy to contribute in any way.

jdamick avatar Sep 11 '17 14:09 jdamick

@jdamick this is already on our todo list, just buried behind a bunch of other things. We would be very grateful if you were willing to assist here.

Thanks!

tylerflint avatar Sep 12 '17 02:09 tylerflint