typesafehub / sbt-conductr

Typesafe ConductR plugin for sbt
Other
29 stars 22 forks source link

Merge bundle configurations #109

Closed markusjura closed 9 years ago

markusjura commented 9 years ago

This PR changes the load bundle logic. Instead of constructing the LoadBundle infos from theBundleKeys, the information are retrieved from the bundle.confinside the bundle zip file.

If an additional configuration zip file (configuration:dist) is specified during bundle load then the infos of the bundle.conf inside the configuration zip file are used. These infos are overriding the values of the bundle.

This is the same logic as in the conductr-cli. It has been manually tested with and without additional configuration. Unit tests have not been provided, yet. First, @huntc should review the current approach. Afterwards I'll create tests for it.

markusjura commented 9 years ago

The two bundle.confs are now merged with the Typesafe Config method withFallback.

huntc commented 9 years ago

This looks really, really nice.

I realise that we don't have a great number of scripted tests for it, but some tests exercising this would be awesome.

Otherwise LGTM.

markusjura commented 9 years ago

I'll add these tests as "acceptance tests" similar to the logs and events tests. Reason is we can't test the new behaviour based on how we currently do tests, by mocking the respective actor. Now we need a bundle and configuration zip file to test the unzip and merging logic. I think for this case an acceptance test is better here. Will add them as soon as we have the testkit in place.

markusjura commented 9 years ago

Added the issue #110 accordingly to document the necessary tests.