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

[RAM] Add integration tests for all-space global logs view #144732

Closed
Zacqary opened this issue Nov 7, 2022 · 1 comment · Fixed by #145192
Closed

[RAM] Add integration tests for all-space global logs view #144732

Zacqary opened this issue Nov 7, 2022 · 1 comment · Fixed by #145192
Assignees
Labels
Feature:Alerting/RulesManagement Issues related to the Rules Management UX Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) test v8.6.0

Comments

@Zacqary
Copy link
Contributor

Zacqary commented Nov 7, 2022

For new capabilities added in #140449, make sure these are covered by integration tests.

  • Ensure that the global logs switch shows up for users who have permissions to see it, and doesn't show up for users without these permissions
  • Add API integration tests for global execution logs and error logs routes, focusing on pulling logs from alternate namespaces
@Zacqary Zacqary added test Feature:Alerting/RulesManagement Issues related to the Rules Management UX v8.6.0 labels Nov 7, 2022
@botelastic botelastic bot added the needs-team Issues missing a team label label Nov 7, 2022
@Zacqary Zacqary added Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) and removed needs-team Issues missing a team label labels Nov 7, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@Zacqary Zacqary moved this from Awaiting Triage to Todo in AppEx: ResponseOps - Rules & Alerts Management Nov 14, 2022
Zacqary added a commit that referenced this issue Nov 17, 2022
## Summary

Closes #144732

Adds functional tests for:

- Global logs api with `namespace`
- Global logs kpi with `namespace`
- Error log api with `namespace`
- Showing/hiding the logs switch based on space existence and user
permissions

Also:

- Fixes the query backend for `getActionErrorLogWithAuth` so that it
actually successfully filters down to just a single specified alert `id`
instead of returning all action error logs from everything. Writing a
test for this functionality revealed that it was broken.


### Checklist
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
Repository owner moved this from Todo to Done in AppEx: ResponseOps - Rules & Alerts Management Nov 17, 2022
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Nov 17, 2022
…45192)

## Summary

Closes elastic#144732

Adds functional tests for:

- Global logs api with `namespace`
- Global logs kpi with `namespace`
- Error log api with `namespace`
- Showing/hiding the logs switch based on space existence and user
permissions

Also:

- Fixes the query backend for `getActionErrorLogWithAuth` so that it
actually successfully filters down to just a single specified alert `id`
instead of returning all action error logs from everything. Writing a
test for this functionality revealed that it was broken.

### Checklist
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit 4956ea0)
kibanamachine added a commit that referenced this issue Nov 17, 2022
…5192) (#145596)

# Backport

This will backport the following commits from `main` to `8.6`:
- [[RAM] Add integration tests for all-space global logs view
(#145192)](#145192)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Zacqary Adam
Xeper","email":"Zacqary@users.noreply.github.com"},"sourceCommit":{"committedDate":"2022-11-17T16:51:28Z","message":"[RAM]
Add integration tests for all-space global logs view (#145192)\n\n##
Summary\r\n\r\nCloses #144732\r\n\r\nAdds functional tests for:\r\n\r\n-
Global logs api with `namespace`\r\n- Global logs kpi with
`namespace`\r\n- Error log api with `namespace`\r\n- Showing/hiding the
logs switch based on space existence and
user\r\npermissions\r\n\r\nAlso:\r\n\r\n- Fixes the query backend for
`getActionErrorLogWithAuth` so that it\r\nactually successfully filters
down to just a single specified alert `id`\r\ninstead of returning all
action error logs from everything. Writing a\r\ntest for this
functionality revealed that it was broken.\r\n\r\n\r\n### Checklist\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"4956ea0b7af7375d62d8da64deb96c099c62e35c","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","Feature:Alerting/RulesManagement","v8.6.0","v8.7.0"],"number":145192,"url":"https://github.com/elastic/kibana/pull/145192","mergeCommit":{"message":"[RAM]
Add integration tests for all-space global logs view (#145192)\n\n##
Summary\r\n\r\nCloses #144732\r\n\r\nAdds functional tests for:\r\n\r\n-
Global logs api with `namespace`\r\n- Global logs kpi with
`namespace`\r\n- Error log api with `namespace`\r\n- Showing/hiding the
logs switch based on space existence and
user\r\npermissions\r\n\r\nAlso:\r\n\r\n- Fixes the query backend for
`getActionErrorLogWithAuth` so that it\r\nactually successfully filters
down to just a single specified alert `id`\r\ninstead of returning all
action error logs from everything. Writing a\r\ntest for this
functionality revealed that it was broken.\r\n\r\n\r\n### Checklist\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"4956ea0b7af7375d62d8da64deb96c099c62e35c"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/145192","number":145192,"mergeCommit":{"message":"[RAM]
Add integration tests for all-space global logs view (#145192)\n\n##
Summary\r\n\r\nCloses #144732\r\n\r\nAdds functional tests for:\r\n\r\n-
Global logs api with `namespace`\r\n- Global logs kpi with
`namespace`\r\n- Error log api with `namespace`\r\n- Showing/hiding the
logs switch based on space existence and
user\r\npermissions\r\n\r\nAlso:\r\n\r\n- Fixes the query backend for
`getActionErrorLogWithAuth` so that it\r\nactually successfully filters
down to just a single specified alert `id`\r\ninstead of returning all
action error logs from everything. Writing a\r\ntest for this
functionality revealed that it was broken.\r\n\r\n\r\n### Checklist\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"4956ea0b7af7375d62d8da64deb96c099c62e35c"}}]}]
BACKPORT-->

Co-authored-by: Zacqary Adam Xeper <Zacqary@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Alerting/RulesManagement Issues related to the Rules Management UX Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) test v8.6.0
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants