mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-22 12:56:53 +00:00
#46180 added support for the `[source,console]` language for snippets which should be tested. This removes support for the `// CONSOLE` magic comment, which serve a similar purpose. Snippets that include the `// CONSOLE` magic comment will return an exception.
This commit is contained in:
parent
d5f396fe55
commit
365aa30b7f
@ -206,8 +206,11 @@ public class RestTestsFromSnippetsTask extends SnippetsTask {
|
||||
response(snippet)
|
||||
return
|
||||
}
|
||||
if (snippet.test || snippet.console ||
|
||||
snippet.language == 'console') {
|
||||
if ((snippet.language == 'js') && (snippet.console)) {
|
||||
throw new InvalidUserDataException(
|
||||
"$snippet: Use `[source,console]` instead of `// CONSOLE`.")
|
||||
}
|
||||
if (snippet.test || snippet.language == 'console') {
|
||||
test(snippet)
|
||||
previousTest = snippet
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user