Skip to content

Commit

Permalink
[ML] AIOps: Fix and reenable functional tests for log rate analysis (e…
Browse files Browse the repository at this point in the history
…lastic#197760)

## Summary

Follow up to elastic#189863 and elastic#196585.
Related to elastic#176387.

This updates asserting the url state for log rate analysis with a query
and reenables the functional tests.

### 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
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)

(cherry picked from commit 6ef0369)
  • Loading branch information
walterra committed Oct 25, 2024
1 parent e5416f3 commit f17ded8
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 102 deletions.
3 changes: 1 addition & 2 deletions x-pack/test/functional/apps/aiops/log_rate_analysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit f17ded8

Please sign in to comment.