Optimizing DLStest (#35615) (#35689)

*  dls optimize
Removed createIndexPattern via UI and used ES Archiver for document level test (functional)
This commit is contained in:
Rashmi Kulkarni 2019-04-26 18:00:51 -07:00 committed by GitHub
parent a413e66b99
commit f1e388ef2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 688 additions and 5 deletions

View file

@ -13,6 +13,7 @@ export default function ({ getService, getPageObjects }) {
const retry = getService('retry');
const log = getService('log');
const screenshot = getService('screenshots');
const kibanaServer = getService('kibanaServer');
const PageObjects = getPageObjects([
'security',
'common',
@ -26,17 +27,15 @@ export default function ({ getService, getPageObjects }) {
await esArchiver.loadIfNeeded('security/dlstest');
browser.setWindowSize(1600, 1000);
await PageObjects.settings.createIndexPattern('dlstest', null);
await PageObjects.settings.navigateTo();
await PageObjects.security.clickElasticsearchRoles();
});
it('should add new role myroleEast', async function () {
await PageObjects.settings.navigateTo();
await PageObjects.security.clickElasticsearchRoles();
await PageObjects.security.addRole('myroleEast', {
elasticsearch: {
'indices': [{
'names': ['dlstest'],
'names': ['dlstest*'],
'privileges': ['read', 'view_index_metadata'],
'query': '{"match": {"region": "EAST"}}'
}]
@ -53,6 +52,7 @@ export default function ({ getService, getPageObjects }) {
});
it('should add new user userEAST ', async function () {
await PageObjects.settings.navigateTo();
await PageObjects.security.clickElasticsearchUsers();
await PageObjects.security.addUser({
username: 'userEast', password: 'changeme',
@ -68,6 +68,7 @@ export default function ({ getService, getPageObjects }) {
it('user East should only see EAST doc', async function () {
await PageObjects.security.logout();
await PageObjects.security.login('userEast', 'changeme');
await kibanaServer.uiSettings.replace({ 'defaultIndex': 'dlstest*' });
await PageObjects.common.navigateToApp('discover');
await retry.try(async () => {
const hitCount = await PageObjects.discover.getHitCount();

View file

@ -1,6 +1,8 @@
{
"type": "index",
"value": {
"aliases": {
},
"index": "dlstest",
"mappings": {
"properties": {
@ -31,4 +33,684 @@
}
}
}
}
{
"type": "index",
"value": {
"aliases": {
".kibana": {
}
},
"index": ".kibana_1",
"mappings": {
"_meta": {
"migrationMappingPropertyHashes": {
"apm-telemetry": "07ee1939fa4302c62ddc052ec03fed90",
"canvas-workpad": "b0a1706d356228dbdcb4a17e6b9eb231",
"config": "87aca8fdb053154f11383fce3dbf3edf",
"dashboard": "eb3789e1af878e73f85304333240f65f",
"graph-workspace": "cd7ba1330e6682e9cc00b78850874be1",
"index-pattern": "66eccb05066c5a89924f48a9e9736499",
"infrastructure-ui-source": "10acdf67d9a06d462e198282fd6d4b81",
"kql-telemetry": "d12a98a6f19a2d273696597547e064ee",
"map": "23d7aa4a720d4938ccde3983f87bd58d",
"maps-telemetry": "a4229f8b16a6820c6d724b7e0c1f729d",
"migrationVersion": "4a1746014a75ade3a714e1db5763276f",
"ml-telemetry": "257fd1d4b4fdbb9cb4b8a3b27da201e9",
"namespace": "2f4316de49999235636386fe51dc06c1",
"references": "7997cf5a56cc02bdc9c93361bde732b0",
"sample-data-telemetry": "7d3cfeb915303c9641c59681967ffeb4",
"search": "181661168bbadd1eff5902361e2a0d5c",
"server": "ec97f1c5da1a19609a60874e5af1100c",
"space": "25de8c2deec044392922989cfcf24c54",
"telemetry": "e1c8bc94e443aefd9458932cc0697a4d",
"timelion-sheet": "9a2a2748877c7a7b582fef201ab1d4cf",
"type": "2f4316de49999235636386fe51dc06c1",
"ui-metric": "0d409297dc5ebe1e3a1da691c6ee32e3",
"updated_at": "00da57df13e94e9d98437d13ace4bfe0",
"upgrade-assistant-reindex-operation": "a53a20fe086b72c9a86da3cc12dad8a6",
"upgrade-assistant-telemetry": "56702cec857e0a9dacfb696655b4ff7b",
"url": "c7f66a0df8b1b52f17c28c4adb111105",
"visualization": "52d7a13ad68a150c4525b292d23e12cc"
}
},
"dynamic": "strict",
"properties": {
"apm-telemetry": {
"properties": {
"has_any_services": {
"type": "boolean"
},
"services_per_agent": {
"properties": {
"dotnet": {
"null_value": 0,
"type": "long"
},
"go": {
"null_value": 0,
"type": "long"
},
"java": {
"null_value": 0,
"type": "long"
},
"js-base": {
"null_value": 0,
"type": "long"
},
"nodejs": {
"null_value": 0,
"type": "long"
},
"python": {
"null_value": 0,
"type": "long"
},
"ruby": {
"null_value": 0,
"type": "long"
},
"rum-js": {
"null_value": 0,
"type": "long"
}
}
}
}
},
"canvas-workpad": {
"dynamic": "false",
"properties": {
"@created": {
"type": "date"
},
"@timestamp": {
"type": "date"
},
"name": {
"fields": {
"keyword": {
"type": "keyword"
}
},
"type": "text"
}
}
},
"config": {
"dynamic": "true",
"properties": {
"buildNum": {
"type": "keyword"
},
"dateFormat:tz": {
"fields": {
"keyword": {
"ignore_above": 256,
"type": "keyword"
}
},
"type": "text"
},
"defaultIndex": {
"fields": {
"keyword": {
"ignore_above": 256,
"type": "keyword"
}
},
"type": "text"
}
}
},
"dashboard": {
"properties": {
"description": {
"type": "text"
},
"hits": {
"type": "integer"
},
"kibanaSavedObjectMeta": {
"properties": {
"searchSourceJSON": {
"type": "text"
}
}
},
"optionsJSON": {
"type": "text"
},
"panelsJSON": {
"type": "text"
},
"refreshInterval": {
"properties": {
"display": {
"type": "keyword"
},
"pause": {
"type": "boolean"
},
"section": {
"type": "integer"
},
"value": {
"type": "integer"
}
}
},
"timeFrom": {
"type": "keyword"
},
"timeRestore": {
"type": "boolean"
},
"timeTo": {
"type": "keyword"
},
"title": {
"type": "text"
},
"uiStateJSON": {
"type": "text"
},
"version": {
"type": "integer"
}
}
},
"graph-workspace": {
"properties": {
"description": {
"type": "text"
},
"kibanaSavedObjectMeta": {
"properties": {
"searchSourceJSON": {
"type": "text"
}
}
},
"numLinks": {
"type": "integer"
},
"numVertices": {
"type": "integer"
},
"title": {
"type": "text"
},
"version": {
"type": "integer"
},
"wsState": {
"type": "text"
}
}
},
"index-pattern": {
"properties": {
"fieldFormatMap": {
"type": "text"
},
"fields": {
"type": "text"
},
"intervalName": {
"type": "keyword"
},
"notExpandable": {
"type": "boolean"
},
"sourceFilters": {
"type": "text"
},
"timeFieldName": {
"type": "keyword"
},
"title": {
"type": "text"
},
"type": {
"type": "keyword"
},
"typeMeta": {
"type": "keyword"
}
}
},
"infrastructure-ui-source": {
"properties": {
"description": {
"type": "text"
},
"fields": {
"properties": {
"container": {
"type": "keyword"
},
"host": {
"type": "keyword"
},
"pod": {
"type": "keyword"
},
"tiebreaker": {
"type": "keyword"
},
"timestamp": {
"type": "keyword"
}
}
},
"logAlias": {
"type": "keyword"
},
"metricAlias": {
"type": "keyword"
},
"name": {
"type": "text"
}
}
},
"kql-telemetry": {
"properties": {
"optInCount": {
"type": "long"
},
"optOutCount": {
"type": "long"
}
}
},
"map": {
"properties": {
"bounds": {
"type": "geo_shape"
},
"description": {
"type": "text"
},
"layerListJSON": {
"type": "text"
},
"mapStateJSON": {
"type": "text"
},
"title": {
"type": "text"
},
"uiStateJSON": {
"type": "text"
},
"version": {
"type": "integer"
}
}
},
"maps-telemetry": {
"properties": {
"attributesPerMap": {
"properties": {
"dataSourcesCount": {
"properties": {
"avg": {
"type": "long"
},
"max": {
"type": "long"
},
"min": {
"type": "long"
}
}
},
"emsVectorLayersCount": {
"dynamic": "true",
"type": "object"
},
"layerTypesCount": {
"dynamic": "true",
"type": "object"
},
"layersCount": {
"properties": {
"avg": {
"type": "long"
},
"max": {
"type": "long"
},
"min": {
"type": "long"
}
}
}
}
},
"mapsTotalCount": {
"type": "long"
},
"timeCaptured": {
"type": "date"
}
}
},
"migrationVersion": {
"dynamic": "true",
"properties": {
"index-pattern": {
"fields": {
"keyword": {
"ignore_above": 256,
"type": "keyword"
}
},
"type": "text"
},
"space": {
"fields": {
"keyword": {
"ignore_above": 256,
"type": "keyword"
}
},
"type": "text"
}
}
},
"ml-telemetry": {
"properties": {
"file_data_visualizer": {
"properties": {
"index_creation_count": {
"type": "long"
}
}
}
}
},
"namespace": {
"type": "keyword"
},
"references": {
"properties": {
"id": {
"type": "keyword"
},
"name": {
"type": "keyword"
},
"type": {
"type": "keyword"
}
},
"type": "nested"
},
"sample-data-telemetry": {
"properties": {
"installCount": {
"type": "long"
},
"unInstallCount": {
"type": "long"
}
}
},
"search": {
"properties": {
"columns": {
"type": "keyword"
},
"description": {
"type": "text"
},
"hits": {
"type": "integer"
},
"kibanaSavedObjectMeta": {
"properties": {
"searchSourceJSON": {
"type": "text"
}
}
},
"sort": {
"type": "keyword"
},
"title": {
"type": "text"
},
"version": {
"type": "integer"
}
}
},
"server": {
"properties": {
"uuid": {
"type": "keyword"
}
}
},
"space": {
"properties": {
"_reserved": {
"type": "boolean"
},
"color": {
"type": "keyword"
},
"description": {
"type": "text"
},
"disabledFeatures": {
"type": "keyword"
},
"initials": {
"type": "keyword"
},
"name": {
"fields": {
"keyword": {
"ignore_above": 2048,
"type": "keyword"
}
},
"type": "text"
}
}
},
"spaceId": {
"type": "keyword"
},
"telemetry": {
"properties": {
"enabled": {
"type": "boolean"
}
}
},
"timelion-sheet": {
"properties": {
"description": {
"type": "text"
},
"hits": {
"type": "integer"
},
"kibanaSavedObjectMeta": {
"properties": {
"searchSourceJSON": {
"type": "text"
}
}
},
"timelion_chart_height": {
"type": "integer"
},
"timelion_columns": {
"type": "integer"
},
"timelion_interval": {
"type": "keyword"
},
"timelion_other_interval": {
"type": "keyword"
},
"timelion_rows": {
"type": "integer"
},
"timelion_sheet": {
"type": "text"
},
"title": {
"type": "text"
},
"version": {
"type": "integer"
}
}
},
"type": {
"type": "keyword"
},
"ui-metric": {
"properties": {
"count": {
"type": "integer"
}
}
},
"updated_at": {
"type": "date"
},
"upgrade-assistant-reindex-operation": {
"dynamic": "true",
"properties": {
"indexName": {
"type": "keyword"
},
"status": {
"type": "integer"
}
}
},
"upgrade-assistant-telemetry": {
"properties": {
"features": {
"properties": {
"deprecation_logging": {
"properties": {
"enabled": {
"null_value": true,
"type": "boolean"
}
}
}
}
},
"ui_open": {
"properties": {
"cluster": {
"null_value": 0,
"type": "long"
},
"indices": {
"null_value": 0,
"type": "long"
},
"overview": {
"null_value": 0,
"type": "long"
}
}
},
"ui_reindex": {
"properties": {
"close": {
"null_value": 0,
"type": "long"
},
"open": {
"null_value": 0,
"type": "long"
},
"start": {
"null_value": 0,
"type": "long"
},
"stop": {
"null_value": 0,
"type": "long"
}
}
}
}
},
"url": {
"properties": {
"accessCount": {
"type": "long"
},
"accessDate": {
"type": "date"
},
"createDate": {
"type": "date"
},
"url": {
"fields": {
"keyword": {
"ignore_above": 2048,
"type": "keyword"
}
},
"type": "text"
}
}
},
"visualization": {
"properties": {
"description": {
"type": "text"
},
"kibanaSavedObjectMeta": {
"properties": {
"searchSourceJSON": {
"type": "text"
}
}
},
"savedSearchRefName": {
"type": "keyword"
},
"title": {
"type": "text"
},
"uiStateJSON": {
"type": "text"
},
"version": {
"type": "integer"
},
"visState": {
"type": "text"
}
}
}
}
},
"settings": {
"index": {
"auto_expand_replicas": "0-1",
"number_of_replicas": "0",
"number_of_shards": "1"
}
}
}
}