-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'es/master' into ccr
* es/master: (50 commits) Reject updates to the `_default_` mapping. (#29165) Improve similarity docs. (#29089) [Docs] Update api.asciidoc (#29166) Docs: Add note about missing mapping for doc values field (#29036) Fix BWC issue for PreSyncedFlushResponse Remove BytesArray and BytesReference usage from XContentFactory (#29151) Add pluggable XContentBuilder writers and human readable writers (#29120) Add unreleased version 6.2.4 (#29171) Add unreleased version 6.1.5 (#29168) Add a note about using the `retry_failed` flag before accepting data loss (#29160) Fix typo in percolate-query.asciidoc (#29155) Require HTTP::Tiny 0.070 for release notes script Set Java 9 checkstyle to depend on checkstyle conf (#28383) REST high-level client: add clear cache API (#28866) Docs: Add example of resetting index setting (#29048) Plugins: Fix module name conflict check for meta plugins (#29146) Build: Fix meta plugin bundled plugin names (#29147) Build: Simplify rest spec hack configuration (#29149) Build: Fix meta modules to not install as plugin in tests (#29150) Fix javadoc warning in Strings for missing parameter description ...
- Loading branch information
Showing
149 changed files
with
2,711 additions
and
1,181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 0 additions & 78 deletions
78
buildSrc/src/main/groovy/org/elasticsearch/gradle/test/RestSpecHack.groovy
This file was deleted.
Oops, something went wrong.
50 changes: 50 additions & 0 deletions
50
buildSrc/src/test/groovy/org/elasticsearch/gradle/doc/RestTestsFromSnippetsTaskTest.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Licensed to Elasticsearch under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
package org.elasticsearch.gradle.doc | ||
|
||
import org.elasticsearch.gradle.doc.SnippetsTask.Snippet | ||
import org.gradle.api.InvalidUserDataException | ||
|
||
import static org.elasticsearch.gradle.doc.RestTestsFromSnippetsTask.replaceBlockQuote | ||
|
||
class RestTestFromSnippetsTaskTest extends GroovyTestCase { | ||
void testInvalidBlockQuote() { | ||
String input = "\"foo\": \"\"\"bar\""; | ||
String message = shouldFail({ replaceBlockQuote(input) }); | ||
assertEquals("Invalid block quote starting at 7 in:\n$input", message); | ||
} | ||
|
||
void testSimpleBlockQuote() { | ||
assertEquals("\"foo\": \"bort baz\"", | ||
replaceBlockQuote("\"foo\": \"\"\"bort baz\"\"\"")); | ||
} | ||
|
||
void testMultipleBlockQuotes() { | ||
assertEquals("\"foo\": \"bort baz\", \"bar\": \"other\"", | ||
replaceBlockQuote("\"foo\": \"\"\"bort baz\"\"\", \"bar\": \"\"\"other\"\"\"")); | ||
} | ||
|
||
void testEscapingInBlockQuote() { | ||
assertEquals("\"foo\": \"bort\\\" baz\"", | ||
replaceBlockQuote("\"foo\": \"\"\"bort\" baz\"\"\"")); | ||
assertEquals("\"foo\": \"bort\\n baz\"", | ||
replaceBlockQuote("\"foo\": \"\"\"bort\n baz\"\"\"")); | ||
} | ||
} |
Oops, something went wrong.