Github user ahgittin commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/999#discussion_r44516156
--- Diff:
usage/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestHttpCall.java
---
@@ -0,0 +1,33 @@
+package org.apache.brooklyn.test.framework;
+
+import com.google.common.collect.Maps;
+import org.apache.brooklyn.api.entity.Entity;
+import org.apache.brooklyn.api.entity.ImplementedBy;
+import org.apache.brooklyn.config.ConfigKey;
+import org.apache.brooklyn.core.config.ConfigKeys;
+import org.apache.brooklyn.core.entity.trait.Startable;
+import org.apache.brooklyn.util.core.flags.SetFromFlag;
+import org.apache.brooklyn.util.time.Duration;
+
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Entity that makes a HTTP Request and tests the respose
+ *
+ * @author johnmccabe
+ */
+@ImplementedBy(value = TestHttpCallImpl.class)
+public interface TestHttpCall extends Entity, Startable {
+
+ @SetFromFlag(nullable = false)
+ ConfigKey<String> TARGET_URL = ConfigKeys.newStringConfigKey("url",
"URL to test");
+
+ @SetFromFlag(nullable = false)
+ ConfigKey<Map> ASSERTIONS = ConfigKeys.newConfigKey(Map.class,
"assert",
+ "Assertions to be evaluated", Maps.newLinkedHashMap());
+
+ ConfigKey<Duration> TIMEOUT = ConfigKeys.newConfigKey(Duration.class,
"timeout",
--- End diff --
i note the implementation of this one does not permit children; that's
probably a useful distinction to call out, and probably cleaner if the
assertions in general do not (and they should assert on `init` that they have
no children)
---
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.
---