[8.16] [ML] AIOps: Fix and reenable functional tests for log rate analysis (#197760) (#197795)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[ML] AIOps: Fix and reenable functional tests for log rate analysis
(#197760)](https://github.com/elastic/kibana/pull/197760)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Walter
Rafelsberger","email":"walter.rafelsberger@elastic.co"},"sourceCommit":{"committedDate":"2024-10-25T10:18:24Z","message":"[ML]
AIOps: Fix and reenable functional tests for log rate analysis
(#197760)\n\n## Summary\r\n\r\nFollow up to #189863 and
#196585.\r\nRelated to #176387.\r\n\r\nThis updates asserting the url
state for log rate analysis with a query\r\nand reenables the functional
tests.\r\n\r\n### Checklist\r\n\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\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [x] This was checked for breaking
API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)","sha":"6ef03697460aba0d3774c0c03fb7fb58c76c00bd","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":[":ml","release_note:skip","v9.0.0","Feature:ML/AIOps","v8.16.0","backport:version","v8.17.0"],"title":"[ML]
AIOps: Fix and reenable functional tests for log rate
analysis","number":197760,"url":"https://github.com/elastic/kibana/pull/197760","mergeCommit":{"message":"[ML]
AIOps: Fix and reenable functional tests for log rate analysis
(#197760)\n\n## Summary\r\n\r\nFollow up to #189863 and
#196585.\r\nRelated to #176387.\r\n\r\nThis updates asserting the url
state for log rate analysis with a query\r\nand reenables the functional
tests.\r\n\r\n### Checklist\r\n\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\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [x] This was checked for breaking
API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)","sha":"6ef03697460aba0d3774c0c03fb7fb58c76c00bd"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197760","number":197760,"mergeCommit":{"message":"[ML]
AIOps: Fix and reenable functional tests for log rate analysis
(#197760)\n\n## Summary\r\n\r\nFollow up to #189863 and
#196585.\r\nRelated to #176387.\r\n\r\nThis updates asserting the url
state for log rate analysis with a query\r\nand reenables the functional
tests.\r\n\r\n### Checklist\r\n\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\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [x] This was checked for breaking
API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)","sha":"6ef03697460aba0d3774c0c03fb7fb58c76c00bd"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Walter Rafelsberger <walter.rafelsberger@elastic.co>
This commit is contained in:
Kibana Machine 2024-10-25 22:51:39 +11:00 committed by GitHub
parent e5b0246211
commit 4f94a3ab42
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 107 additions and 102 deletions

View file

@ -315,8 +315,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});
}
// Failing: See https://github.com/elastic/kibana/issues/176387
describe.skip('log rate analysis', function () {
describe('log rate analysis', function () {
for (const testData of logRateAnalysisTestData) {
describe(`with '${testData.sourceIndexOrSavedSearch}'`, function () {
before(async () => {

View file

@ -64,128 +64,134 @@ export const farequoteDataViewTestDataWithQuery: TestData = {
filters: [],
searchQuery: {
bool: {
filter: [],
must_not: [
filter: [
{
bool: {
minimum_should_match: 1,
should: [
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'SWR',
must_not: {
bool: {
minimum_should_match: 1,
should: [
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'SWR',
},
},
},
},
],
},
],
},
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'ACA',
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'ACA',
},
},
},
},
],
},
],
},
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'AWE',
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'AWE',
},
},
},
},
],
},
],
},
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'BAW',
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'BAW',
},
},
},
},
],
},
],
},
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'JAL',
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'JAL',
},
},
},
},
],
},
],
},
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'JBU',
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'JBU',
},
},
},
},
],
},
],
},
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'JZA',
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'JZA',
},
},
},
},
],
},
],
},
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'KLM',
},
{
bool: {
minimum_should_match: 1,
should: [
{
term: {
airline: {
value: 'KLM',
},
},
},
},
],
},
],
},
},
],
},
],
},
},
},
],
must: [],
must_not: [],
should: [],
},
},
searchQueryLanguage: 'kuery',