-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds workflow to go from explain log rate spikes to log pattern analy…
…sis to functional tests
- Loading branch information
Showing
11 changed files
with
150 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
x-pack/test/functional/services/aiops/log_pattern_analysis_page.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import expect from '@kbn/expect'; | ||
|
||
import type { FtrProviderContext } from '../../ftr_provider_context'; | ||
|
||
export function LogPatternAnalysisPageProvider({ getService, getPageObject }: FtrProviderContext) { | ||
const retry = getService('retry'); | ||
const testSubjects = getService('testSubjects'); | ||
|
||
return { | ||
async assertLogCategorizationPageExists() { | ||
await retry.tryForTime(30 * 1000, async () => { | ||
await testSubjects.existOrFail('aiopsLogCategorizationPage'); | ||
}); | ||
}, | ||
|
||
async assertQueryInput(expectedQueryString: string) { | ||
const aiopsQueryInput = await testSubjects.find('aiopsQueryInput'); | ||
const actualQueryString = await aiopsQueryInput.getVisibleText(); | ||
expect(actualQueryString).to.eql( | ||
expectedQueryString, | ||
`Expected query bar text to be '${expectedQueryString}' (got '${actualQueryString}')` | ||
); | ||
}, | ||
|
||
async assertTotalDocumentCount(expectedFormattedTotalDocCount: string) { | ||
await retry.tryForTime(5000, async () => { | ||
const docCount = await testSubjects.getVisibleText('aiopsTotalDocCount'); | ||
expect(docCount).to.eql( | ||
expectedFormattedTotalDocCount, | ||
`Expected total document count to be '${expectedFormattedTotalDocCount}' (got '${docCount}')` | ||
); | ||
}); | ||
}, | ||
}; | ||
} |