fixes for hipchat integration tests
Original commit: elastic/x-pack-elasticsearch@df6311799b
This commit is contained in:
parent
5b363f1041
commit
f9a8c8937c
|
@ -11,7 +11,6 @@ import org.elasticsearch.test.junit.annotations.Network;
|
||||||
import org.elasticsearch.watcher.actions.hipchat.HipChatAction;
|
import org.elasticsearch.watcher.actions.hipchat.HipChatAction;
|
||||||
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
|
import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests;
|
||||||
import org.elasticsearch.watcher.transport.actions.put.PutWatchResponse;
|
import org.elasticsearch.watcher.transport.actions.put.PutWatchResponse;
|
||||||
import org.junit.Before;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import static org.elasticsearch.index.query.QueryBuilders.boolQuery;
|
import static org.elasticsearch.index.query.QueryBuilders.boolQuery;
|
||||||
|
@ -29,9 +28,7 @@ import static org.hamcrest.Matchers.*;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Network
|
@Network
|
||||||
public class HipChatServiceIT extends AbstractWatcherIntegrationTests {
|
public class HipChatServiceTests extends AbstractWatcherIntegrationTests {
|
||||||
|
|
||||||
private HipChatService service;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean timeWarped() {
|
protected boolean timeWarped() {
|
||||||
|
@ -63,13 +60,9 @@ public class HipChatServiceIT extends AbstractWatcherIntegrationTests {
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Before
|
|
||||||
public void init() throws Exception {
|
|
||||||
service = getInstanceFromMaster(HipChatService.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSendMessage_V1Account() throws Exception {
|
public void testSendMessage_V1Account() throws Exception {
|
||||||
|
HipChatService service = getInstanceFromMaster(HipChatService.class);
|
||||||
HipChatMessage hipChatMessage = new HipChatMessage(
|
HipChatMessage hipChatMessage = new HipChatMessage(
|
||||||
"/code HipChatServiceIT#testSendMessage_V1Account",
|
"/code HipChatServiceIT#testSendMessage_V1Account",
|
||||||
new String[] { "test-watcher", "test-watcher-2" },
|
new String[] { "test-watcher", "test-watcher-2" },
|
||||||
|
@ -93,6 +86,7 @@ public class HipChatServiceIT extends AbstractWatcherIntegrationTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSendMessage_IntegrationAccount() throws Exception {
|
public void testSendMessage_IntegrationAccount() throws Exception {
|
||||||
|
HipChatService service = getInstanceFromMaster(HipChatService.class);
|
||||||
HipChatMessage hipChatMessage = new HipChatMessage(
|
HipChatMessage hipChatMessage = new HipChatMessage(
|
||||||
"/code HipChatServiceIT#testSendMessage_IntegrationAccount",
|
"/code HipChatServiceIT#testSendMessage_IntegrationAccount",
|
||||||
null, // custom rooms are unsupported by integration profiles
|
null, // custom rooms are unsupported by integration profiles
|
||||||
|
@ -116,6 +110,7 @@ public class HipChatServiceIT extends AbstractWatcherIntegrationTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSendMessage_UserAccount() throws Exception {
|
public void testSendMessage_UserAccount() throws Exception {
|
||||||
|
HipChatService service = getInstanceFromMaster(HipChatService.class);
|
||||||
HipChatMessage hipChatMessage = new HipChatMessage(
|
HipChatMessage hipChatMessage = new HipChatMessage(
|
||||||
"/code HipChatServiceIT#testSendMessage_UserAccount",
|
"/code HipChatServiceIT#testSendMessage_UserAccount",
|
||||||
new String[] { "test-watcher", "test-watcher-2" },
|
new String[] { "test-watcher", "test-watcher-2" },
|
||||||
|
@ -140,7 +135,6 @@ public class HipChatServiceIT extends AbstractWatcherIntegrationTests {
|
||||||
@Test
|
@Test
|
||||||
public void testWatchWithHipChatAction() throws Exception {
|
public void testWatchWithHipChatAction() throws Exception {
|
||||||
|
|
||||||
|
|
||||||
HipChatAccount.Profile profile = randomFrom(HipChatAccount.Profile.values());
|
HipChatAccount.Profile profile = randomFrom(HipChatAccount.Profile.values());
|
||||||
String account;
|
String account;
|
||||||
HipChatAction.Builder actionBuilder;
|
HipChatAction.Builder actionBuilder;
|
Loading…
Reference in New Issue