Skip to content

Commit

Permalink
removes reference to esArchiver key in config and updates path of esA…
Browse files Browse the repository at this point in the history
…rchiver data (elastic#16)
  • Loading branch information
dhurley14 authored and yctercero committed Jul 5, 2021
1 parent 064aa68 commit 8e98974
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion x-pack/test/rule_registry/common/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export function createTestConfig(name: string, options: CreateTestConfigOptions)
junit: {
reportName: 'X-Pack Case API Integration Tests',
},
esArchiver: xPackApiIntegrationTestsConfig.get('esArchiver'),
esTestCluster: {
...xPackApiIntegrationTestsConfig.get('esTestCluster'),
license,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default ({ getService }: FtrProviderContext) => {

describe('rbac', () => {
before(async () => {
await esArchiver.load('rule_registry/alerts');
await esArchiver.load('x-pack/test/functional/es_archives/rule_registry/alerts');
});
describe('Users:', () => {
it(`${superUser.username} should be able to access the APM alert in ${SPACE1}`, async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,18 @@ export default ({ getService }: FtrProviderContext) => {
describe('rbac', () => {
describe('Users update:', () => {
beforeEach(async () => {
await esArchiver.load('rule_registry/alerts');
await esArchiver.load('x-pack/test/functional/es_archives/rule_registry/alerts');
});
afterEach(async () => {
await esArchiver.unload('rule_registry/alerts');
await esArchiver.unload('x-pack/test/functional/es_archives/rule_registry/alerts');
});
it(`${superUser.username} should be able to update the APM alert in ${SPACE1}`, async () => {
const apmIndex = await getAPMIndexName(superUser);
await supertestWithoutAuth
.post(`${getSpaceUrlPrefix(SPACE1)}${TEST_URL}`)
.auth(superUser.username, superUser.password)
.set('kbn-xsrf', 'true')
.send({ ids: ['NoxgpHkBqbdrfX07MqXV'], status: 'closed', indexName: apmIndex })
.send({ ids: ['NoxgpHkBqbdrfX07MqXV'], status: 'closed', index: apmIndex })
.expect(200);
});

Expand All @@ -66,7 +66,7 @@ export default ({ getService }: FtrProviderContext) => {
.post(`${getSpaceUrlPrefix(SPACE1)}${TEST_URL}`)
.auth(obsOnlySpacesAll.username, obsOnlySpacesAll.password)
.set('kbn-xsrf', 'true')
.send({ ids: ['NoxgpHkBqbdrfX07MqXV'], status: 'closed', indexName: apmIndex })
.send({ ids: ['NoxgpHkBqbdrfX07MqXV'], status: 'closed', index: apmIndex })
.expect(200);
});
it(`${obsOnlyReadSpacesAll.username} should NOT be able to update the APM alert in ${SPACE1}`, async () => {
Expand All @@ -75,7 +75,7 @@ export default ({ getService }: FtrProviderContext) => {
.post(`${getSpaceUrlPrefix(SPACE1)}${TEST_URL}`)
.auth(obsOnlyReadSpacesAll.username, obsOnlyReadSpacesAll.password)
.set('kbn-xsrf', 'true')
.send({ ids: ['NoxgpHkBqbdrfX07MqXV'], status: 'closed', indexName: apmIndex })
.send({ ids: ['NoxgpHkBqbdrfX07MqXV'], status: 'closed', index: apmIndex })
.expect(403);
});

Expand All @@ -99,7 +99,7 @@ export default ({ getService }: FtrProviderContext) => {
.send({
ids: ['NoxgpHkBqbdrfX07MqXV'],
status: 'closed',
indexName: apmIndex,
index: apmIndex,
})
.expect(403);
});
Expand Down

0 comments on commit 8e98974

Please sign in to comment.