Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/748#discussion_r124596582
  
    --- Diff: 
camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/ReferencedYamlTest.java
 ---
    @@ -127,13 +127,63 @@ public void testYamlUrlReferencingCatalog() throws 
Exception {
             checkChildEntitySpec(app, entityName);
         }
     
    +    @Test
    +    public void testYamlReferencingEarlierItemShortForm() throws Exception 
{
    +        addCatalogItems(
    +            "brooklyn.catalog:",
    +            "  itemType: entity",
    +            "  items:",
    +            "  - id: yaml.basic",
    +            "    version: " + TEST_VERSION,
    +            "    item:",
    +            "      type: org.apache.brooklyn.entity.stock.BasicEntity",
    +            "  - id: yaml.reference",
    +            "    version: " + TEST_VERSION,
    +            "    item:",
    +            "      type: yaml.basic");
    +
    +        String entityName = "YAML -> catalog item -> yaml url";
    +        Entity app = createAndStartApplication(
    +            "services:",
    +            "- name: " + entityName,
    +            "  type: " + ver("yaml.reference"));
    +        
    +        checkChildEntitySpec(app, entityName);
    +    }
    +    
    +    @Test(groups="WIP") // references to earlier items only work with 
short form syntax
    +    public void testYamlReferencingEarlierItemLongForm() throws Exception {
    +        addCatalogItems(
    +            "brooklyn.catalog:",
    +            "  itemType: entity",
    +            "  items:",
    +            "  - id: yaml.basic",
    +            "    version: " + TEST_VERSION,
    +            "    item:",
    +            "      services:",
    +            "      - type: org.apache.brooklyn.entity.stock.BasicEntity",
    +            "  - id: yaml.reference",
    +            "    version: " + TEST_VERSION,
    +            "    item:",
    +            "      services:",
    +            "      - type: yaml.basic");
    +
    +        String entityName = "YAML -> catalog item -> yaml url";
    +        Entity app = createAndStartApplication(
    +            "services:",
    +            "- name: " + entityName,
    +            "  type: " + ver("yaml.reference"));
    +        
    +        checkChildEntitySpec(app, entityName);
    +    }
    +
         @Test(groups="WIP") //Not able to use caller provided catalog items 
when referencing entity specs (as opposed to catalog meta)
         public void testYamlUrlReferencingCallerCatalogItem() throws Exception 
{
             addCatalogItems(
                 "brooklyn.catalog:",
                 "  itemType: entity",
    --- End diff --
    
    As above, can we use `itemType: template` here if we're using `services: 
...`?


---
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.
---

Reply via email to