-
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.
Merge branch 'master' into d/2021-10-18-scss-in-packages
- Loading branch information
Showing
97 changed files
with
2,635 additions
and
2,015 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 was deleted.
Oops, something went wrong.
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
2 changes: 1 addition & 1 deletion
2
docs/development/core/public/kibana-plugin-core-public.doclinksstart.md
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
43 changes: 43 additions & 0 deletions
43
x-pack/plugins/apm/server/lib/fleet/get_apm_package_policy_definition.test.ts
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,43 @@ | ||
/* | ||
* 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 { preprocessLegacyFields } from './get_apm_package_policy_definition'; | ||
|
||
const apmServerSchema = { | ||
'apm-server.host': '0.0.0.0:8200', | ||
'apm-server.secret_token': 'asdfkjhasdf', | ||
'apm-server.read_timeout': 3600, | ||
'apm-server.rum.event_rate.limit': 100, | ||
'apm-server.rum.event_rate.lru_size': 100, | ||
'apm-server.rum.allow_service_names': 'opbeans-test', | ||
'logging.level': 'error', | ||
'queue.mem.events': 2000, | ||
'queue.mem.flush.timeout': '1s', | ||
'setup.template.settings.index.number_of_jshards': 1, | ||
}; | ||
|
||
describe('get_apm_package_policy_definition', () => { | ||
describe('preprocessLegacyFields', () => { | ||
it('should replace legacy fields with supported fields', () => { | ||
const result = preprocessLegacyFields({ apmServerSchema }); | ||
expect(result).toMatchInlineSnapshot(` | ||
Object { | ||
"apm-server.auth.anonymous.allow_service": "opbeans-test", | ||
"apm-server.auth.anonymous.rate_limit.event_limit": 100, | ||
"apm-server.auth.anonymous.rate_limit.ip_limit": 100, | ||
"apm-server.auth.secret_token": "asdfkjhasdf", | ||
"apm-server.host": "0.0.0.0:8200", | ||
"apm-server.read_timeout": 3600, | ||
"logging.level": "error", | ||
"queue.mem.events": 2000, | ||
"queue.mem.flush.timeout": "1s", | ||
"setup.template.settings.index.number_of_jshards": 1, | ||
} | ||
`); | ||
}); | ||
}); | ||
}); |
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
58 changes: 58 additions & 0 deletions
58
x-pack/plugins/apm/server/lib/fleet/get_unsupported_apm_server_schema.test.ts
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,58 @@ | ||
/* | ||
* 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 { SavedObjectsClientContract } from 'kibana/server'; | ||
import { getUnsupportedApmServerSchema } from './get_unsupported_apm_server_schema'; | ||
|
||
const apmServerSchema = { | ||
'apm-server.host': '0.0.0.0:8200', | ||
'apm-server.secret_token': 'asdfkjhasdf', | ||
'apm-server.read_timeout': 3600, | ||
'apm-server.rum.event_rate.limit': 100, | ||
'apm-server.rum.event_rate.lru_size': 100, | ||
'apm-server.rum.allow_service_names': 'opbeans-test', | ||
'logging.level': 'error', | ||
'queue.mem.events': 2000, | ||
'queue.mem.flush.timeout': '1s', | ||
'setup.template.settings.index.number_of_jshards': 1, | ||
}; | ||
|
||
const mockSavaedObectsClient = { | ||
get: () => ({ | ||
attributes: { schemaJson: JSON.stringify(apmServerSchema) }, | ||
}), | ||
} as unknown as SavedObjectsClientContract; | ||
|
||
describe('get_unsupported_apm_server_schema', () => { | ||
describe('getUnsupportedApmServerSchema', () => { | ||
it('should return key-value pairs of unsupported configs', async () => { | ||
const result = await getUnsupportedApmServerSchema({ | ||
savedObjectsClient: mockSavaedObectsClient, | ||
}); | ||
expect(result).toMatchInlineSnapshot(` | ||
Array [ | ||
Object { | ||
"key": "logging.level", | ||
"value": "error", | ||
}, | ||
Object { | ||
"key": "queue.mem.events", | ||
"value": 2000, | ||
}, | ||
Object { | ||
"key": "queue.mem.flush.timeout", | ||
"value": "1s", | ||
}, | ||
Object { | ||
"key": "setup.template.settings.index.number_of_jshards", | ||
"value": 1, | ||
}, | ||
] | ||
`); | ||
}); | ||
}); | ||
}); |
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
Oops, something went wrong.