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