Class DoSection
- java.lang.Object
-
- org.elasticsearch.test.rest.yaml.section.DoSection
-
- All Implemented Interfaces:
ExecutableSection
public class DoSection extends java.lang.Object implements ExecutableSection
Represents a do section: - do: catch: missing headers: Authorization: Basic user:pass Content-Type: application/json warnings: - Stuff is deprecated, yo - Don't use deprecated stuff - Please, stop. It hurts. 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 Constructor Description DoSection(XContentLocation location)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(ClientYamlTestExecutionContext executionContext)
Executes the section passing in the execution contextApiCallSection
getApiCallSection()
java.lang.String
getCatch()
java.util.List<java.lang.String>
getExpectedWarningHeaders()
Warning headers that we expect from this response.XContentLocation
getLocation()
Get the location in the test that this was defined.static DoSection
parse(XContentParser parser)
void
setApiCallSection(ApiCallSection apiCallSection)
void
setCatch(java.lang.String catchParam)
void
setExpectedWarningHeaders(java.util.List<java.lang.String> expectedWarningHeaders)
Set the warning headers that we expect from this response.
-
-
-
Constructor Detail
-
DoSection
public DoSection(XContentLocation location)
-
-
Method Detail
-
parse
public static DoSection parse(XContentParser parser) throws java.io.IOException
- Throws:
java.io.IOException
-
getCatch
public java.lang.String getCatch()
-
setCatch
public void setCatch(java.lang.String catchParam)
-
getApiCallSection
public ApiCallSection getApiCallSection()
-
setApiCallSection
public void setApiCallSection(ApiCallSection apiCallSection)
-
getExpectedWarningHeaders
public java.util.List<java.lang.String> getExpectedWarningHeaders()
Warning headers that we expect from this response. If the headers don't match exactly this request is considered to have failed. Defaults to emptyList.
-
setExpectedWarningHeaders
public void setExpectedWarningHeaders(java.util.List<java.lang.String> expectedWarningHeaders)
Set the warning headers that we expect from this response. If the headers don't match exactly this request is considered to have failed. Defaults to emptyList.
-
getLocation
public XContentLocation getLocation()
Description copied from interface:ExecutableSection
Get the location in the test that this was defined.- Specified by:
getLocation
in interfaceExecutableSection
-
execute
public void execute(ClientYamlTestExecutionContext executionContext) throws java.io.IOException
Description copied from interface:ExecutableSection
Executes the section passing in the execution context- Specified by:
execute
in interfaceExecutableSection
- Throws:
java.io.IOException
-
-