Class DoSection
java.lang.Object
org.elasticsearch.test.rest.yaml.section.DoSection
- All Implemented Interfaces:
ExecutableSection
Represents a do section:
- do:
catch: missing
headers:
Authorization: Basic user:pass
Content-Type: application/json
warnings|warnings_regex:
- Stuff is deprecated, yo
- Don't use deprecated stuff
- Please, stop. It hurts.
- The non _regex version exact matches against the warning text and no need to worry about escaped quotes or backslashes
- The _regex version matches against the raw value of the warning text which may include backlashes and quotes escaped
allowed_warnings|allowed_warnings_regex:
- Maybe this warning shows up
- But it isn't actually required for the test to pass.
- The non _regex version should be preferred for simplicity and performance.
update:
index: test_1
type: test
id: 1
body: { doc: { foo: bar } }
-
Field Summary
Fields inherited from interface org.elasticsearch.test.rest.yaml.section.ExecutableSection
DEFAULT_EXECUTABLE_CONTEXTS, XCONTENT_REGISTRY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute(ClientYamlTestExecutionContext executionContext)
Executes the section passing in the execution contextgetCatch()
org.elasticsearch.common.xcontent.XContentLocation
Get the location in the test that this was defined.static DoSection
parse(org.elasticsearch.common.xcontent.XContentParser parser)
void
-
Constructor Details
-
DoSection
public DoSection(org.elasticsearch.common.xcontent.XContentLocation location)
-
-
Method Details
-
parse
public static DoSection parse(org.elasticsearch.common.xcontent.XContentParser parser) throws IOException- Throws:
IOException
-
getCatch
-
setCatch
-
getApiCallSection
-
getLocation
public org.elasticsearch.common.xcontent.XContentLocation getLocation()Description copied from interface:ExecutableSection
Get the location in the test that this was defined.- Specified by:
getLocation
in interfaceExecutableSection
-
execute
Description copied from interface:ExecutableSection
Executes the section passing in the execution context- Specified by:
execute
in interfaceExecutableSection
- Throws:
IOException
-