[Security Solution][Detection Engine] fixes docs version reference in actions test (#225611)

## Summary

We had a few cases of backport tests failing because version in docs
link is hardcoded as `current` but can be previous version.

Examples:
https://github.com/elastic/kibana/pull/225582
https://github.com/elastic/kibana/pull/225584

Failed assertion:

> Error: expected 'This rule\'s API key is unable to access all indices
that match the ["host_alias"] pattern. To learn how to update and manage
API keys, refer to
https://www.elastic.co/guide/en/kibana/9.1/alerting-setup.html#alerting-authorization.\n\nThis
rule is attempting to query data from Elasticsearch indices listed in
the "Index patterns" section of the rule definition, however no index
matching: ["host_alias"] was found. This warning will continue to appear
until a matching index is created or this rule is disabled.' to contain
'This rule\'s API key is unable to access all indices that match the
["host_alias"] pattern. To learn how to update and manage API keys,
refer to
https://www.elastic.co/guide/en/kibana/current/alerting-setup.html#alerting-authorization.'
This commit is contained in:
Vitalii Dmyterko 2025-06-27 15:18:39 +01:00 committed by GitHub
parent fe9dcf751a
commit fefaea74fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -85,7 +85,10 @@ export default ({ getService }: FtrProviderContext) => {
// TODO: https://github.com/elastic/kibana/pull/121644 clean up, make type-safe
expect(body?.execution_summary?.last_execution.message).to.contain(
`This rule's API key is unable to access all indices that match the ["${index[0]}"] pattern. To learn how to update and manage API keys, refer to https://www.elastic.co/guide/en/kibana/current/alerting-setup.html#alerting-authorization.`
`This rule's API key is unable to access all indices that match the ["${index[0]}"] pattern. To learn how to update and manage API keys, refer to https://www.elastic.co/guide/en/kibana/`
);
expect(body?.execution_summary?.last_execution.message).to.contain(
'/alerting-setup.html#alerting-authorization.'
);
await deleteUserAndRole(getService, ROLES.detections_admin);
@ -165,8 +168,11 @@ export default ({ getService }: FtrProviderContext) => {
.expect(200);
// TODO: https://github.com/elastic/kibana/pull/121644 clean up, make type-safe
expect(body?.execution_summary?.last_execution.message).to.eql(
`This rule's API key is unable to access all indices that match the ["${index[0]}"] pattern. To learn how to update and manage API keys, refer to https://www.elastic.co/guide/en/kibana/current/alerting-setup.html#alerting-authorization.`
expect(body?.execution_summary?.last_execution.message).to.contain(
`This rule's API key is unable to access all indices that match the ["${index[0]}"] pattern. To learn how to update and manage API keys, refer to https://www.elastic.co/guide/en/kibana/`
);
expect(body?.execution_summary?.last_execution.message).to.contain(
'/alerting-setup.html#alerting-authorization.'
);
await deleteUserAndRole(getService, ROLES.detections_admin);