Our unit tests use the use the in-memory key/value store. We would like to run the same tests from the command line via maven - but use Mongo as the key/value store. We've configured local servers via templates to use mongo as the key/value store to support functional testing. In concept, to do the same thing for unit testing, I would specify a maven profile and have that profile load those same templates. (In concept.) Can you offer general guidance on approach? (The goal is to use the same unit tests un-modified against either in-memory or mongo k/v...)
UPDATED: Current approach is to do the following:
- Use a Maven profile to set a system property like this
- Implement a Feature - in the feature look for the property value
- Use hot deploy in the
start method of the Feature to load a contribution enabling mongo if the property indicates to do so
Of course - I don't like to duplicate work - would rather use an existing Framework Feature if one exists. Looking through GitHib, so far, I do not see it. Nuxeo folks, guidance is appreciated. Thanks.