Skip to content

Commit

Permalink
Migrated Ingest Node Pipeline Functional Tests to use test_user (elas…
Browse files Browse the repository at this point in the history
…tic#102409)

* Used test user and added appropriate kibana privileges for Ingest Node Pipeline functional tests.

* Updated ingest pipelines test config to have read permissions in advanced settings.

* Updated test to account for the fact that advanced settings will be visible due to kibana permissions.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
John Dorlus and kibanamachine committed Jun 18, 2021
1 parent 2ffcc76 commit 4dfd15a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
it('should render the "Ingest" section with ingest pipelines', async () => {
await PageObjects.common.navigateToApp('management');
const sections = await managementMenu.getSections();
expect(sections).to.have.length(1);
// We gave the ingest node pipelines user access to advanced settings to allow them to use ingest node pipelines.
// See https://github.com/elastic/kibana/pull/102409/
expect(sections).to.have.length(2);
expect(sections[0]).to.eql({
sectionId: 'ingest',
sectionLinks: ['ingest_pipelines'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
const pageObjects = getPageObjects(['common', 'ingestPipelines']);
const log = getService('log');
const es = getService('es');
const security = getService('security');

describe('Ingest Pipelines', function () {
this.tags('smoke');
before(async () => {
await security.testUser.setRoles(['ingest_pipelines_user']);
await pageObjects.common.navigateToApp('ingestPipelines');
});

Expand All @@ -46,6 +48,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
after(async () => {
// Delete the pipeline that was created
await es.ingest.deletePipeline({ id: PIPELINE.name });
await security.testUser.restoreDefaults();
});
});
};
8 changes: 8 additions & 0 deletions x-pack/test/functional/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,14 @@ export default async function ({ readConfigFile }) {
elasticsearch: {
cluster: ['manage_pipeline', 'cluster:monitor/nodes/info'],
},
kibana: [
{
feature: {
advancedSettings: ['read'],
},
spaces: ['*'],
},
],
},

license_management_user: {
Expand Down

0 comments on commit 4dfd15a

Please sign in to comment.