This is an automated email from the ASF dual-hosted git repository. heneveld pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/brooklyn-server.git
commit d068bcaa0edfc13bd73887a4ff5bdc46c25bfc67 Author: Alex Heneveld <[email protected]> AuthorDate: Fri Aug 20 09:15:20 2021 +0100 test tags with locations --- .../apache/brooklyn/camp/brooklyn/LocationsYamlTest.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/LocationsYamlTest.java b/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/LocationsYamlTest.java index ee7ce5b..17f4027 100644 --- a/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/LocationsYamlTest.java +++ b/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/LocationsYamlTest.java @@ -281,4 +281,19 @@ public class LocationsYamlTest extends AbstractYamlTest { return log; } + @Test + public void testLocationWithTags() throws Exception { + String yaml = + "location:\n"+ + " localhost:\n"+ + " tags: [ foo ]\n"+ + "services:\n"+ + "- type: org.apache.brooklyn.core.test.entity.TestEntity\n"; + + Entity app = createStartWaitAndLogApplication(yaml); + LocalhostMachineProvisioningLocation loc = (LocalhostMachineProvisioningLocation) Iterables.getOnlyElement(app.getLocations()); + assertNotNull(loc); + Assert.assertTrue(loc.tags().containsTag("foo"), "location tags missing: "+loc.tags().getTags()); + } + }
