Skip to content

Commit

Permalink
[EDR Workflows] Unskip metering cypress (elastic#194404)
Browse files Browse the repository at this point in the history
Closes elastic#187083

Moved the `login()` to `beforeEach` because placing it in `before`
caused the session to remain unauthorized during test execution.
  • Loading branch information
szwarckonrad authored Sep 30, 2024
1 parent b005ea9 commit 31447b1
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,16 @@
import { recurse } from 'cypress-recurse';
import type { UsageRecord } from '@kbn/security-solution-serverless/server/types';
import { METERING_SERVICE_BATCH_SIZE } from '@kbn/security-solution-serverless/server/constants';
import { login, ROLE } from '../../tasks/login';
import {
getInterceptedRequestsFromTransparentApiProxy,
startTransparentApiProxy,
stopTransparentApiProxy,
} from '../../tasks/transparent_api_proxy';
import type { ReturnTypeFromChainable } from '../../types';
import { indexEndpointHeartbeats } from '../../tasks/index_endpoint_heartbeats';
import { login, ROLE } from '../../tasks/login';

// Failing: See https://github.com/elastic/kibana/issues/187083
describe.skip(
describe(
'Metering',
{
tags: ['@serverless', '@skipInServerlessMKI'],
Expand All @@ -39,7 +38,6 @@ describe.skip(
let endpointData: ReturnTypeFromChainable<typeof indexEndpointHeartbeats> | undefined;

before(() => {
login(ROLE.system_indices_superuser);
startTransparentApiProxy({ port: 3623 });
indexEndpointHeartbeats({
count: HEARTBEAT_COUNT,
Expand All @@ -49,6 +47,10 @@ describe.skip(
});
});

beforeEach(() => {
login(ROLE.system_indices_superuser);
});

after(() => {
if (endpointData) {
endpointData.cleanup();
Expand Down

0 comments on commit 31447b1

Please sign in to comment.