[8.6] basic smoke test for Fleet installation package (#145475) (#145634)

# Backport

This will backport the following commits from `main` to `8.6`:
- [basic smoke test for Fleet installation package
(#145475)](https://github.com/elastic/kibana/pull/145475)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Rashmi
Kulkarni","email":"rashmi.kulkarni@elastic.co"},"sourceCommit":{"committedDate":"2022-11-17T21:53:54Z","message":"basic
smoke test for Fleet installation package (#145475)\n\ncovers
https://github.com/elastic/kibana/pull/144899\r\n\r\nchecks `Elastic
Synthetics` shows up when navigated to Installed\r\nIntegrations\r\n<img
width=\"1616\" alt=\"Screen Shot 2022-11-16 at 3 16 32
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11466284/202315280-d5b1d730-df82-4dbb-9da1-35b001683b27.png\">","sha":"6d4cadaeac4c68fc1e023f97e2ce0968af47e024","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:xpack_main","test_xpack_functional","release_note:skip","Team:Fleet","backport:prev-minor","v8.6.0","v8.7.0"],"number":145475,"url":"https://github.com/elastic/kibana/pull/145475","mergeCommit":{"message":"basic
smoke test for Fleet installation package (#145475)\n\ncovers
https://github.com/elastic/kibana/pull/144899\r\n\r\nchecks `Elastic
Synthetics` shows up when navigated to Installed\r\nIntegrations\r\n<img
width=\"1616\" alt=\"Screen Shot 2022-11-16 at 3 16 32
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11466284/202315280-d5b1d730-df82-4dbb-9da1-35b001683b27.png\">","sha":"6d4cadaeac4c68fc1e023f97e2ce0968af47e024"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/145475","number":145475,"mergeCommit":{"message":"basic
smoke test for Fleet installation package (#145475)\n\ncovers
https://github.com/elastic/kibana/pull/144899\r\n\r\nchecks `Elastic
Synthetics` shows up when navigated to Installed\r\nIntegrations\r\n<img
width=\"1616\" alt=\"Screen Shot 2022-11-16 at 3 16 32
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11466284/202315280-d5b1d730-df82-4dbb-9da1-35b001683b27.png\">","sha":"6d4cadaeac4c68fc1e023f97e2ce0968af47e024"}}]}]
BACKPORT-->

Co-authored-by: Rashmi Kulkarni <rashmi.kulkarni@elastic.co>
This commit is contained in:
Kibana Machine 2022-11-17 17:49:20 -05:00 committed by GitHub
parent 4efcb2cd8b
commit 3ea72a641d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 35 additions and 0 deletions

View file

@ -12,5 +12,6 @@ export default function (providerContext: FtrProviderContext) {
describe('endpoint', function () {
loadTestFile(require.resolve('./agents_page'));
loadTestFile(require.resolve('./integration_smoke'));
});
}

View file

@ -0,0 +1,30 @@
/*
* 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 { FtrProviderContext } from '../../ftr_provider_context';
export default function ({ getPageObjects, getService }: FtrProviderContext) {
const PageObjects = getPageObjects(['common']);
const testSubjects = getService('testSubjects');
describe('Elastic synthetics integration', function () {
this.tags(['smoke']);
before(async () => {
await PageObjects.common.navigateToUrl('management', 'integrations/installed', {
ensureCurrentUrl: false,
shouldLoginIfPrompted: false,
shouldUseHashForSubUrl: false,
});
});
// This is a basic smoke test to cover Fleet package installed logic
// https://github.com/elastic/kibana/pull/144899
it('should show the Elastic synthetics integration', async () => {
await testSubjects.exists('integration-card:epr:synthetics');
});
});
}

View file

@ -34,6 +34,9 @@ export default async ({ readConfigFile }) => {
const xpackFunctionalConfig = await readConfigFile(
require.resolve('../../functional/config.ccs.ts')
);
const fleetFunctionalConfig = await readConfigFile(
require.resolve('../../fleet_functional/config.ts')
);
process.env.stack_functional_integration = true;
logAll(log);
@ -42,6 +45,7 @@ export default async ({ readConfigFile }) => {
pageObjects: {
triggersActionsUI: TriggersActionsPageProvider,
...xpackFunctionalConfig.get('pageObjects'),
...fleetFunctionalConfig.get('pageObjects'),
},
apps: {
...xpackFunctionalConfig.get('apps'),