Skip to content

Commit 991e954

Browse files
authored
[9.0] [UII] Fix input package component template test (#231505) (#232161)
# Backport This will backport the following commits from `main` to `9.0`: - [[UII] Fix input package component template test (#231505)](#231505) <!--- Backport version: 10.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Jen Huang","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-08-12T20:50:27Z","message":"[UII] Fix input package component template test (#231505)\n\n## Summary\n\nResolves #229901. Fixes ES\npromotion of this test by excluding component template timestamps from\nthe assertion (timestamps were introduced in\nhttps://github.com/elastic/elasticsearch/pull/131536).","sha":"834e2851016889b912229a01f65a0d2c27a213db","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","backport:version","v9.2.0","v9.1.3","v8.19.3","v9.0.6"],"title":"[UII] Fix input package component template test","number":231505,"url":"https://github.com/elastic/kibana/pull/231505","mergeCommit":{"message":"[UII] Fix input package component template test (#231505)\n\n## Summary\n\nResolves #229901. Fixes ES\npromotion of this test by excluding component template timestamps from\nthe assertion (timestamps were introduced in\nhttps://github.com/elastic/elasticsearch/pull/131536).","sha":"834e2851016889b912229a01f65a0d2c27a213db"}},"sourceBranch":"main","suggestedTargetBranches":["9.0"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/231505","number":231505,"mergeCommit":{"message":"[UII] Fix input package component template test (#231505)\n\n## Summary\n\nResolves #229901. Fixes ES\npromotion of this test by excluding component template timestamps from\nthe assertion (timestamps were introduced in\nhttps://github.com/elastic/elasticsearch/pull/131536).","sha":"834e2851016889b912229a01f65a0d2c27a213db"}},{"branch":"9.1","label":"v9.1.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/232157","number":232157,"state":"OPEN"},{"branch":"8.19","label":"v8.19.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/232156","number":232156,"state":"OPEN"},{"branch":"9.0","label":"v9.0.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
1 parent 6fbe134 commit 991e954

File tree

1 file changed

+27
-24
lines changed

1 file changed

+27
-24
lines changed

x-pack/test/fleet_api_integration/apis/package_policy/input_package_create_upgrade.ts

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -208,37 +208,40 @@ export default function (providerContext: FtrProviderContext) {
208208

209209
// now check the package component template was created correctly
210210
const packageComponentTemplate = await getComponentTemplate('logs-dataset1@package');
211-
expect(packageComponentTemplate).eql({
212-
name: 'logs-dataset1@package',
213-
component_template: {
214-
template: {
215-
settings: {
216-
index: {
217-
lifecycle: { name: 'logs' },
218-
default_pipeline: 'logs-dataset1-1.0.0',
219-
mapping: {
220-
total_fields: { limit: '1000' },
221-
},
211+
const {
212+
created_date_millis: createdDateMillis,
213+
modified_date_millis: modifiedDateMillis,
214+
...definitionWithouTimestamps
215+
} = packageComponentTemplate!.component_template as any;
216+
expect(packageComponentTemplate!.name).eql('logs-dataset1@package');
217+
expect(definitionWithouTimestamps).eql({
218+
template: {
219+
settings: {
220+
index: {
221+
lifecycle: { name: 'logs' },
222+
default_pipeline: 'logs-dataset1-1.0.0',
223+
mapping: {
224+
total_fields: { limit: '1000' },
222225
},
223226
},
224-
mappings: {
225-
properties: {
226-
input: {
227-
properties: {
228-
name: {
229-
type: 'constant_keyword',
230-
value: 'logs',
231-
},
227+
},
228+
mappings: {
229+
properties: {
230+
input: {
231+
properties: {
232+
name: {
233+
type: 'constant_keyword',
234+
value: 'logs',
232235
},
233236
},
234237
},
235238
},
236239
},
237-
_meta: {
238-
package: { name: 'input_package_upgrade' },
239-
managed_by: 'fleet',
240-
managed: true,
241-
},
240+
},
241+
_meta: {
242+
package: { name: 'input_package_upgrade' },
243+
managed_by: 'fleet',
244+
managed: true,
242245
},
243246
});
244247
});

0 commit comments

Comments
 (0)