From 30df09fb5a760e240d621b99d75eb98094b69103 Mon Sep 17 00:00:00 2001 From: AWSHurneyt Date: Tue, 6 Feb 2024 10:28:38 -0800 Subject: [PATCH] Updated tests. Signed-off-by: AWSHurneyt --- .../commons/alerting/model/ClusterMetricsInputTests.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/kotlin/org/opensearch/commons/alerting/model/ClusterMetricsInputTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/model/ClusterMetricsInputTests.kt index d9dcd1f3..9980d5db 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/model/ClusterMetricsInputTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/model/ClusterMetricsInputTests.kt @@ -89,7 +89,7 @@ class ClusterMetricsInputTests { @Test fun `test url field and URI component fields with path params create equal URI`() { // GIVEN - path = "/_cluster/health/" + path = "/_cluster/health" pathParams = "index1,index2,index3,index4,index5" url = "http://localhost:9200/_cluster/health/index1,index2,index3,index4,index5" @@ -205,7 +205,7 @@ class ClusterMetricsInputTests { @Test fun `test parsePathParams with path params as URI field`() { // GIVEN - path = "/_cluster/health/" + path = "/_cluster/health" pathParams = "index1,index2,index3,index4,index5" val testUrl = "http://localhost:9200/_cluster/health/index1,index2,index3,index4,index5" val clusterMetricsInput = ClusterMetricsInput(path, pathParams, url) @@ -268,7 +268,7 @@ class ClusterMetricsInputTests { // WHEN + THEN assertFailsWith( - "The provided path parameters contain invalid characters or spaces. Please omit: " + "${ILLEGAL_PATH_PARAMETER_CHARACTERS.joinToString(" ")}" + "The provided path parameters contain invalid characters or spaces. Please omit: " + ILLEGAL_PATH_PARAMETER_CHARACTERS.joinToString(" ") ) { clusterMetricsInput.parsePathParams() } @@ -427,9 +427,9 @@ class ClusterMetricsInputTests { @Test fun `test parseEmptyFields populates empty url field when path and path_params are provided`() { // GIVEN - path = "/_cluster/health/" + path = "/_cluster/health" pathParams = "index1,index2,index3,index4,index5" - val testUrl = "http://localhost:9200$path$pathParams" + val testUrl = "http://localhost:9200$path/$pathParams" // WHEN val clusterMetricsInput = ClusterMetricsInput(path, pathParams, url)