diff --git a/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/30_camel_case_dateformat.yml b/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/30_camel_case_dateformat.yml index 119fcf33c036f..66c0f400ebb5d 100644 --- a/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/30_camel_case_dateformat.yml +++ b/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/30_camel_case_dateformat.yml @@ -1,5 +1,5 @@ --- -"Create index with camel case on date format (allowed with warning prior to 2.12.0)": +"Create index with camel case date format (allowed with warning prior to 2.12.0)": - skip: version: "2.12.0 - " reason: "at version 2.12.0, camel case date format is not allowed" @@ -40,14 +40,14 @@ - match: { hits.total: 1 } --- -"Create index with camel case date format (when bwc version is > 8.0.0)": +"Create index with camel case date format (when version is >= 2.12.0)": - skip: version: " - 2.11.99" reason: "at version 2.12.0, camel case date format is not allowed" features: "warnings" - do: indices.create: - index: camel_case_on_format + index: camel_case_date_format body: settings: index: @@ -69,7 +69,7 @@ - do: search: rest_total_hits_as_int: true - index: camel_case_on_format + index: camel_case_date_format body: query: range: diff --git a/server/src/test/java/org/opensearch/cluster/metadata/DateMathExpressionResolverTests.java b/server/src/test/java/org/opensearch/cluster/metadata/DateMathExpressionResolverTests.java index bdd739bf04e15..20137c7316333 100644 --- a/server/src/test/java/org/opensearch/cluster/metadata/DateMathExpressionResolverTests.java +++ b/server/src/test/java/org/opensearch/cluster/metadata/DateMathExpressionResolverTests.java @@ -208,6 +208,9 @@ public void testExpression_CustomTimeZoneInIndexName() throws Exception { } else { hoursOffset = randomIntBetween(-11, 13); minutesOffset = randomIntBetween(0, 59); + if (hoursOffset < 0) { + minutesOffset = -minutesOffset; + } timeZone = ZoneOffset.ofHoursMinutes(hoursOffset, minutesOffset); } ZonedDateTime now;