Skip to content

Commit

Permalink
Merge branch 'winter/uuid' of github.com:hawkular/hawkular-alerts int…
Browse files Browse the repository at this point in the history
…o winter/uuid

Conflicts:
	examples/example-alerts-ui/src/main/webapp/index.jsp
	hawkular-actions-email/src/main/webapp/index.jsp
	hawkular-actions-email/src/main/webapp/index.jsp~HEAD
	hawkular-actions-email/src/main/webapp/index.jsp~HWKALERTS-24 Refactoring of notifications
	hawkular-actions-sms/src/main/webapp/index.jsp
	hawkular-actions-snmp/src/main/webapp/index.jsp
	hawkular-actions-snmp/src/main/webapp/index.jsp~HEAD
	hawkular-alerts-api/src/main/java/org/hawkular/alerts/api/model/condition/Condition.java
	hawkular-alerts-api/src/main/java/org/hawkular/alerts/api/model/trigger/TriggerTemplate.java
	hawkular-alerts-api/src/test/java/org/hawkular/alerts/api/JsonTest.java
	hawkular-alerts-engine/src/main/java/org/hawkular/alerts/engine/impl/DbDefinitionsServiceImpl.java
	hawkular-alerts-engine/src/test/resources/hawkular-alerts/actions.data
	hawkular-alerts-rest/src/main/java/org/hawkular/alerts/rest/ActionsHandler.java
	hawkular-alerts-rest/src/main/java/org/hawkular/alerts/rest/TriggersHandler.java
	hawkular-alerts-rest/src/test/groovy/org/hawkular/alerts/rest/AvailabilityConditionsTest.groovy
	hawkular-alerts-rest/src/test/groovy/org/hawkular/alerts/rest/CompareConditionsTest.groovy
	hawkular-alerts-rest/src/test/groovy/org/hawkular/alerts/rest/FlowUITest.groovy
	hawkular-notifiers-email/src/main/webapp/index.jsp
	hawkular-notifiers-sms/src/main/webapp/index.jsp
	hawkular-notifiers-snmp/src/main/webapp/index.jsp
  • Loading branch information
jshaughn committed Mar 17, 2015
1 parent 4d205b7 commit a2476cf
Show file tree
Hide file tree
Showing 2 changed files with 496 additions and 65 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public void jsonAlertTest() throws Exception {
@Test
public void jsonAvailabilityConditionTest() throws Exception {
String str = "{\"triggerId\":\"test\",\"triggerMode\":\"FIRE\",\"type\":\"AVAILABILITY\"," +
"\"dataId\":\"Default\",\"operator\":\"UP\"}";
"\"conditionId\":\"test-FIRE-1-1\",\"dataId\":\"Default\",\"operator\":\"UP\"}";
AvailabilityCondition condition = objectMapper.readValue(str, AvailabilityCondition.class);

assert condition.getTriggerId().equals("test");
Expand Down Expand Up @@ -191,6 +191,7 @@ public void jsonAvailabilityConditionEvalTest() throws Exception {
@Test
public void jsonCompareConditionTest() throws Exception {
String str = "{\"triggerId\":\"test\",\"triggerMode\":\"FIRE\",\"type\":\"COMPARE\"," +
"\"conditionId\":\"test-FIRE-1-1\"," +
"\"dataId\":\"Default1\",\"operator\":\"LT\",\"data2Id\":\"Default2\",\"data2Multiplier\":1.2}";
CompareCondition condition = objectMapper.readValue(str, CompareCondition.class);

Expand Down Expand Up @@ -294,6 +295,7 @@ public void jsonCompareConditionEvalTest() throws Exception {
@Test
public void jsonStringConditionTest() throws Exception {
String str = "{\"triggerId\":\"test\",\"triggerMode\":\"FIRE\",\"type\":\"STRING\"," +
"\"conditionId\":\"test-FIRE-1-1\"," +
"\"dataId\":\"Default\",\"operator\":\"MATCH\",\"pattern\":\"test-pattern\",\"ignoreCase\":false}";
StringCondition condition = objectMapper.readValue(str, StringCondition.class);

Expand Down Expand Up @@ -395,6 +397,7 @@ public void jsonStringConditionEvalTest() throws Exception {
@Test
public void jsonThresholdConditionTest() throws Exception {
String str = "{\"triggerId\":\"test\",\"triggerMode\":\"FIRE\",\"type\":\"THRESHOLD\"," +
"\"conditionId\":\"test-FIRE-1-1\"," +
"\"dataId\":\"Default\",\"operator\":\"LT\",\"threshold\":10.5}";
ThresholdCondition condition = objectMapper.readValue(str, ThresholdCondition.class);

Expand Down Expand Up @@ -483,7 +486,8 @@ public void jsonThresholdConditionEvalTest() throws Exception {
@Test
public void jsonThresholdRangeConditionTest() throws Exception {
String str = "{\"triggerId\":\"test\",\"triggerMode\":\"FIRE\",\"type\":\"RANGE\"," +
"\"dataId\":\"Default\",\"operatorLow\":\"INCLUSIVE\",\"operatorHigh\":\"INCLUSIVE\"," +
"\"conditionId\":\"test-FIRE-1-1\",\"dataId\":\"Default\",\"operatorLow\":\"INCLUSIVE\"," +
"\"operatorHigh\":\"INCLUSIVE\"," +
"\"thresholdLow\":10.5,\"thresholdHigh\":20.5,\"inRange\":true}";
ThresholdRangeCondition condition = objectMapper.readValue(str, ThresholdRangeCondition.class);

Expand Down Expand Up @@ -729,4 +733,4 @@ public void jsonTriggerTest() throws Exception {
assert !output.contains("match");
}

}
}

0 comments on commit a2476cf

Please sign in to comment.