Merge lp:~rharding/charmworld/bundle-metadata3 into lp:~juju-jitsu/charmworld/trunk
Status: | Merged |
---|---|
Approved by: | Richard Harding |
Approved revision: | 418 |
Merged at revision: | 410 |
Proposed branch: | lp:~rharding/charmworld/bundle-metadata3 |
Merge into: | lp:~juju-jitsu/charmworld/trunk |
Diff against target: |
109 lines (+49/-9) 2 files modified
charmworld/views/api.py (+20/-9) charmworld/views/tests/test_api.py (+29/-0) |
To merge this branch: | bzr merge lp:~rharding/charmworld/bundle-metadata3 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Gui Bot | continuous-integration | Approve | |
Benji York (community) | Approve | ||
Review via email: mp+189691@code.launchpad.net |
Commit message
Update the search & interesting calls to include the bundle file/charm_
Brings up to match the bundle details call.
Description of the change
Update the search and interesting calls to include the bundle file/charm_metadata added to the details call.
- Added a path in the item_results to call a _bundle_result just as it does for _charm_result.
- _bundle_result does the work sharing the methods to find the list of files and the charm details for the bundle before adding to the result list.
- Drive by fixing a bug where the series was pulled from the wrong place in the bundle json. Made sure a functional test in the search results verified that the name/series combo works for finding charms that are promulgated.
- Only added tests to search since they share the same code paths and the interesting already has tests that bundles go through the interesting call.
QA:
Perform a search for wiki and verify that the bundle results have the two added fields of metadata.
The branch looks good.
The _bundle_result class method could use a docstring (and perhaps a different name, but I can't think of an improvement right now). Also, how about "bundle_metadata" instead of "bundle_built"?