Skip to content

Commit 4b47f78

Browse files
Watcher -functional xpack test using test_user with specific permissions. (#89068)
* fixes #74449 * watcher test with specific permissions * adding the false parameter Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
1 parent 5d60ad8 commit 4b47f78

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

x-pack/test/functional/apps/watcher/watcher_test.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,15 @@ export default function ({ getService, getPageObjects }) {
1515
const retry = getService('retry');
1616
const testSubjects = getService('testSubjects');
1717
const log = getService('log');
18+
const security = getService('security');
1819
const esSupertest = getService('esSupertest');
1920
const PageObjects = getPageObjects(['security', 'common', 'header', 'settings', 'watcher']);
2021

21-
// Still flaky test :c
22-
// https://github.com/elastic/kibana/pull/56361
23-
// https://github.com/elastic/kibana/pull/56304
24-
describe.skip('watcher_test', function () {
22+
describe('watcher_test', function () {
2523
before('initialize tests', async () => {
2624
// There may be system watches if monitoring was previously enabled
2725
// These cannot be deleted via the UI, so we need to delete via the API
26+
await security.testUser.setRoles(['kibana_admin', 'watcher_admin'], false);
2827
const watches = await esSupertest.get('/.watches/_search');
2928

3029
if (watches.status === 200) {
@@ -56,6 +55,10 @@ export default function ({ getService, getPageObjects }) {
5655
});
5756
});
5857

58+
after(async () => {
59+
await security.testUser.restoreDefaults();
60+
});
61+
5962
it('create and save a new watch', async () => {
6063
await PageObjects.watcher.createWatch(watchID, watchName);
6164
const watch = await PageObjects.watcher.getWatch(watchID);

0 commit comments

Comments
 (0)