Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kdelemme committed Oct 17, 2024
1 parent d8c7b52 commit 85449d3
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export default function ({ getService }: DeploymentAgnosticFtrProviderContext) {
await dataViewApi.delete({ roleAuthc: adminRoleAuthc, id: DATA_VIEW_ID });
await cleanup({ client: esClient, config: DATA_FORGE_CONFIG, logger });
await sloApi.deleteAllSLOs(adminRoleAuthc);
await samlAuth.invalidateM2mApiKeyWithRoleScope(adminRoleAuthc);
});

it('creates a new slo and transforms', async () => {
Expand Down Expand Up @@ -127,7 +128,7 @@ export default function ({ getService }: DeploymentAgnosticFtrProviderContext) {
expect(apiResponse).property('id');
const { id } = apiResponse;

await retry.tryForTime(300 * 1000, async () => {
await retry.tryForTime(180 * 1000, async () => {
const response = await esClient.search(getRollupDataEsQuery(id));

// @ts-ignore
Expand All @@ -146,7 +147,7 @@ export default function ({ getService }: DeploymentAgnosticFtrProviderContext) {
expect(apiResponse).property('id');
const { id } = apiResponse;

await retry.tryForTime(300 * 1000, async () => {
await retry.tryForTime(180 * 1000, async () => {
const response = await esClient.search(getRollupDataEsQuery(id));

// @ts-ignore
Expand Down Expand Up @@ -180,7 +181,7 @@ export default function ({ getService }: DeploymentAgnosticFtrProviderContext) {
expect(apiResponse).property('id');
const { id } = apiResponse;

await retry.tryForTime(300 * 1000, async () => {
await retry.tryForTime(180 * 1000, async () => {
const response = await esClient.search(getRollupDataEsQuery(id));

// @ts-ignore
Expand All @@ -196,7 +197,7 @@ export default function ({ getService }: DeploymentAgnosticFtrProviderContext) {
expect(apiResponse).property('id');
const { id } = apiResponse;

await retry.tryForTime(300 * 1000, async () => {
await retry.tryForTime(180 * 1000, async () => {
const response = await esClient.search(getRollupDataEsQuery(id));

// @ts-ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export default function ({ getService }: DeploymentAgnosticFtrProviderContext) {
await dataViewApi.delete({ roleAuthc: adminRoleAuthc, id: DATA_VIEW_ID });
await cleanup({ client: esClient, config: DATA_FORGE_CONFIG, logger });
await sloApi.deleteAllSLOs(adminRoleAuthc);
await samlAuth.invalidateM2mApiKeyWithRoleScope(adminRoleAuthc);
});

it('deletes SLO and related resources', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export default function ({ getService }: DeploymentAgnosticFtrProviderContext) {
await dataViewApi.delete({ roleAuthc: adminRoleAuthc, id: DATA_VIEW_ID });
await cleanup({ client: esClient, config: DATA_FORGE_CONFIG, logger });
await sloApi.deleteAllSLOs(adminRoleAuthc);
await samlAuth.invalidateM2mApiKeyWithRoleScope(adminRoleAuthc);
});

it('searches SLOs', async () => {
Expand All @@ -61,7 +62,7 @@ export default function ({ getService }: DeploymentAgnosticFtrProviderContext) {
const sloId2 = createResponse2.id;

// search SLOs
await retry.tryForTime(360 * 1000, async () => {
await retry.tryForTime(180 * 1000, async () => {
let response = await supertestWithoutAuth
.get(`/api/observability/slos`)
.set(adminRoleAuthc.apiKeyHeader)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export default function ({ getService }: DeploymentAgnosticFtrProviderContext) {
await dataViewApi.delete({ roleAuthc: adminRoleAuthc, id: DATA_VIEW_ID });
await cleanup({ client: esClient, config: DATA_FORGE_CONFIG, logger });
await sloApi.deleteAllSLOs(adminRoleAuthc);
await samlAuth.invalidateM2mApiKeyWithRoleScope(adminRoleAuthc);
});

it('get SLO by id', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export default function ({ getService }: DeploymentAgnosticFtrProviderContext) {
await dataViewApi.delete({ roleAuthc: adminRoleAuthc, id: DATA_VIEW_ID });
await cleanup({ client: esClient, config: DATA_FORGE_CONFIG, logger });
await sloApi.deleteAllSLOs(adminRoleAuthc);
await samlAuth.invalidateM2mApiKeyWithRoleScope(adminRoleAuthc);
});

it('resets the related resources', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export default function ({ getService }: DeploymentAgnosticFtrProviderContext) {
await dataViewApi.delete({ roleAuthc: adminRoleAuthc, id: DATA_VIEW_ID });
await cleanup({ client: esClient, config: DATA_FORGE_CONFIG, logger });
await sloApi.deleteAllSLOs(adminRoleAuthc);
await samlAuth.invalidateM2mApiKeyWithRoleScope(adminRoleAuthc);
});

it('updates the definition without a revision bump', async () => {
Expand Down

0 comments on commit 85449d3

Please sign in to comment.