[Fleet] Fix pipeline with id [*] does not exists (#116707) (#116801)

Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
This commit is contained in:
Kibana Machine 2021-10-31 23:07:03 -04:00 committed by GitHub
parent 6f372b1c77
commit c49fcc4f00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 10 deletions

View file

@ -264,7 +264,7 @@ export const getEsPackage = async (
dataStreams.push({
dataset: dataset || `${pkgName}.${dataStreamPath}`,
package: pkgName,
ingest_pipeline: ingestPipeline || 'default',
ingest_pipeline: ingestPipeline,
path: dataStreamPath,
streams,
...dataStreamManifestProps,

View file

@ -217,7 +217,6 @@ export function parseAndVerifyDataStreams(
}
const streams = parseAndVerifyStreams(manifestStreams, dataStreamPath);
// default ingest pipeline name see https://github.com/elastic/package-registry/blob/master/util/dataset.go#L26
dataStreams.push(
Object.entries(restOfProps).reduce(
(validatedDataStream, [key, value]) => {
@ -233,7 +232,7 @@ export function parseAndVerifyDataStreams(
type,
package: pkgName,
dataset: dataset || `${pkgName}.${dataStreamPath}`,
ingest_pipeline: ingestPipeline || 'default',
ingest_pipeline: ingestPipeline,
path: dataStreamPath,
streams,
}

View file

@ -167,7 +167,6 @@ Object {
"data_streams": Array [
Object {
"dataset": "apache.access",
"ingest_pipeline": "default",
"package": "apache",
"path": "access",
"release": "experimental",
@ -199,7 +198,6 @@ Object {
},
Object {
"dataset": "apache.status",
"ingest_pipeline": "default",
"package": "apache",
"path": "status",
"release": "experimental",
@ -236,7 +234,6 @@ Object {
},
Object {
"dataset": "apache.error",
"ingest_pipeline": "default",
"package": "apache",
"path": "error",
"release": "experimental",
@ -331,11 +328,11 @@ Object {
"install_version": "0.1.4",
"installed_es": Array [
Object {
"id": "logs-apache.access-0.1.4",
"id": "logs-apache.access-0.1.4-default",
"type": "ingest_pipeline",
},
Object {
"id": "logs-apache.error-0.1.4",
"id": "logs-apache.error-0.1.4-default",
"type": "ingest_pipeline",
},
Object {

View file

@ -74,7 +74,7 @@ export default function (providerContext: FtrProviderContext) {
.type('application/gzip')
.send(buf)
.expect(200);
expect(res.body.response.length).to.be(29);
expect(res.body.response.length).to.be(27);
});
it('should install a zip archive correctly and package info should return correctly after validation', async function () {
@ -85,7 +85,7 @@ export default function (providerContext: FtrProviderContext) {
.type('application/zip')
.send(buf)
.expect(200);
expect(res.body.response.length).to.be(29);
expect(res.body.response.length).to.be(27);
const packageInfoRes = await supertest
.get(`/api/fleet/epm/packages/${testPkgKey}`)