-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.16] [Fleet] Fix agent policy mappings for space awareness (#201689) (
#202239) # Backport This will backport the following commits from `main` to `8.16`: - [[Fleet] Fix agent policy mappings for space awareness (#201689)](#201689) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Nicolas Chaulet","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-28T22:11:10Z","message":"[Fleet] Fix agent policy mappings for space awareness (#201689)","sha":"721b4beb1ae7f12171a34d50ba6068b8c2d7288e","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","backport:prev-minor","v8.17.0","v8.16.2"],"title":"[Fleet] Fix agent policy mappings for space awareness","number":201689,"url":"https://github.com/elastic/kibana/pull/201689","mergeCommit":{"message":"[Fleet] Fix agent policy mappings for space awareness (#201689)","sha":"721b4beb1ae7f12171a34d50ba6068b8c2d7288e"}},"sourceBranch":"main","suggestedTargetBranches":["8.17","8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201689","number":201689,"mergeCommit":{"message":"[Fleet] Fix agent policy mappings for space awareness (#201689)","sha":"721b4beb1ae7f12171a34d50ba6068b8c2d7288e"}},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Nicolas Chaulet <[email protected]>
- Loading branch information
1 parent
2e1ed36
commit 60efa2c
Showing
4 changed files
with
56 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* 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 _ from 'lodash'; | ||
|
||
import { getSavedObjectTypes } from '.'; | ||
|
||
describe('space aware models', () => { | ||
it('should have the same mappings for space and non-space aware agent policies', () => { | ||
const soTypes = getSavedObjectTypes(); | ||
|
||
const legacyMappings = _.omit( | ||
soTypes['ingest-agent-policies'].mappings, | ||
'properties.monitoring_diagnostics', | ||
'properties.monitoring_http', | ||
'properties.monitoring_pprof_enabled' | ||
); | ||
|
||
expect(legacyMappings).toEqual(soTypes['fleet-agent-policies'].mappings); | ||
}); | ||
it('should have the same mappings for space and non-space aware package policies', () => { | ||
const soTypes = getSavedObjectTypes(); | ||
|
||
expect(soTypes['ingest-package-policies'].mappings).toEqual( | ||
soTypes['fleet-package-policies'].mappings | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters