Github user aledsage commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/485#discussion_r107146697
--- 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);
+ final String symbolicName =
OsgiStandaloneTest.BROOKLYN_TEST_OSGI_ENTITIES_SYMBOLIC_NAME_FULL;
+ final String version =
OsgiStandaloneTest.BROOKLYN_TEST_OSGI_ENTITIES_VERSION;
+ final String bundleUrl =
OsgiStandaloneTest.BROOKLYN_TEST_OSGI_ENTITIES_URL;
+ BundleMaker bm = new BundleMaker(manager);
+ File f = Os.newTempFile("osgi", "jar");
+
Files.copyFile(ResourceUtils.create(this).getResourceFromUrl(bundleUrl), f);
+
+ String bom = Joiner.on("\n").join(
+ "brooklyn.catalog:",
+ " id: " + symbolicName,
+ " version: " + version,
+ " itemType: entity",
+ " name: My Catalog App",
+ " description: My description",
+ " icon_url:
classpath:/org/apache/brooklyn/test/osgi/entities/icon.gif",
+ " item:",
+ " type:
org.apache.brooklyn.core.test.entity.TestEntity");
--- End diff --
Can we change this to something inside the bundle (e.g.
`BROOKLYN_TEST_OSGI_ENTITIES_COM_EXAMPLE_ENTITY`, if you switch to use the
bundle I suggested above)?
---
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 [email protected] or file a JIRA ticket
with INFRA.
---