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 basic GET tests for core and indices endpoints #616

Closed
wants to merge 43 commits into from

Conversation

brunoLloret
Copy link
Contributor

Description

Set of basic GET tests for various core and indices endpoints:

Added tests for core endpoints: _refresh, _remote/info, _script_context, and _script_language
Added tests for indices endpoints: _shard_stores and _template
Updated docker-compose.yml to include OpenSearch and OpenSearch Dashboards services
Minor updates to package.json and .gitignore

Issues Resolved

List any issues this PR will resolve, e.g. Closes [...].

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

This is great, thanks for filling some of these out!

  • Get rid of the extra docker compose, is Dashboards needed for these tests? We should probably think about introducing that separately, and otherwise it should go into tests/default.
  • Fix DCO, git commit --amend -s.
  • Rebase/squash your commits, will be easier to fix 1 commit for DCO.
  • Fix linter, npm run lint--fix, possibly more.
  • Make sure all tests pass.
  • Mark this as ready, let's merge it.

@@ -0,0 +1,69 @@
---
Copy link
Member

Choose a reason for hiding this comment

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

Delete this file, if you need a custom docker-compose it should be under tests/xyz.

.gitignore Outdated
@@ -19,3 +19,4 @@ build/
# coverage output
/coverage/

.env
Copy link
Member

Choose a reason for hiding this comment

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

Do you use a .env file with a tool? Maybe something we can recommend in dev guide for env variables?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I used it for setting my local environment and perhaps it does not make sense to add it for the remote repo's codebase. I think it can be removed for the remote repo although if you think it's good to document for the guidelines I can do it. Lmk!

Copy link
Member

Choose a reason for hiding this comment

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

I think it's definitely useful as a dev setup. We set environment variables all the time and this could be the recommended way of doing so. Make a separate PR for this change though and update the developer guide to use the dotenv setup.

@dblock dblock added the skip-changelog No need to update CHANGELOG. label Oct 16, 2024
Copy link
Contributor

Changes Analysis

Commit SHA: 43674a1
Comparing To SHA: 5dc65a5

API Changes

Summary

NO CHANGES

Report

The full API changes report is available at: https://github.com/opensearch-project/opensearch-api-specification/actions/runs/11372053324/artifacts/2065266855

API Coverage

Before After Δ
Covered (%) 588 (57.59 %) 588 (57.59 %) 0 (0 %)
Uncovered (%) 433 (42.41 %) 433 (42.41 %) 0 (0 %)
Unknown 29 29 0

brunoLloret and others added 8 commits October 17, 2024 08:40
plain GETs for ./tests/default/_core/ refresh.yaml, remote_info.yaml, script_context.yaml, and script_language.yaml; for ./tests/default/indices/ shard_stores.yaml, and template.yaml

gitignore

Remove .env from tracking and add it to .gitignore

BAdd local Docker Compose file to .gitignore

Signed-off-by: Bruno Lloret <[email protected]>
integration docker yaml with remote repo fetched
plain GETs for ./tests/default/_core/ refresh.yaml, remote_info.yaml, script_context.yaml, and script_language.yaml; for ./tests/default/indices/ shard_stores.yaml, and template.yaml

gitignore

Remove .env from tracking and add it to .gitignore

BAdd local Docker Compose file to .gitignore

Signed-off-by: Bruno Lloret <[email protected]>
@dblock
Copy link
Member

dblock commented Oct 17, 2024

@brunoLloret lmk if you need help, I'm dblock on the OpenSearch public slack (https://opensearch.org/slack.html)

brunoLloret and others added 3 commits October 17, 2024 10:44
- Added tests for core endpoints: _refresh, _remote/info, _script_context
- Added test for indices endpoint: _template
- Removed tests for _script_language and _shard_stores due to API unfamiliarity
- Cleaned up local environment files

Signed-off-by: Bruno Lloret <[email protected]>
Add basic GET tests for core and indices endpoints
@brunoLloret
Copy link
Contributor Author

@brunoLloret lmk if you need help, I'm dblock on the OpenSearch public slack (https://opensearch.org/slack.html)

