Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add onboarding doc for smoke tests #5283

Merged
merged 3 commits into from
Feb 7, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion ONBOARDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Add the new plugin to the [opensearch-plugins meta](https://github.com/opensearc

### Onboard to Test Workflow

1. Update the test configuration file (use 1.3.0 as an example), [opensearch-1.3.0-test.yml](https://github.com/opensearch-project/opensearch-build/blob/opensearch-1.3.0/manifests/1.3.0/opensearch-1.3.0-test.yml), for a particular release, to include your plugin. This test configuration defines full suite of tests - `integ`, `bwc`, that can be run on the plugin.
1. Update the test configuration file (use 1.3.0 as an example), [opensearch-1.3.0-test.yml](https://github.com/opensearch-project/opensearch-build/blob/opensearch-1.3.0/manifests/1.3.0/opensearch-1.3.0-test.yml), for a particular release, to include your plugin. This test configuration defines full suite of tests - `integ`, `bwc`, `smoke` that can be run on the plugin.

2. For integration testing, the `test-workflow` runs integration tests available in the plugin repository. You will need to add `integ-test` config for your plugin in opensearch-1.3.0-test.yml, [example](https://github.com/opensearch-project/opensearch-build/blob/opensearch-1.3.0/manifests/1.3.0/opensearch-1.3.0-test.yml).

Expand All @@ -47,6 +47,13 @@ Add the new plugin to the [opensearch-plugins meta](https://github.com/opensearc

1. It supports two test configs - `with-security` and `without-security`, which runs test with security plugin enabled and disabled respectively. Choose one or both depending on what your plugin integration tests support.

4. For smoke testing, The test-workflow runs smoke tests defined in the [smoke_tests_spec](src/test_workflow/smoke_test/smoke_tests_spec) directory for each major OpenSearch version. The smoke tests are executed based on the API specification provided in the [OpenSearch API Specification](https://github.com/opensearch-project/opensearch-api-specification) repository.

1. The smoke test framework currently supports testing the OpenSearch distribution and its plugins. It ensures that core OpenSearch functionalities and plugin-specific APIs behave as expected before release.

2. You will need to add a distinct YAML file for your plugin in the appropriate major version directory under [smoke_tests_spec](src/test_workflow/smoke_test/smoke_tests_spec) and reference the file name in the test manifest for the corresponding component.

3. In the YAML file, specify the API path, HTTP method, request body as parameter and heading if `Content-Type` differs from the default `application/json`. Refer to an example test definition [here](src/test_workflow/smoke_test/smoke_tests_spec/2.x/opensearch.yml) for guidance.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to also point to api-specification repo guidelines for on-boarding?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we assume that plugins should already be onboarded to the API-spec repo and follow their own onboarding procedures. This isn't just specific to the smoke tests framework.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dblock is that a requirement for new plugins/components from api-specification side?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an ongoing issue in api-spec repo for adding missing API specs. opensearch-project/opensearch-api-specification#168


## Standalone Component Onboarding

Expand Down