Skip to content

Commit

Permalink
Replaced more wrongly formatted dummy Slack URL with properly formatt…
Browse files Browse the repository at this point in the history
…ed dummy Slack URL

Signed-off-by: Aniruddh Srivastava <[email protected]>
  • Loading branch information
Noir01 committed Nov 13, 2023
1 parent 4230fb9 commit 8ee2339
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ fun getCreateNotificationRequestJsonString(
.joinToString("")
val configObjectString = when (configType) {
ConfigType.SLACK -> """
"slack":{"url":"https://slack.domain.com/sample_slack_url#$randomString"}
"slack":{"url":"https://hooks.slack.com/services/A123456/B1234567/A1B2C3D4E5F6G7H8I9J0K1L2#$randomString"}
""".trimIndent()
ConfigType.CHIME -> """
"chime":{"url":"https://chime.domain.com/sample_chime_url#$randomString"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class SecurityNotificationIT : PluginRestTestCase() {
createUserWithCustomRole(user, password, NOTIFICATION_CREATE_CONFIG_ACCESS, "", ROLE_TO_PERMISSION_MAPPING[NOTIFICATION_CREATE_CONFIG_ACCESS])

// Create sample config request reference
val sampleSlack = Slack("https://domain.com/sample_slack_url#1234567890")
val sampleSlack = Slack("https://hooks.slack.com/services/A123456/B1234567/A1B2C3D4E5F6G7H8I9J0K1L2")
val referenceObject = NotificationConfig(
"this is a sample config name",
"this is a sample config description",
Expand Down Expand Up @@ -97,7 +97,7 @@ class SecurityNotificationIT : PluginRestTestCase() {
createUserWithCustomRole(user, password, NOTIFICATION_NO_ACCESS_ROLE, "", ROLE_TO_PERMISSION_MAPPING[NOTIFICATION_NO_ACCESS_ROLE])

// Create sample config request reference
val sampleSlack = Slack("https://domain.com/sample_slack_url#1234567890")
val sampleSlack = Slack("https://hooks.slack.com/services/A123456/B1234567/A1B2C3D4E5F6G7H8I9J0K1L2")
val referenceObject = NotificationConfig(
"this is a sample config name",
"this is a sample config description",
Expand Down Expand Up @@ -133,7 +133,7 @@ class SecurityNotificationIT : PluginRestTestCase() {
createUserWithCustomRole(user, password, NOTIFICATION_UPDATE_CONFIG_ACCESS, "", ROLE_TO_PERMISSION_MAPPING[NOTIFICATION_UPDATE_CONFIG_ACCESS])

// Create sample config request reference
val sampleSlack = Slack("https://domain.com/sample_slack_url#1234567890")
val sampleSlack = Slack("https://hooks.slack.com/services/A123456/B1234567/A1B2C3D4E5F6G7H8I9J0K1L2")
val referenceObject = NotificationConfig(
"this is a sample config name",
"this is a sample config description",
Expand Down Expand Up @@ -210,7 +210,7 @@ class SecurityNotificationIT : PluginRestTestCase() {
createUserWithCustomRole(user, password, NOTIFICATION_NO_ACCESS_ROLE, "", ROLE_TO_PERMISSION_MAPPING[NOTIFICATION_NO_ACCESS_ROLE])

// Create sample config request reference
val sampleSlack = Slack("https://domain.com/sample_slack_url#1234567890")
val sampleSlack = Slack("https://hooks.slack.com/services/A123456/B1234567/A1B2C3D4E5F6G7H8I9J0K1L2")
val referenceObject = NotificationConfig(
"this is a sample config name",
"this is a sample config description",
Expand Down Expand Up @@ -246,7 +246,7 @@ class SecurityNotificationIT : PluginRestTestCase() {
createUserWithCustomRole(user, password, NOTIFICATION_GET_CONFIG_ACCESS, "", ROLE_TO_PERMISSION_MAPPING[NOTIFICATION_GET_CONFIG_ACCESS])

// Create sample config request reference
val sampleSlack = Slack("https://domain.com/sample_slack_url#1234567890")
val sampleSlack = Slack("https://hooks.slack.com/services/A123456/B1234567/A1B2C3D4E5F6G7H8I9J0K1L2")
val referenceObject = NotificationConfig(
"this is a sample config name",
"this is a sample config description",
Expand Down Expand Up @@ -302,7 +302,7 @@ class SecurityNotificationIT : PluginRestTestCase() {
createUserWithCustomRole(user, password, NOTIFICATION_DELETE_CONFIG_ACCESS, "", ROLE_TO_PERMISSION_MAPPING[NOTIFICATION_DELETE_CONFIG_ACCESS])

// Create sample config request reference
val sampleSlack = Slack("https://domain.com/sample_slack_url#1234567890")
val sampleSlack = Slack("https://hooks.slack.com/services/A123456/B1234567/A1B2C3D4E5F6G7H8I9J0K1L2")
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 @@ -142,7 +142,7 @@ class ChimeNotificationConfigCrudIT : PluginRestTestCase() {
"description":"${referenceObject.description}",
"config_type":"chime",
"is_enabled":${referenceObject.isEnabled},
"slack":{"url":"https://dummy.com"}
"slack":{"url":"https://hooks.slack.com/services/A123456/B1234567/A1B2C3D4E5F6G7H8I9J0K1L2"}
"chime":{"url":"${(referenceObject.configData as Chime).url}"}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ class EmailNotificationConfigCrudIT : PluginRestTestCase() {
"description":"${smtpAccountConfig.description}",
"config_type":"smtp_account",
"is_enabled":${smtpAccountConfig.isEnabled},
"slack": {"url": "https://dummy.com"},
"slack": {"url": "https://hooks.slack.com/services/A123456/B1234567/A1B2C3D4E5F6G7H8I9J0K1L2"},
"smtp_account":{
"host":"${sampleSmtpAccount.host}",
"port":"${sampleSmtpAccount.port}",
Expand Down Expand Up @@ -948,7 +948,7 @@ class EmailNotificationConfigCrudIT : PluginRestTestCase() {
"description":"${emailConfig.description}",
"config_type":"email",
"is_enabled":${emailConfig.isEnabled},
"slack":{"url": "https://dummy.com"},
"slack":{"url": "https://hooks.slack.com/services/A123456/B1234567/A1B2C3D4E5F6G7H8I9J0K1L2"},
"email":{
"email_account_id":"${sampleEmail.emailAccountID}",
"default_recipients":[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ internal class NotificationConfigDocTests {
createdTimeMs,
listOf("br1", "br2", "br3")
)
val sampleSlack = Slack("https://domain.com/sample_url#1234567890")
val sampleSlack = Slack("https://hooks.slack.com/services/A123456/B1234567/A1B2C3D4E5F6G7H8I9J0K1L2")
val config = NotificationConfig(
"name",
"description",
Expand Down

0 comments on commit 8ee2339

Please sign in to comment.