Skip to content

Commit

Permalink
[8.6] basic smoke test for Fleet installation package (#145475) (#145634
Browse files Browse the repository at this point in the history
)

# Backport

This will backport the following commits from `main` to `8.6`:
- [basic smoke test for Fleet installation package
(#145475)](#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":"[email protected]"},"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 <[email protected]>
  • Loading branch information
kibanamachine and rashmivkulkarni authored Nov 17, 2022
1 parent 4efcb2c commit 3ea72a6
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions x-pack/test/fleet_functional/apps/fleet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ export default function (providerContext: FtrProviderContext) {

describe('endpoint', function () {
loadTestFile(require.resolve('./agents_page'));
loadTestFile(require.resolve('./integration_smoke'));
});
}
30 changes: 30 additions & 0 deletions x-pack/test/fleet_functional/apps/fleet/integration_smoke.ts
Original file line number Diff line number Diff line change
@@ -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');
});
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -42,6 +45,7 @@ export default async ({ readConfigFile }) => {
pageObjects: {
triggersActionsUI: TriggersActionsPageProvider,
...xpackFunctionalConfig.get('pageObjects'),
...fleetFunctionalConfig.get('pageObjects'),
},
apps: {
...xpackFunctionalConfig.get('apps'),
Expand Down

0 comments on commit 3ea72a6

Please sign in to comment.