Test: fix null failure in watcher test
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
@@ -481,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();
