mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-27 10:28:28 +00:00
Test: fix null failure in watcher test (#31968)
A new commit was merged that does not allow a null attachement && text. This is valid for the slack API, as it does not allow this, but our unit tests did. This commit fixes the broken unit test. Closes #31948
This commit is contained in:
parent
38e09a1508
commit
d76293f990
@ -461,7 +461,6 @@ public class SlackMessageTests extends ESTestCase {
|
||||
assertThat(parsed, equalTo(template));
|
||||
}
|
||||
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/31948")
|
||||
public void testTemplateRender() throws Exception {
|
||||
Settings settings = SlackMessageDefaultsTests.randomSettings();
|
||||
SlackMessageDefaults defaults = new SlackMessageDefaults(settings);
|
||||
@ -482,7 +481,7 @@ public class SlackMessageTests extends ESTestCase {
|
||||
if (randomBoolean()) {
|
||||
templateBuilder.setText(randomAlphaOfLength(10));
|
||||
}
|
||||
if (randomBoolean()) {
|
||||
if (templateBuilder.text == null || randomBoolean()) {
|
||||
int count = randomIntBetween(0, 3);
|
||||
for (int i = 0; i < count; i++) {
|
||||
Attachment.Template.Builder attachmentBuilder = createRandomAttachmentTemplateBuilder();
|
||||
|
Loading…
x
Reference in New Issue
Block a user