brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request #485: `BundleMaker` REST call allowing to add Z...
Date Tue, 21 Mar 2017 12:59:22 GMT
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/485#discussion_r107146514
  
    --- Diff: rest/rest-resources/src/test/java/org/apache/brooklyn/rest/resources/CatalogResourceTest.java
---
    @@ -487,6 +495,79 @@ public void testAddMissingItem() {
             //equivalent to HTTP response 404 text/html
             addAddCatalogItemWithInvalidBundleUrl("classpath://missing-jar-file.txt");
         }
    +    
    +    @Test
    +    public void testOsgiBundleWithBom() throws Exception {
    +        TestResourceUnavailableException.throwIfResourceUnavailable(getClass(), OsgiStandaloneTest.BROOKLYN_TEST_OSGI_ENTITIES_PATH);
    --- End diff --
    
    I worry that this test might only pass because this OSGi bundle's symbolic name starts
with `org.apache.brooklyn...`. It is therefore white-listed. If we fail to find the resource
`classpath:/org/apache/brooklyn/test/osgi/entities/icon.gif`, we'll look inside all the installed
bundles whose symbolic names match the white-listed regexes.
    
    If you changed this to use `BROOKLYN_TEST_OSGI_ENTITIES_COM_EXAMPLE_PATH`, does it still
pass?
    
    If so, how? How does it know that the item in the catalog came from this given bundle,
when it has no `brooklyn.libraries` section?! Do we need to auto-add the `brooklyn.libraries`
section when we are explicitly adding the new item to the catalog?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message