mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Fleet] Fix asset creation during custom integration installation (#174869)
This commit is contained in:
parent
fed9460c21
commit
964a9804ff
3 changed files with 23 additions and 7 deletions
|
@ -88,7 +88,10 @@ const uploadPipeline = (pipelineContent: string | object) => {
|
|||
}
|
||||
|
||||
if (
|
||||
(await doAnyChangesMatch([/^x-pack\/plugins\/observability_onboarding/])) ||
|
||||
(await doAnyChangesMatch([
|
||||
/^x-pack\/plugins\/observability_onboarding/,
|
||||
/^x-pack\/plugins\/fleet/,
|
||||
])) ||
|
||||
GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
|
||||
) {
|
||||
pipeline.push(
|
||||
|
|
|
@ -875,7 +875,7 @@ export async function installCustomPackage(
|
|||
acc.set(asset.path, asset.content);
|
||||
return acc;
|
||||
}, new Map<string, Buffer | undefined>());
|
||||
const paths = [...Object.keys(assetsMap)];
|
||||
const paths = [...assetsMap.keys()];
|
||||
|
||||
const packageInstallContext: PackageInstallContext = {
|
||||
assetsMap,
|
||||
|
|
|
@ -125,17 +125,30 @@ Cypress.Commands.add('deleteIntegration', (integrationName: string) => {
|
|||
|
||||
cy.request({
|
||||
log: false,
|
||||
method: 'DELETE',
|
||||
method: 'GET',
|
||||
url: `${kibanaUrl}/api/fleet/epm/packages/${integrationName}`,
|
||||
body: {
|
||||
force: false,
|
||||
},
|
||||
headers: {
|
||||
'kbn-xsrf': 'e2e_test',
|
||||
'Elastic-Api-Version': '1',
|
||||
},
|
||||
auth: { user: 'editor', pass: 'changeme' },
|
||||
failOnStatusCode: false,
|
||||
}).then((response) => {
|
||||
const status = response.body.item?.status;
|
||||
if (status === 'installed') {
|
||||
cy.request({
|
||||
log: false,
|
||||
method: 'DELETE',
|
||||
url: `${kibanaUrl}/api/fleet/epm/packages/${integrationName}`,
|
||||
body: {
|
||||
force: false,
|
||||
},
|
||||
headers: {
|
||||
'kbn-xsrf': 'e2e_test',
|
||||
'Elastic-Api-Version': '1',
|
||||
},
|
||||
auth: { user: 'editor', pass: 'changeme' },
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue