Skip to content

[FEATURE] Add support for sample extension(s) to run integration tests #120

@dbwiddis

Description

@dbwiddis

Is your feature request related to a problem?

Unit testing is unable to handle end-to-end "how does an extension respond to a REST request from OpenSearch". When writing "hello world" I relied on manually starting up the nodes and running the test myself.

As we expect developers to write new extensions we should make it as easy as possible for them to write REST integration tests ensuring OpenSearch REST requests interact appropriately with their Extension code.

What solution would you like?

The Anomaly Detector plugin's org.opensearch.ad.rest package has some REST ITs that would make good models. That's the easy part. There are a few calls to util functions that need to be evaluated in an extension context.

What alternatives have you considered?

Doing testing manually. This is not scalable, and more importantly, wouldn't help developers developing new extensions.

Do you have any additional context?

Need to also go through the request/response code already being used and ensure it's fully covered by unit tests.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesttestingUnit or integration testing

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions