Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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)
dhurley14 authored and yctercero committed Jul 5, 2021

Unverified

No user is associated with the committer email.
1 parent 064aa68 commit 8e98974
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
@@ -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,
Original file line number Diff line number Diff line change
@@ -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 () => {
Original file line number Diff line number Diff line change
@@ -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);
});

@@ -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 () => {
@@ -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);
});

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

0 comments on commit 8e98974

Please sign in to comment.