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

[8.11] [QA] Change default time interval in beats tests for stack integration (#170483) #170486

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@ import { FtrProviderContext } from '../../../functional/ftr_provider_context';
export default function ({ getService, getPageObjects }: FtrProviderContext) {
describe('check filebeat', function () {
const retry = getService('retry');
const kibanaServer = getService('kibanaServer');
const PageObjects = getPageObjects(['common', 'discover', 'timePicker']);

it('filebeat- should have hit count GT 0', async function () {
await kibanaServer.uiSettings.update({
'timepicker:timeDefaults': `{ "from": "now-5y", "to": "now"}`,
});
await PageObjects.common.navigateToApp('discover', { insertTimestamp: false });
await PageObjects.discover.selectIndexPattern('filebeat-*');
await PageObjects.timePicker.setCommonlyUsedTime('Last_1 year');
await retry.try(async () => {
const hitCount = await PageObjects.discover.getHitCountInt();
expect(hitCount).to.be.greaterThan(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const log = getService('log');
const retry = getService('retry');
const browser = getService('browser');
const kibanaServer = getService('kibanaServer');
const PageObjects = getPageObjects(['common', 'discover', 'timePicker']);
const appsMenu = getService('appsMenu');

describe('check metricbeat', function () {
it('metricbeat- should have hit count GT 0', async function () {
const url = await browser.getCurrentUrl();
await kibanaServer.uiSettings.update({
'timepicker:timeDefaults': `{ "from": "now-5y", "to": "now"}`,
});
log.debug(url);
if (!url.includes('kibana')) {
await PageObjects.common.navigateToApp('discover', { insertTimestamp: false });
Expand All @@ -26,7 +30,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
}

await PageObjects.discover.selectIndexPattern('metricbeat-*');
await PageObjects.timePicker.setCommonlyUsedTime('Last_1 year');
await retry.try(async function () {
const hitCount = await PageObjects.discover.getHitCountInt();
expect(hitCount).to.be.greaterThan(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const log = getService('log');
const retry = getService('retry');
const browser = getService('browser');
const kibanaServer = getService('kibanaServer');
const PageObjects = getPageObjects(['common', 'discover', 'timePicker']);
const appsMenu = getService('appsMenu');

Expand All @@ -22,6 +23,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

it('packetbeat- should have hit count GT 0', async function () {
const url = await browser.getCurrentUrl();
await kibanaServer.uiSettings.update({
'timepicker:timeDefaults': `{ "from": "now-5y", "to": "now"}`,
});
log.debug(url);
if (!url.includes('kibana')) {
await PageObjects.common.navigateToApp('discover', { insertTimestamp: false });
Expand All @@ -30,7 +34,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await appsMenu.clickLink('Discover');
}
await PageObjects.discover.selectIndexPattern('packetbeat-*');
await PageObjects.timePicker.setCommonlyUsedTime('Last_1 year');
await retry.try(async function () {
const hitCount = await PageObjects.discover.getHitCountInt();
expect(hitCount).to.be.greaterThan(0);
Expand Down
Loading