Skip to content

Commit

Permalink
fix microsoft teams sample url in IT to adapt url validation
Browse files Browse the repository at this point in the history
Signed-off-by: zhichao-aws <zhichaog@amazon.com>
  • Loading branch information
zhichao-aws committed Aug 24, 2023
1 parent c330a1c commit 18c8af1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ fun getCreateNotificationRequestJsonString(
"chime":{"url":"https://chime.domain.com/sample_chime_url#$randomString"}
""".trimIndent()
ConfigType.MICROSOFT_TEAMS -> """
"microsoft_teams":{"url":"https://microsoftTeams.domain.com/sample_microsoft_teams_url#$randomString"}
"microsoft_teams":{"url":"https://microsoftTeams.domain.webhook.office.com/sample_microsoft_teams_url#$randomString"}
""".trimIndent()
ConfigType.WEBHOOK -> """
"webhook":{"url":"https://web.domain.com/sample_web_url#$randomString"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class CreateNotificationConfigIT : PluginRestTestCase() {
fun `test Create microsoft teams notification config with ID`() {
// Create sample config request reference
val configId = "sample_config_id"
val sampleMicrosoftTeams = MicrosoftTeams("https://domain.com/sample_microsoft_teams_url#1234567890")
val sampleMicrosoftTeams = MicrosoftTeams("https://domain.webhook.office.com/1234567")
val referenceObject = NotificationConfig(
"this is a sample config name",
"this is a sample config description",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class MicrosoftTeamsNotificationConfigCrudIT : PluginRestTestCase() {

fun `test Create, Get, Update, Delete microsoft teams notification config using REST client`() {
// Create sample config request reference
val sampleMicrosoftTeams = MicrosoftTeams("https://domain.com/sample_microsoft_teams_url#1234567890")
val sampleMicrosoftTeams = MicrosoftTeams("https://domain.webhook.office.com/webhook2/test")
val referenceObject = NotificationConfig(
"this is a sample config name",
"this is a sample config description",
Expand Down Expand Up @@ -67,7 +67,7 @@ class MicrosoftTeamsNotificationConfigCrudIT : PluginRestTestCase() {
Thread.sleep(100)

// Updated notification config object
val updatedMicrosoftTeams = MicrosoftTeams("https://updated.domain.com/updated_microsoft_teams_url#0987654321")
val updatedMicrosoftTeams = MicrosoftTeams("https://updated.domain.webhook.office.com/webhook2/test")
val updatedObject = NotificationConfig(
"this is a updated config name",
"this is a updated config description",
Expand Down Expand Up @@ -126,7 +126,7 @@ class MicrosoftTeamsNotificationConfigCrudIT : PluginRestTestCase() {

fun `test Bad Request for multiple config data for microsoft teams using REST Client`() {
// Create sample config request reference
val sampleMicrosoftTeams = MicrosoftTeams("https://domain.com/sample_microsoft_teams_url#1234567890")
val sampleMicrosoftTeams = MicrosoftTeams("https://domain.webhook.office.com/1234567")
val referenceObject = NotificationConfig(
"this is a sample config name",
"this is a sample config description",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ internal class SendTestMessageRestHandlerIT : PluginRestTestCase() {
"config_type":"microsoft_teams",
"is_enabled":true,
"microsoft_teams":{
"url":"https://hooks.microsft_teams.com/services/xxx/xxx"
"url":"https://hooks.webhook.office.com/webhook2/abcde"
}
}
}
Expand Down

0 comments on commit 18c8af1

Please sign in to comment.