Hey! I tried to join the OpenSearch public Slack using the link you provided (https://opensearch.org/slack.html), but it says the link is no longer active. Do you know if there's an updated link or another way to join the Slack workspace?

@dblock
Copy link
Member

dblock commented Oct 17, 2024

@brunoLloret lmk if you need help, I'm dblock on the OpenSearch public slack (https://opensearch.org/slack.html)

Hey! I tried to join the OpenSearch public Slack using the link you provided (https://opensearch.org/slack.html), but it says the link is no longer active. Do you know if there's an updated link or another way to join the Slack workspace?

Uh oh, @krisfreedain?

@krisfreedain
Copy link
Member

Thanks for letting us know! I'll work to get it resolved ASAP

brunoLloret and others added 6 commits October 17, 2024 15:23
Signed-off-by: Bruno Lloret <[email protected]>
Signed-off-by: Bruno Lloret <[email protected]>
Signed-off-by: Bruno Lloret <[email protected]>
* Allow shortcut specifying InlineScript as just a string

Signed-off-by: Thomas Farr <[email protected]>

* Add test

Signed-off-by: Thomas Farr <[email protected]>

* Allow arbitrary script language

Signed-off-by: Thomas Farr <[email protected]>

---------

Signed-off-by: Thomas Farr <[email protected]>
Signed-off-by: Bruno Lloret <[email protected]>
Signed-off-by: dblock <[email protected]>
Signed-off-by: Bruno Lloret <[email protected]>
dblock and others added 20 commits October 17, 2024 16:14
* fix spec snapshot endpoint

Signed-off-by: Tatsuya Kawakami <[email protected]>

* fix lint and add changelog

Signed-off-by: Tatsuya Kawakami <[email protected]>

---------

Signed-off-by: Tatsuya Kawakami <[email protected]>
Signed-off-by: Bruno Lloret <[email protected]>
* update with accurate numeric type for common, core

Signed-off-by: amberzsy <[email protected]>

* add changelog

Signed-off-by: amberzsy <[email protected]>

* update explian value field with 'General Number'

Signed-off-by: amberzsy <[email protected]>

---------

Signed-off-by: amberzsy <[email protected]>
Signed-off-by: Bruno Lloret <[email protected]>
- Added tests for core endpoints: _refresh, _remote/info, _script_context
- Added test for indices endpoint: _template
- Removed tests for _script_language and _shard_stores due to API unfamiliarity
- Cleaned up local environment files

Signed-off-by: Bruno Lloret <[email protected]>
plain GETs for ./tests/default/_core/ refresh.yaml, remote_info.yaml, script_context.yaml, and script_language.yaml; for ./tests/default/indices/ shard_stores.yaml, and template.yaml

gitignore

Remove .env from tracking and add it to .gitignore

Add local Docker Compose file to .gitignore

Signed-off-by: Bruno Lloret <[email protected]>
* fix snapshot restore and recovery endpoint

Signed-off-by: Tatsuya Kawakami <[email protected]>

* add changelog

Signed-off-by: Tatsuya Kawakami <[email protected]>

* Fixed index naming, description and changelog

Signed-off-by: Tatsuya Kawakami <[email protected]>

---------

Signed-off-by: Tatsuya Kawakami <[email protected]>
Signed-off-by: Bruno Lloret <[email protected]>
* Edit msearch parameters descriptions

Signed-off-by: Archer <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>

---------

Signed-off-by: Archer <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Bruno Lloret <[email protected]>
plain GETs for ./tests/default/_core/ refresh.yaml, remote_info.yaml, script_context.yaml, and script_language.yaml; for ./tests/default/indices/ shard_stores.yaml, and template.yaml

gitignore

Remove .env from tracking and add it to .gitignore

BAdd local Docker Compose file to .gitignore

Signed-off-by: Bruno Lloret <[email protected]>
… script_context.yaml, and script_language.yaml; for ./tests/default/indices/ shard_stores.yaml, and template.yaml

Signed-off-by: Bruno Lloret <[email protected]>
Signed-off-by: Bruno Lloret <[email protected]>
Signed-off-by: Bruno Lloret <[email protected]>
Signed-off-by: Bruno Lloret <[email protected]>
Signed-off in all previous commits resolved. .env and docker-compose.yml removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog No need to update CHANGELOG.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants