Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security Solution] fix/unskip endpoint metering tests #189993

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,9 @@ export class Authenticator {
});
existingSessionValue = null;
} else if (usernameHasChanged) {
this.logger.warn(
`~~~old ${existingSessionValue!.username} | ~~~new ${authenticationResult.user!.username}`
);
this.logger.warn('Username has changed, existing session will be invalidated.');
await this.invalidateSessionValue({ request, sessionValue: existingSessionValue });
existingSessionValue = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const getCypressBaseConfig = (
// baseUrl: To override, set Env. variable `CYPRESS_BASE_URL`
baseUrl: 'http://localhost:5601',
supportFile: 'public/management/cypress/support/e2e.ts',
specPattern: 'public/management/cypress/e2e/**/*.cy.{js,jsx,ts,tsx}',
specPattern: 'public/management/cypress/e2e/**/metering.cy.{js,jsx,ts,tsx}',
experimentalRunAllSpecs: true,
experimentalMemoryManagement: true,
experimentalInteractiveRunEvents: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ 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,6 +38,7 @@ describe.skip(
let endpointData: ReturnTypeFromChainable<typeof indexEndpointHeartbeats> | undefined;

before(() => {
login(ROLE.system_indices_superuser);
login(ROLE.system_indices_superuser);
startTransparentApiProxy({ port: 3623 });
indexEndpointHeartbeats({
Expand Down