-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#531 Notify users when some of the emails are not correct or not allo…
…wed.
- Loading branch information
Showing
8 changed files
with
65 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,6 +106,10 @@ | |
|
||
<p>Job started at <b>2022-03-21 16:29 +0200</b>, finished at <b>2022-03-21 19:16 +0200</b>. Elapsed time: <b>2 hours and 46 minutes</b>. The job ran in <i>undercover</i> mode - no updates to bookkeeping tables are saved.</p> | ||
|
||
<p><span class="tderr">Warning! </span><span class="tdred">Some email recipients are not proper emails: </span><span class="tderr">invalid_email</span></p> | ||
|
||
<p><span class="tderr">Warning! </span><span class="tdred">Some email recipients have domain names that are not allowed: </span><span class="tderr">[email protected]</span></p> | ||
|
||
<div class="datagrid" style="width:fit-content"><table style="width:100%"> | ||
<thead><tr><th>Job</th> | ||
<th>Table</th> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,13 +20,13 @@ import com.typesafe.config.{Config, ConfigFactory} | |
import org.scalatest.wordspec.AnyWordSpec | ||
import za.co.absa.pramen.api.notification.NotificationEntry.Paragraph | ||
import za.co.absa.pramen.api.notification._ | ||
import za.co.absa.pramen.api.status.{DependencyWarning, NotificationFailure, PipelineNotificationFailure, RunStatus, TaskRunReason} | ||
import za.co.absa.pramen.api.status._ | ||
import za.co.absa.pramen.core.exceptions.{CmdFailedException, ProcessFailedException} | ||
import za.co.absa.pramen.core.fixtures.TextComparisonFixture | ||
import za.co.absa.pramen.core.mocks.{RunStatusFactory, SchemaDifferenceFactory, TaskResultFactory, TestPrototypes} | ||
import za.co.absa.pramen.core.notify.message.{MessageBuilderHtml, ParagraphBuilder} | ||
import za.co.absa.pramen.core.notify.pipeline.PipelineNotificationBuilderHtml | ||
import za.co.absa.pramen.core.notify.pipeline.PipelineNotificationBuilderHtml.{NOTIFICATION_EXCEPTION_MAX_LENGTH_KEY, NOTIFICATION_REASON_MAX_LENGTH_KEY} | ||
import za.co.absa.pramen.core.notify.pipeline.{PipelineNotificationBuilderHtml, ValidatedEmails} | ||
import za.co.absa.pramen.core.utils.ResourceUtils | ||
|
||
import java.time.{Instant, LocalDate} | ||
|
@@ -146,6 +146,8 @@ class PipelineNotificationBuilderHtmlSuite extends AnyWordSpec with TextComparis | |
|
||
builder.addSignature(TextElement("Test signature")) | ||
|
||
builder.addValidatedEmails(ValidatedEmails(Seq("[email protected]"), Seq("invalid_email"), Seq("[email protected]"))) | ||
|
||
val actual = builder.renderBody() | ||
|
||
compareText(actual, expected) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters