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

[8.x] [Data Usage] setup integration tests (#197112) #199305

Merged
merged 6 commits into from
Nov 7, 2024

Conversation

ashokaditya
Copy link
Member

@ashokaditya ashokaditya commented Nov 7, 2024

Warning

The following files were updated as a result of merge conflicts that should be reviewed

  • /x-pack/test_serverless/api_integration/test_suites/security/config.ts
  • /x-pack/test_serverless/functional/test_suites/search/config.ts
  • /x-pack/test_serverless/tsconfig.json

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

## Summary

Adds serverless api integration tests and basic functional smoke test
for data usage plugin

Both are skipped in mki until `xpack.dataUsage.enabled` is enabled by
default in serverless

### `GET /internal/api/data_usage/data_streams`

### `POST /internal/api/data_usage/metrics`
- skipped in MKI because we'll need to make sure real credentials are
being used via the `xpack.dataUsage.autoops*`
- we start a mock server at localhost:9000 and set that the config
(`xpack.dataUsage.autoops.api.url=http://localhost:9000'`) along with
fake credentials for the other `xpack.dataUsage.autoops*` values. If
we're not in MKI these values will be used and the mock server will
respond to the request at `http://localhost:9000`. If we are in MKI, the
real values and credentials should be set, otherwise it will fail as
these kibana config values in the tests are not passed into the MKI
environment.

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 4f9ab47)

# Conflicts:
#	x-pack/test_serverless/api_integration/test_suites/security/config.ts
#	x-pack/test_serverless/functional/test_suites/search/config.ts
#	x-pack/test_serverless/tsconfig.json
@ashokaditya ashokaditya requested review from a team as code owners November 7, 2024 12:42
@ashokaditya ashokaditya requested review from a team as code owners November 7, 2024 12:42
@ashokaditya ashokaditya enabled auto-merge (squash) November 7, 2024 12:42
@ashokaditya ashokaditya requested a review from neptunian November 7, 2024 12:44
Copy link
Member

@wayneseymour wayneseymour left a comment

Choose a reason for hiding this comment

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

LGTM, based on non backport review from @pheyos

@ashokaditya ashokaditya disabled auto-merge November 7, 2024 12:46
@ashokaditya ashokaditya requested a review from neptunian November 7, 2024 12:48
@ashokaditya ashokaditya enabled auto-merge (squash) November 7, 2024 15:58
@ashokaditya ashokaditya merged commit c4a5ebf into elastic:8.x Nov 7, 2024
23 checks passed
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] x-pack/test/alerting_api_integration/security_and_spaces/group1/config.ts / alerting api integration security and spaces enabled Alerts - Group 1 alerts backfill rule runs schedule backfill space_1_all at space1 should handle schedule request where some requests succeed and some requests fail appropriately

Metrics [docs]

✅ unchanged

@ashokaditya ashokaditya deleted the backport/8.x/pr-197112 branch November 7, 2024 18:03
@ashokaditya ashokaditya restored the backport/8.x/pr-197112 branch November 7, 2024 18:31
@ashokaditya ashokaditya deleted the backport/8.x/pr-197112 branch November 7, 2024 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants