test: fix tests to not use mustache
Original commit: elastic/x-pack-elasticsearch@4a88d0d458
This commit is contained in:
parent
e617d8365f
commit
4d30dadba9
|
@ -123,7 +123,7 @@ public class HipChatServiceTests extends AbstractWatcherIntegrationTestCase {
|
||||||
switch (profile) {
|
switch (profile) {
|
||||||
case USER:
|
case USER:
|
||||||
account = "user_account";
|
account = "user_account";
|
||||||
actionBuilder = hipchatAction(account, "/code {{ctx.payload.ref}}")
|
actionBuilder = hipchatAction(account, "/code HipChatServiceIT#testWatchWithHipChatAction")
|
||||||
.addRooms("test-watcher", "test-watcher-2")
|
.addRooms("test-watcher", "test-watcher-2")
|
||||||
.addUsers("watcher@elastic.co")
|
.addUsers("watcher@elastic.co")
|
||||||
.setFormat(HipChatMessage.Format.TEXT)
|
.setFormat(HipChatMessage.Format.TEXT)
|
||||||
|
@ -133,7 +133,7 @@ public class HipChatServiceTests extends AbstractWatcherIntegrationTestCase {
|
||||||
|
|
||||||
case INTEGRATION:
|
case INTEGRATION:
|
||||||
account = "integration_account";
|
account = "integration_account";
|
||||||
actionBuilder = hipchatAction(account, "/code {{ctx.payload.ref}}")
|
actionBuilder = hipchatAction(account, "/code HipChatServiceIT#testWatchWithHipChatAction")
|
||||||
.setFormat(HipChatMessage.Format.TEXT)
|
.setFormat(HipChatMessage.Format.TEXT)
|
||||||
.setColor(color)
|
.setColor(color)
|
||||||
.setNotify(false);
|
.setNotify(false);
|
||||||
|
@ -142,7 +142,7 @@ public class HipChatServiceTests extends AbstractWatcherIntegrationTestCase {
|
||||||
default:
|
default:
|
||||||
assertThat(profile, is(HipChatAccount.Profile.V1));
|
assertThat(profile, is(HipChatAccount.Profile.V1));
|
||||||
account = "v1_account";
|
account = "v1_account";
|
||||||
actionBuilder = hipchatAction(account, "/code {{ctx.payload.ref}}")
|
actionBuilder = hipchatAction(account, "/code HipChatServiceIT#testWatchWithHipChatAction")
|
||||||
.addRooms("test-watcher", "test-watcher-2")
|
.addRooms("test-watcher", "test-watcher-2")
|
||||||
.setFrom("watcher-test")
|
.setFrom("watcher-test")
|
||||||
.setFormat(HipChatMessage.Format.TEXT)
|
.setFormat(HipChatMessage.Format.TEXT)
|
||||||
|
|
|
@ -74,7 +74,7 @@ public class PagerDutyServiceTests extends AbstractWatcherIntegrationTestCase {
|
||||||
public void testWatchWithPagerDutyAction() throws Exception {
|
public void testWatchWithPagerDutyAction() throws Exception {
|
||||||
String account = "test_account";
|
String account = "test_account";
|
||||||
PagerDutyAction.Builder actionBuilder = pagerDutyAction(IncidentEvent
|
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()
|
PutWatchResponse putWatchResponse = watcherClient().preparePutWatch("1").setSource(watchBuilder()
|
||||||
.trigger(schedule(interval("10m")))
|
.trigger(schedule(interval("10m")))
|
||||||
|
|
|
@ -78,7 +78,7 @@ public class SlackServiceTests extends AbstractWatcherIntegrationTestCase {
|
||||||
public void testWatchWithSlackAction() throws Exception {
|
public void testWatchWithSlackAction() throws Exception {
|
||||||
String account = "test_account";
|
String account = "test_account";
|
||||||
SlackAction.Builder actionBuilder = slackAction(account, SlackMessage.Template.builder()
|
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"));
|
.addTo("#watcher-test", "#watcher-test-2"));
|
||||||
|
|
||||||
PutWatchResponse putWatchResponse = watcherClient().preparePutWatch("1").setSource(watchBuilder()
|
PutWatchResponse putWatchResponse = watcherClient().preparePutWatch("1").setSource(watchBuilder()
|
||||||
|
|
Loading…
Reference in New Issue