From 3d89cc20c03598a8fc7c6c94f93debf957106aab Mon Sep 17 00:00:00 2001 From: Aniruddh <63553175+noir01@users.noreply.github.com> Date: Fri, 10 Nov 2023 01:33:21 -0500 Subject: [PATCH] Replaced wrongly formatted dummy Slack URL with properly formatted dummy Slack URL Signed-off-by: Aniruddh Srivastava --- .../integtest/config/ChimeNotificationConfigCrudIT.kt | 2 +- .../integtest/config/CreateNotificationConfigIT.kt | 2 +- .../integtest/config/SlackNotificationConfigCrudIT.kt | 6 +++--- .../integtest/config/WebhookNotificationConfigCrudIT.kt | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/notifications/notifications/src/test/kotlin/org/opensearch/integtest/config/ChimeNotificationConfigCrudIT.kt b/notifications/notifications/src/test/kotlin/org/opensearch/integtest/config/ChimeNotificationConfigCrudIT.kt index 3707bb83..6b6d17e0 100644 --- a/notifications/notifications/src/test/kotlin/org/opensearch/integtest/config/ChimeNotificationConfigCrudIT.kt +++ b/notifications/notifications/src/test/kotlin/org/opensearch/integtest/config/ChimeNotificationConfigCrudIT.kt @@ -190,7 +190,7 @@ class ChimeNotificationConfigCrudIT : PluginRestTestCase() { "description":"this is a updated config description", "config_type":"slack", "is_enabled":"true", - "slack":{"url":"https://updated.domain.com/updated_slack_url#0987654321"} + "slack":{"url":"https://hooks.slack.com/services/A123456/B1234567/A1B2C3D4E5F6G7H8I9J0K1L2"} } } """.trimIndent() diff --git a/notifications/notifications/src/test/kotlin/org/opensearch/integtest/config/CreateNotificationConfigIT.kt b/notifications/notifications/src/test/kotlin/org/opensearch/integtest/config/CreateNotificationConfigIT.kt index 64805e9d..3428c017 100644 --- a/notifications/notifications/src/test/kotlin/org/opensearch/integtest/config/CreateNotificationConfigIT.kt +++ b/notifications/notifications/src/test/kotlin/org/opensearch/integtest/config/CreateNotificationConfigIT.kt @@ -27,7 +27,7 @@ class CreateNotificationConfigIT : PluginRestTestCase() { fun `test Create slack notification config`() { // 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", diff --git a/notifications/notifications/src/test/kotlin/org/opensearch/integtest/config/SlackNotificationConfigCrudIT.kt b/notifications/notifications/src/test/kotlin/org/opensearch/integtest/config/SlackNotificationConfigCrudIT.kt index 86c64cf2..0b650c99 100644 --- a/notifications/notifications/src/test/kotlin/org/opensearch/integtest/config/SlackNotificationConfigCrudIT.kt +++ b/notifications/notifications/src/test/kotlin/org/opensearch/integtest/config/SlackNotificationConfigCrudIT.kt @@ -19,7 +19,7 @@ class SlackNotificationConfigCrudIT : PluginRestTestCase() { fun `test Create, Get, Update, Delete slack notification config using REST client`() { // 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", @@ -67,7 +67,7 @@ class SlackNotificationConfigCrudIT : PluginRestTestCase() { Thread.sleep(100) // Updated notification config object - val updatedSlack = Slack("https://updated.domain.com/updated_slack_url#0987654321") + val updatedSlack = Slack("https://hooks.slack.com/services/A654321/B7654321/L2K9J4I6H9G5F3E2D8C2B7A4") val updatedObject = NotificationConfig( "this is a updated config name", "this is a updated config description", @@ -126,7 +126,7 @@ class SlackNotificationConfigCrudIT : PluginRestTestCase() { fun `test Bad Request for multiple config data for Slack using REST Client`() { // 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", diff --git a/notifications/notifications/src/test/kotlin/org/opensearch/integtest/config/WebhookNotificationConfigCrudIT.kt b/notifications/notifications/src/test/kotlin/org/opensearch/integtest/config/WebhookNotificationConfigCrudIT.kt index 893a64fe..50076370 100644 --- a/notifications/notifications/src/test/kotlin/org/opensearch/integtest/config/WebhookNotificationConfigCrudIT.kt +++ b/notifications/notifications/src/test/kotlin/org/opensearch/integtest/config/WebhookNotificationConfigCrudIT.kt @@ -159,7 +159,7 @@ class WebhookNotificationConfigCrudIT : PluginRestTestCase() { "description":"${referenceObject.description}", "config_type":"webhook", "is_enabled":${referenceObject.isEnabled}, - "slack":{"url":"https://dummy.com"} + "slack":{"url":"https://hooks.slack.com/services/A123456/B1234567/A1B2C3D4E5F6G7H8I9J0K1L2"} "webhook":{"url":"${(referenceObject.configData as Webhook).url}"} } }