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

FTR - update common serverless API tests to use API keys #180834

Open
18 tasks
pheyos opened this issue Apr 15, 2024 · 1 comment
Open
18 tasks

FTR - update common serverless API tests to use API keys #180834

pheyos opened this issue Apr 15, 2024 · 1 comment
Assignees
Labels
Team:QA Team label for QA Team

Comments

@pheyos
Copy link
Member

pheyos commented Apr 15, 2024

Serverless API tests should run with API keys (as that's how the users are supposed to use the APIs in serverless).

Support and an example have been added already: #178558
See also the example in the README: https://github.com/elastic/kibana/blob/main/x-pack/test_serverless/README.md#api-integration-test-example

We want to update the common tests and figure out the minimum required role.
Similar to what have been done for the UI side in #176221

Folders from x-pack/test_serverless/api_integration/test_suites/common/

Tasks

@botelastic botelastic bot added the needs-team Issues missing a team label label Apr 15, 2024
@wayneseymour wayneseymour added the Team:QA Team label for QA Team label Apr 16, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-qa (Team:QA)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Apr 16, 2024
wayneseymour added a commit that referenced this issue May 15, 2024
…181741)

## Summary

Contributes to: #180834

Update the below common tests, and figure out the minimum required role.

### More Info

 - Add type for `InternalRequestHeader`
 - Add type for `SupertestWithoutAuth`
- Add shortcut method: `createApiKeyForDefaultRole` to `Serverless User
Manager` service
 - Change all calls of `await supertest` to `await supertestWithoutAuth`
- Add Internal Request and Role Credential headers to every `await
supertestWithoutAuth` http call
- Use the lowest role credential possible for all calls, whether
`viewer`, `editor`, `developer`, or `admin`

### Covers these folders:
`x-pack/test_serverless/api_integration/test_suites/common/console`
`x-pack/test_serverless/api_integration/test_suites/common/core`

`x-pack/test_serverless/api_integration/test_suites/common/data_view_field_editor`

`x-pack/test_serverless/api_integration/test_suites/common/elasticsearch_api`

`x-pack/test_serverless/api_integration/test_suites/common/grok_debugger`

`x-pack/test_serverless/api_integration/test_suites/common/kql_telemetry`

`x-pack/test_serverless/api_integration/test_suites/common/scripts_tests`

`x-pack/test_serverless/api_integration/test_suites/common/search_profiler`
`x-pack/test_serverless/api_integration/test_suites/common/search_xpack`

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:QA Team label for QA Team
Projects
None yet
Development

No branches or pull requests

3 participants