mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
(cherry picked from commit 2ba281b8aa
)
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
This commit is contained in:
parent
af4610ab24
commit
c91b1a5916
2 changed files with 6 additions and 4 deletions
|
@ -34,11 +34,9 @@ export class Role {
|
|||
path: `/api/security/role/${name}`,
|
||||
method: 'DELETE',
|
||||
});
|
||||
if (status !== 204 && status !== 404) {
|
||||
if (status !== 204) {
|
||||
throw new Error(
|
||||
`Expected status code of 204 or 404, received ${status} ${statusText}: ${util.inspect(
|
||||
data
|
||||
)}`
|
||||
`Expected status code of 204, received ${status} ${statusText}: ${util.inspect(data)}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const retry = getService('retry');
|
||||
const log = getService('log');
|
||||
const screenshot = getService('screenshots');
|
||||
const security = getService('security');
|
||||
const PageObjects = getPageObjects(['security', 'common', 'header', 'discover', 'settings']);
|
||||
const kibanaServer = getService('kibanaServer');
|
||||
|
||||
|
@ -80,9 +81,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const rowData = await PageObjects.discover.getDocTableIndex(1);
|
||||
expect(rowData).to.contain('EAST');
|
||||
});
|
||||
|
||||
after('logout', async () => {
|
||||
// NOTE: Logout needs to happen before anything else to avoid flaky behavior
|
||||
await PageObjects.security.forceLogout();
|
||||
await security.user.delete('userEast');
|
||||
await security.role.delete('myroleEast');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue