Hello Controller Dev, plus select friends, (plz cross post if this is relevant to other lists; e.g. infrautils-...@lists.opendaylight.org <https://lists.opendaylight.org/mailman/listinfo/infrautils-dev>, if applicable)
I'd like to encourage people to write tests which are: a) end-to-end not only unit for a single given module, such as e.g. netvirt/vpnservice/aclservice; b) written against an API not an impl; c) still very very light-weight i.e. not OSGi Karaf Pax Exam etc. integration, but "plain JUnit tests with manual wiring". For this purpose I have, among other new test infra which this particular thread is not about, spent some time to write some helpers for testing controller.config Module (CSS?) - basically it simplifies that "manual wiring" of a Module in a pure JUnit. You can see the (working) code in https://git.opendaylight.org/ gerrit/#/c/42109/. It's a bit mixed in with other things, but if you look at the AclServiceImplTest and AbstractBindingAndConfigTestModule classes, with more in package netvirt.aclservice.tests.utils, you probably get the idea? Please ask if not instead of just ignoring... ;-) Please don't focus / ignore the Dagger related aspects in the current patch set (#8) - the push back in https://git.opendaylight.org/gerrit/#/c/42644/ motivates me to try adjust it to do the same concept without relying on Dagger - hoping to get to that probably tomorrow. (Unless anyone else reading this agrees with me that Dagger is the coolest Dependency Injection framework since life spread? Jokes apart, I'm probably mixing too many things into one pot, so I'm happy to try to remove Dagger from the next proposed controller.config Modules Testing proposal - and maybe get back to it later, for more general applicability beyond just tests.) My Questions: 1. does something like this ready-made infra. for testing controller.config Modules (CSS) perhaps already exist elsewhere?? If yes, can you provide details... can it do the same as what I've come up with? Then I wasted a little bit of time... ;-) 2. obviously this can't stay in netvirt.aclservice; that was just to incubate. Into which existing project could this be proposed to? I was thinking to raise a Gerrit with those helpers as something like org.opendaylight.controller.config-test - would that be welcome? Not sure if that infrautils is suitable for that? I like controller.config-test, as it's specific. Tx, M. -- Michael Vorburger <vorbur...@redhat.com> | IRC: vorburger @freenode | ~ = http://vorburger.ch
_______________________________________________ controller-dev mailing list controller-dev@lists.opendaylight.org https://lists.opendaylight.org/mailman/listinfo/controller-dev