On 5/23/13 3:40 PM, "Bertrand Delacretaz" <[email protected]> wrote:
>Hi Lukas, > >On Thu, May 23, 2013 at 3:33 PM, Lukas Eder <[email protected]> wrote: >> ...Probably, I'm not the first one to have stumbled upon this >>situation. Did >> others just explicitly register the node type, as you suggested?... > >Yes - if you have good ideas for how to improve this they are welcome, >but note that the bundle under test will not be built yet when the >unit tests run. Yes, I'm aware of this chicken-and-eggs problem. Node types cannot be tested that way, because the bundle has not yet been built. The bundle shouldn't be built, because the node types are not yet tested (except if added manually to a test repo). Here are a couple of thoughts: 1. /SLING-INF seems to be a standard path on the classpath of the bundle. So CND files might be auto-discoverable 2. Users leveraging these things are OK with having Sling as a dependency. So they wouldn't mind adding a Sling Maven Plugin 3. Such a Sling Maven Plugin could maybe "expose" an empty test repository that would already contain the node type This seems like a lot of work if its' just about node types. But maybe, such a Maven plugin and pre-configured test repository could be leveraged for other purposes, most importantly for mocking Sling as a whole? Cheers Lukas
