Skip to content

Commit e693aa7

Browse files
committed
adding test user to maps tests under documents source
1 parent e7b02d0 commit e693aa7

File tree

4 files changed

+46
-0
lines changed

4 files changed

+46
-0
lines changed

x-pack/test/functional/apps/maps/documents_source/docvalue_fields.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,18 @@ export default function ({ getPageObjects, getService }) {
1010
const PageObjects = getPageObjects(['maps']);
1111
const inspector = getService('inspector');
1212
const testSubjects = getService('testSubjects');
13+
const security = getService('security');
1314

1415
describe('docvalue_fields', () => {
1516
before(async () => {
17+
await security.testUser.setRoles(['global_maps_all', 'test_logstash_reader'], false);
1618
await PageObjects.maps.loadSavedMap('document example');
1719
});
1820

21+
after(async () => {
22+
await security.testUser.restoreDefaults();
23+
});
24+
1925
async function getResponse() {
2026
await inspector.open();
2127
await inspector.openInspectorRequestsView();

x-pack/test/functional/apps/maps/documents_source/search_hits.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,26 @@ import expect from '@kbn/expect';
99
export default function ({ getPageObjects, getService }) {
1010
const PageObjects = getPageObjects(['maps']);
1111
const inspector = getService('inspector');
12+
const security = getService('security');
1213

1314
describe('search hits', () => {
1415
before(async () => {
16+
await security.testUser.setRoles(
17+
[
18+
'global_maps_all',
19+
'test_logstash_reader',
20+
'antimeridian_points_reader',
21+
'antimeridian_shapes_reader',
22+
],
23+
false
24+
);
1525
await PageObjects.maps.loadSavedMap('document example');
1626
});
1727

28+
after(async () => {
29+
await security.testUser.restoreDefaults();
30+
});
31+
1832
async function getRequestTimestamp() {
1933
await inspector.open();
2034
await inspector.openInspectorRequestsView();

x-pack/test/functional/apps/maps/documents_source/top_hits.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,19 @@ export default function ({ getPageObjects, getService }) {
1212
const PageObjects = getPageObjects(['maps', 'common']);
1313
const inspector = getService('inspector');
1414
const find = getService('find');
15+
const security = getService('security');
1516

1617
describe('geo top hits', () => {
1718
describe('split on string field', () => {
1819
before(async () => {
20+
await security.testUser.setRoles(['global_maps_all', 'test_logstash_reader'], false);
1921
await PageObjects.maps.loadSavedMap('document example top hits');
2022
});
2123

24+
after(async () => {
25+
await security.testUser.restoreDefaults();
26+
});
27+
2228
it('should not fetch any search hits', async () => {
2329
await inspector.open();
2430
await inspector.openInspectorRequestsView();

x-pack/test/functional/config.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,26 @@ export default async function ({ readConfigFile }) {
287287
],
288288
},
289289
},
290+
antimeridian_points_reader: {
291+
elasticsearch: {
292+
indices: [
293+
{
294+
names: ['antimeridian_points*'],
295+
privileges: ['read', 'view_index_metadata'],
296+
},
297+
],
298+
},
299+
},
300+
antimeridian_shapes_reader: {
301+
elasticsearch: {
302+
indices: [
303+
{
304+
names: ['antimeridian_shapes*'],
305+
privileges: ['read', 'view_index_metadata'],
306+
},
307+
],
308+
},
309+
},
290310

291311
geoconnections_data_reader: {
292312
elasticsearch: {

0 commit comments

Comments
 (0)