Class DoSection
java.lang.Object
org.opensearch.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: - Stuff is deprecated, yo - Don't use deprecated stuff - Please, stop. It hurts. allowed_warnings: - Maybe this warning shows up - But it isn't actually required for the test to pass. update: index: test_1 type: test id: 1 body: { doc: { foo: bar } }
-
Field Summary
Fields inherited from interface org.opensearch.test.rest.yaml.section.ExecutableSection
DEFAULT_EXECUTABLE_CONTEXTS, XCONTENT_REGISTRY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(ClientYamlTestExecutionContext executionContext) Executes the section passing in the execution contextgetCatch()org.opensearch.core.xcontent.XContentLocationGet the location in the test that this was defined.static DoSectionparse(org.opensearch.core.xcontent.XContentParser parser) void
-
Constructor Details
-
DoSection
public DoSection(org.opensearch.core.xcontent.XContentLocation location)
-
-
Method Details
-
parse
public static DoSection parse(org.opensearch.core.xcontent.XContentParser parser) throws IOException - Throws:
IOException
-
getCatch
-
setCatch
-
getApiCallSection
-
getLocation
public org.opensearch.core.xcontent.XContentLocation getLocation()Description copied from interface:ExecutableSectionGet the location in the test that this was defined.- Specified by:
getLocationin interfaceExecutableSection
-
execute
Description copied from interface:ExecutableSectionExecutes the section passing in the execution context- Specified by:
executein interfaceExecutableSection- Throws:
IOException
-