Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding test user to maps functional tests #77119

Merged
merged 8 commits into from
Sep 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions x-pack/test/functional/apps/maps/es_geo_grid_source.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,25 @@ export default function ({ getPageObjects, getService }) {
const PageObjects = getPageObjects(['maps']);
const inspector = getService('inspector');
const DOC_COUNT_PROP_NAME = 'doc_count';
const security = getService('security');

describe('layer geo grid aggregation source', () => {
const EXPECTED_NUMBER_FEATURES_ZOOMED_OUT = 4;
const EXPECTED_NUMBER_FEATURES_ZOOMED_IN = 6;
const DATA_CENTER_LON = -98;
const DATA_CENTER_LAT = 38;

before(async () => {
await security.testUser.setRoles(
['global_maps_all', 'test_logstash_reader', 'geoshape_data_reader'],
false
);
});

after(async () => {
await security.testUser.restoreDefaults();
});

async function getRequestTimestamp() {
await inspector.open();
await inspector.openInspectorRequestsView();
Expand Down
6 changes: 6 additions & 0 deletions x-pack/test/functional/apps/maps/joins.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,20 @@ const TOO_MANY_FEATURES_LAYER_INDEX = 4;
export default function ({ getPageObjects, getService }) {
const PageObjects = getPageObjects(['maps']);
const inspector = getService('inspector');
const security = getService('security');

describe('layer with joins', () => {
before(async () => {
await security.testUser.setRoles(
['global_maps_all', 'geoshape_data_reader', 'meta_for_geoshape_data_reader'],
false
);
await PageObjects.maps.loadSavedMap('join example');
});

after(async () => {
await inspector.close();
await security.testUser.restoreDefaults();
});

it('should re-fetch join with refresh timer', async () => {
Expand Down
3 changes: 3 additions & 0 deletions x-pack/test/functional/apps/maps/mvt_scaling.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@ const VECTOR_SOURCE_ID = 'caffa63a-ebfb-466d-8ff6-d797975b88ab';
export default function ({ getPageObjects, getService }) {
const PageObjects = getPageObjects(['maps']);
const inspector = getService('inspector');
const security = getService('security');

describe('mvt geoshape layer', () => {
before(async () => {
await security.testUser.setRoles(['global_maps_all', 'geoshape_data_reader'], false);
await PageObjects.maps.loadSavedMap('geo_shape_mvt');
});

after(async () => {
await inspector.close();
await security.testUser.restoreDefaults();
});

it('should render with mvt-source', async () => {
Expand Down
11 changes: 11 additions & 0 deletions x-pack/test/functional/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,17 @@ export default async function ({ readConfigFile }) {
},
},

meta_for_geoshape_data_reader: {
elasticsearch: {
indices: [
{
names: ['meta_for_geo_shapes*'],
privileges: ['read', 'view_index_metadata'],
},
],
},
},

geoconnections_data_reader: {
elasticsearch: {
indices: [
Expand Down