eventmanager: allow to add attachments to email actions

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2022-08-22 19:04:17 +02:00
parent 3e8254e398
commit 6777008aec
13 changed files with 386 additions and 28 deletions

View File

@@ -2244,6 +2244,14 @@ func compareEventActionEmailConfigFields(expected, actual dataprovider.EventActi
if expected.Body != actual.Body {
return errors.New("email body mismatch")
}
if len(expected.Attachments) != len(actual.Attachments) {
return errors.New("email attachments mismatch")
}
for _, v := range expected.Attachments {
if !util.Contains(actual.Attachments, v) {
return errors.New("email attachments content mismatch")
}
}
return nil
}