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

[Custom threshold] Add an adHoc data view API integration test #171508

Merged
merged 3 commits into from
Nov 20, 2023

Conversation

maryam-saeidi
Copy link
Member

Closes #170438

Summary

This PR adds an ad hoc data view API integration test by changing one of the existing custom threshold API integration tests.

@maryam-saeidi maryam-saeidi added the release_note:skip Skip the PR/issue when compiling release notes label Nov 20, 2023
@maryam-saeidi maryam-saeidi self-assigned this Nov 20, 2023
@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@@ -64,5 +64,8 @@ export async function createRule<Params = ThresholdParams>({
rule_type_id: ruleTypeId,
actions,
});
if (body.statusCode && body.statusCode !== 200) {
throw new Error(body.message);
Copy link
Member Author

Choose a reason for hiding this comment

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

In case of an error, the message was not visible in logs, so I added this condition to surface the error message.

@maryam-saeidi maryam-saeidi marked this pull request as ready for review November 20, 2023 11:33
@maryam-saeidi maryam-saeidi requested a review from a team as a code owner November 20, 2023 11:33
Comment on lines +42 to +52
const MOCKED_AD_HOC_DATA_VIEW = {
id: DATA_VIEW_ID,
title: DATE_VIEW,
timeFieldName: '@timestamp',
sourceFilters: [],
fieldFormats: {},
runtimeFieldMap: {},
allowNoIndex: false,
name: DATE_VIEW_NAME,
allowHidden: false,
};
Copy link
Contributor

Choose a reason for hiding this comment

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

might be worth using this util from data plugin createStubDataView

Copy link
Member Author

Choose a reason for hiding this comment

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

Update

I tried it but got this error:

image

Copy link
Contributor

@shahzad31 shahzad31 left a comment

Choose a reason for hiding this comment

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

Generally looks good, provided two suggestions !!

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @maryam-saeidi

@maryam-saeidi maryam-saeidi merged commit 8fd18fb into elastic:main Nov 20, 2023
@maryam-saeidi maryam-saeidi deleted the 170438-add-adHoc-test branch November 20, 2023 19:21
@kibanamachine kibanamachine added v8.12.0 backport:skip This commit does not require backporting labels Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Custom threshold] Add an API integration test for adHoc data view
5 participants