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

[ResponseOps] Add functional tests for managing alerting rules when authenticated with an API key #154584

Closed
doakalexi opened this issue Apr 6, 2023 · 1 comment · Fixed by #155787
Assignees
Labels
Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@doakalexi
Copy link
Contributor

We need to add functional tests for the changes introduced in this PR - #154189 Allow users authenticated with an API keys to manage alerting rules
What I'd like to see is a bunch of the following scenarios:

  1. create a rule
  2. make sure it's running (whatever's easiest, maybe the get event log function)
  3. modify the rule with one of the methods changed in this PR
  4. make sure the shape is correct after the modification, and check if it's still running
  5. ideally, check to make sure any API keys in the scenario are queued for invalidation / still exist / etc, as expected - this might be hard, not sure where we store those queued-for-invalidation keys

Run every combination of methods changed, where when we create the rule, and run the method, we use every combination of api-key / login. So, something like this:

for (const createType of ['api-key', 'login']) {
  for (const mutateType of ['api-key', 'login']) {
    for (const method of ['bulk_delete', 'bulk_edit', ... ]) {
      test(createType, mutateType, method);
    }
  }
}
@doakalexi doakalexi added the Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) label Apr 6, 2023
@elasticmachine
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
No open projects
3 participants