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

Adds tests for Enterprise Search #84

Merged
merged 5 commits into from
Jul 9, 2024
Merged

Adds tests for Enterprise Search #84

merged 5 commits into from
Jul 9, 2024

Conversation

picandocodigo
Copy link
Member

@picandocodigo picandocodigo commented Jul 4, 2024

There are some new entsearch tests in the YAML Elasticsearch tests. They need the creation of two new users and roles. The users are created here as entsearch-user:entsearch-user-password with the role user: and entsearch-unprivileged:entsearch-unprivileged-password with the role unprivileged. The role definitions can be found here.

The build broke for the Ruby stack client and would need to be updated to address these failures. Instead, I'm going to skip those tests and migrate the tests here.

According to the generated report, we are back to (almost) 100% coverage for Serverless.
The three remaining APIs:

  • ml.flush_job - We have Investigate why flush_job is failing sometimes #31 for this.
  • security.update_api_key - This is a tricky one. I tried adding it to our API key tests, but it was erroring. The docs say: It’s not possible to use an API key as the authentication credential for this API. To update an API key, the owner user’s credentials are required. Our clients authenticate with API key, so I don't know if this would make sense to have this endpoint in the clients, as far as I understand, we can't use this API with API key? 🤷
  • tasks.get - is not available on Serverless: [410] api_not_available_exception - Request for uri [/_tasks/] with method [GET] exists but is not available when running in serverless mode

@picandocodigo picandocodigo force-pushed the entsearch branch 2 times, most recently from 7824b57 to 7a7b1a8 Compare July 4, 2024 15:35
@picandocodigo picandocodigo force-pushed the entsearch branch 2 times, most recently from 3a1c38c to 5969a3d Compare July 4, 2024 20:22
Copy link
Member

@JoshMock JoshMock left a comment

Choose a reason for hiding this comment

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

I haven't re-added connector APIs to my generator so I can't run these tests locally yet. Have we verified those APIs are ready for 8.15? In any case, the tests look good!

@picandocodigo
Copy link
Member Author

Thanks Josh! The Connectors APIs are currently marked as "beta" in master:
https://www.elastic.co/guide/en/elasticsearch/reference/master/connector-apis.html
They're available in the Ruby stack client and I generated the code to run these tests for Serverless (though I haven't merged them).

Ideally we shouldn't have to skip any tests with this new project, but I added that functionality to the new Ruby runner just in case. If I merge this, does it break the build for JS and others or can those tests be skipped if the APIs are not available?

@JoshMock
Copy link
Member

JoshMock commented Jul 9, 2024

Nope, merge away! I already added skips for those tests.

@picandocodigo picandocodigo merged commit 33fbfb1 into main Jul 9, 2024
2 checks passed
@picandocodigo picandocodigo deleted the entsearch branch July 9, 2024 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants