From 4d30dadba932be166a3c74b8687dc80737a1c9fd Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Wed, 3 Feb 2016 10:47:35 +0100 Subject: [PATCH] test: fix tests to not use mustache Original commit: elastic/x-pack-elasticsearch@4a88d0d458f64103e76de0560dca9092faf113b1 --- .../actions/hipchat/service/HipChatServiceTests.java | 6 +++--- .../actions/pagerduty/service/PagerDutyServiceTests.java | 2 +- .../watcher/actions/slack/service/SlackServiceTests.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/actions/hipchat/service/HipChatServiceTests.java b/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/actions/hipchat/service/HipChatServiceTests.java index b1be9ef1711..bc29ef7c9d7 100644 --- a/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/actions/hipchat/service/HipChatServiceTests.java +++ b/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/actions/hipchat/service/HipChatServiceTests.java @@ -123,7 +123,7 @@ public class HipChatServiceTests extends AbstractWatcherIntegrationTestCase { switch (profile) { case USER: account = "user_account"; - actionBuilder = hipchatAction(account, "/code {{ctx.payload.ref}}") + actionBuilder = hipchatAction(account, "/code HipChatServiceIT#testWatchWithHipChatAction") .addRooms("test-watcher", "test-watcher-2") .addUsers("watcher@elastic.co") .setFormat(HipChatMessage.Format.TEXT) @@ -133,7 +133,7 @@ public class HipChatServiceTests extends AbstractWatcherIntegrationTestCase { case INTEGRATION: account = "integration_account"; - actionBuilder = hipchatAction(account, "/code {{ctx.payload.ref}}") + actionBuilder = hipchatAction(account, "/code HipChatServiceIT#testWatchWithHipChatAction") .setFormat(HipChatMessage.Format.TEXT) .setColor(color) .setNotify(false); @@ -142,7 +142,7 @@ public class HipChatServiceTests extends AbstractWatcherIntegrationTestCase { default: assertThat(profile, is(HipChatAccount.Profile.V1)); account = "v1_account"; - actionBuilder = hipchatAction(account, "/code {{ctx.payload.ref}}") + actionBuilder = hipchatAction(account, "/code HipChatServiceIT#testWatchWithHipChatAction") .addRooms("test-watcher", "test-watcher-2") .setFrom("watcher-test") .setFormat(HipChatMessage.Format.TEXT) diff --git a/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/actions/pagerduty/service/PagerDutyServiceTests.java b/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/actions/pagerduty/service/PagerDutyServiceTests.java index 4a676b47669..9ee21d3f976 100644 --- a/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/actions/pagerduty/service/PagerDutyServiceTests.java +++ b/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/actions/pagerduty/service/PagerDutyServiceTests.java @@ -74,7 +74,7 @@ public class PagerDutyServiceTests extends AbstractWatcherIntegrationTestCase { public void testWatchWithPagerDutyAction() throws Exception { String account = "test_account"; PagerDutyAction.Builder actionBuilder = pagerDutyAction(IncidentEvent - .templateBuilder("pager duty integration test `{{ctx.payload.ref}}`").setAccount(account)); + .templateBuilder("pager duty integration test `testWatchWithPagerDutyAction()`").setAccount(account)); PutWatchResponse putWatchResponse = watcherClient().preparePutWatch("1").setSource(watchBuilder() .trigger(schedule(interval("10m"))) diff --git a/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/actions/slack/service/SlackServiceTests.java b/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/actions/slack/service/SlackServiceTests.java index 6c1567f9823..e995c1dc40a 100644 --- a/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/actions/slack/service/SlackServiceTests.java +++ b/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/watcher/actions/slack/service/SlackServiceTests.java @@ -78,7 +78,7 @@ public class SlackServiceTests extends AbstractWatcherIntegrationTestCase { public void testWatchWithSlackAction() throws Exception { String account = "test_account"; SlackAction.Builder actionBuilder = slackAction(account, SlackMessage.Template.builder() - .setText("slack integration test `{{ctx.payload.ref}}`") + .setText("slack integration test `testWatchWithSlackAction()`") .addTo("#watcher-test", "#watcher-test-2")); PutWatchResponse putWatchResponse = watcherClient().preparePutWatch("1").setSource(watchBuilder()