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

Cross cluster search functional test with minimun privileges assigned to the test_user #70007

Merged
merged 17 commits into from
Jun 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
89eee46
using test_user with limited read permission to search profiler test
rashmivkulkarni Jun 24, 2020
b64135a
gitcheck
rashmivkulkarni Jun 24, 2020
3577e73
search profiler test using test_user
rashmivkulkarni Jun 24, 2020
7601367
Merge branch 'master' of github.com:elastic/kibana into cross_cluster…
rashmivkulkarni Jun 25, 2020
0a2308a
using limited roles and privileges for CCR
rashmivkulkarni Jun 25, 2020
20c388a
changed the global ccr role kibana section to be consistent with othe…
rashmivkulkarni Jun 25, 2020
dbba499
removed canvas role
rashmivkulkarni Jun 25, 2020
0da8520
Merge branch 'master' of github.com:elastic/kibana into cross_cluster…
rashmivkulkarni Jun 26, 2020
8fe06a7
Merge branch 'master' into cross_cluster_search
elasticmachine Jun 26, 2020
f6eac83
Merge branch 'master' into cross_cluster_search
elasticmachine Jun 26, 2020
f304e3a
Merge branch 'master' into cross_cluster_search
elasticmachine Jun 26, 2020
13d676d
Merge branch 'master' into cross_cluster_search
elasticmachine Jun 26, 2020
b9a7aaf
Merge branch 'master' of github.com:elastic/kibana into cross_cluster…
rashmivkulkarni Jun 26, 2020
b283485
changes to include pagination for 100 rows
rashmivkulkarni Jun 27, 2020
c292acb
Merge branch 'cross_cluster_search' of github.com:rasroh/kibana into …
rashmivkulkarni Jun 27, 2020
4322db4
Merge branch 'master' into cross_cluster_search
elasticmachine Jun 27, 2020
d6c1b44
Merge branch 'master' into cross_cluster_search
elasticmachine Jun 29, 2020
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,20 @@ import { FtrProviderContext } from '../../ftr_provider_context';
export default ({ getPageObjects, getService }: FtrProviderContext) => {
const pageObjects = getPageObjects(['common', 'crossClusterReplication']);
const log = getService('log');
const security = getService('security');

describe('Home page', function () {
before(async () => {
await security.testUser.setRoles(['global_ccr_role']);
await pageObjects.common.navigateToApp('crossClusterReplication');
});

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

it('Loads the app', async () => {
await log.debug(`Checking for app title to be Cross-Cluster Replication`);
log.debug(`Checking for app title to be Cross-Cluster Replication`);
const appTitleText = await pageObjects.crossClusterReplication.appTitleText();
expect(appTitleText).to.be('Cross-Cluster Replication');

Expand Down
14 changes: 14 additions & 0 deletions x-pack/test/functional/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,20 @@ export default async function ({ readConfigFile }) {
],
},

global_ccr_role: {
elasticsearch: {
cluster: ['manage', 'manage_ccr'],
},
kibana: [
{
feature: {
discover: ['read'],
},
spaces: ['*'],
},
],
},

//Kibana feature privilege isn't specific to advancedSetting. It can be anything. https://github.com/elastic/kibana/issues/35965
test_api_keys: {
elasticsearch: {
Expand Down
4 changes: 4 additions & 0 deletions x-pack/test/functional/page_objects/security_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ export function SecurityPageProvider({ getService, getPageObjects }: FtrProvider

async getElasticsearchUsers() {
const users = [];
await testSubjects.click('tablePaginationPopoverButton');
await testSubjects.click('tablePagination-100-rows');
for (const user of await testSubjects.findAll('userRow')) {
const fullnameElement = await user.findByTestSubject('userRowFullName');
const usernameElement = await user.findByTestSubject('userRowUserName');
Expand All @@ -339,6 +341,8 @@ export function SecurityPageProvider({ getService, getPageObjects }: FtrProvider

async getElasticsearchRoles() {
const roles = [];
await testSubjects.click('tablePaginationPopoverButton');
await testSubjects.click('tablePagination-100-rows');
for (const role of await testSubjects.findAll('roleRow')) {
const [rolename, reserved, deprecated] = await Promise.all([
role.findByTestSubject('roleRowName').then((el) => el.getVisibleText()),
Expand Down