[Cloud Security] Removing CSPM version 1.13.0-preview02 dependency for E2E tests (#214824)

This commit is contained in:
seanrathier 2025-04-01 11:01:47 -04:00 committed by GitHub
parent 005940ce48
commit 1548f32afd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 37 additions and 33 deletions

View file

@ -8,7 +8,7 @@
import * as http from 'http';
import expect from '@kbn/expect';
import equals from 'fast-deep-equal';
import { AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION } from '../constants';
import { CLOUD_SECURITY_POSTURE_PACKAGE_VERSION } from '../constants';
import type { FtrProviderContext } from '../ftr_provider_context';
import { setupMockServer } from './mock_agentless_api';
import { testSubjectIds } from '../constants/test_subject_ids';
@ -47,7 +47,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
it(`should create agentless-agent`, async () => {
const integrationPolicyName = `cloud_security_posture-${new Date().toISOString()}`;
await cisIntegration.navigateToAddIntegrationCspmWithVersionPage(
AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION
CLOUD_SECURITY_POSTURE_PACKAGE_VERSION
);
await cisIntegration.clickOptionButton(CIS_AWS_OPTION_TEST_ID);
@ -88,7 +88,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
it(`should show setup technology selector in edit mode`, async () => {
const integrationPolicyName = `cloud_security_posture-${new Date().toISOString()}`;
await cisIntegration.navigateToAddIntegrationCspmWithVersionPage(
AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION
CLOUD_SECURITY_POSTURE_PACKAGE_VERSION
);
await cisIntegration.clickOptionButton(CIS_AWS_OPTION_TEST_ID);
@ -122,7 +122,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
it(`should hide setup technology selector in edit mode`, async () => {
const integrationPolicyName = `cloud_security_posture1-${new Date().toISOString()}`;
await cisIntegration.navigateToAddIntegrationCspmWithVersionPage(
AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION
CLOUD_SECURITY_POSTURE_PACKAGE_VERSION
);
await cisIntegration.clickOptionButton(CIS_AWS_OPTION_TEST_ID);
@ -155,7 +155,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const integrationPolicyName = `cloud_security_posture-${new Date().toISOString()}`;
await cisIntegration.navigateToAddIntegrationCspmWithVersionPage(
AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION
CLOUD_SECURITY_POSTURE_PACKAGE_VERSION
);
await cisIntegration.clickOptionButton(CIS_AWS_OPTION_TEST_ID);

View file

@ -6,7 +6,7 @@
*/
import expect from '@kbn/expect';
import { AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION } from '../constants';
import { CLOUD_SECURITY_POSTURE_PACKAGE_VERSION } from '../constants';
import type { FtrProviderContext } from '../ftr_provider_context';
// eslint-disable-next-line import/no-default-export
export default function ({ getPageObjects, getService }: FtrProviderContext) {
@ -38,7 +38,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
it(`should show kspm without agentless option`, async () => {
await cisIntegration.navigateToAddIntegrationWithVersionPage(
AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION
CLOUD_SECURITY_POSTURE_PACKAGE_VERSION
);
await pageObjects.header.waitUntilLoadingHasFinished();
@ -57,7 +57,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
it(`should show cnvm without agentless option`, async () => {
// const integrationPolicyName = `cloud_security_posture-${new Date().toISOString()}`;
await cisIntegration.navigateToAddIntegrationWithVersionPage(
AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION
CLOUD_SECURITY_POSTURE_PACKAGE_VERSION
);
await pageObjects.header.waitUntilLoadingHasFinished();
@ -75,7 +75,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
it(`should show cspm with agentless option`, async () => {
await cisIntegration.navigateToAddIntegrationWithVersionPage(
AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION
CLOUD_SECURITY_POSTURE_PACKAGE_VERSION
);
await pageObjects.header.waitUntilLoadingHasFinished();

View file

@ -7,7 +7,7 @@
import type { FtrConfigProviderContext } from '@kbn/test';
import { CA_CERT_PATH, KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils';
import { AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION } from './constants';
import { CLOUD_SECURITY_POSTURE_PACKAGE_VERSION } from './constants';
import { pageObjects } from './page_objects';
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
@ -32,7 +32,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
`--xpack.fleet.agentless.api.tls.ca=${CA_CERT_PATH}`,
`--xpack.cloud.id=something-anything`,
`--xpack.fleet.packages.0.name=cloud_security_posture`,
`--xpack.fleet.packages.0.version=${AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION}`,
`--xpack.fleet.packages.0.version=${CLOUD_SECURITY_POSTURE_PACKAGE_VERSION}`,
],
},
// load tests in the index file

View file

@ -5,4 +5,4 @@
* 2.0.
*/
export const AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION = '1.13.0-preview02';
export const CLOUD_SECURITY_POSTURE_PACKAGE_VERSION = '1.13.0';

View file

@ -6,7 +6,7 @@
*/
import { CA_CERT_PATH, KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils';
import { AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION } from './constants';
import { CLOUD_SECURITY_POSTURE_PACKAGE_VERSION } from './constants';
import { createTestConfig } from '../../config.base';
// TODO: Remove the agentless default config once Serverless API is merged and default policy is deleted
@ -19,7 +19,7 @@ export default createTestConfig({
`--xpack.cloud.serverless.project_id=some_fake_project_id`,
`--xpack.fleet.packages.0.name=cloud_security_posture`,
`--xpack.fleet.packages.0.version=${AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION}`,
`--xpack.fleet.packages.0.version=${CLOUD_SECURITY_POSTURE_PACKAGE_VERSION}`,
`--xpack.fleet.agentless.enabled=true`,
`--xpack.fleet.agents.fleet_server.hosts=["https://ftr.kibana:8220"]`,
`--xpack.fleet.internal.fleetServerStandalone=true`,

View file

@ -6,4 +6,8 @@
*/
export const SECURITY_ES_ARCHIVES_DIR = 'x-pack/test/security_solution_cypress/es_archives';
export const AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION = '1.13.0-preview02';
export const CLOUD_SECURITY_POSTURE_PACKAGE_VERSION = '1.13.0';
// This version of the CSPM package is used in the Serverless Quality Gates environment
// since our Serverless environment should be using the latest released version of the package
export const CLOUD_SECURITY_POSTURE_PACKAGE_VERSION_QUALITY_GATES = '1.13.0';

View file

@ -6,7 +6,7 @@
*/
import expect from '@kbn/expect';
import * as http from 'http';
import { AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION } from '../../../constants';
import { CLOUD_SECURITY_POSTURE_PACKAGE_VERSION } from '../../../constants';
import type { FtrProviderContext } from '../../../../../ftr_provider_context';
import { setupMockServer } from './mock_agentless_api';
export default function ({ getPageObjects, getService }: FtrProviderContext) {
@ -40,7 +40,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
after(async () => {
await supertest
.delete(
`/api/fleet/epm/packages/cloud_security_posture/${AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION}`
`/api/fleet/epm/packages/cloud_security_posture/${CLOUD_SECURITY_POSTURE_PACKAGE_VERSION}`
)
.set('kbn-xsrf', 'xxxx')
.send({ force: true })
@ -49,9 +49,9 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});
describe('Serverless - Agentless CIS_AWS Single Account Launch Cloud formation', () => {
it(`should show CIS_AWS Launch Cloud formation button when credentials selector is direct access keys and package version is ${AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION}`, async () => {
it(`should show CIS_AWS Launch Cloud formation button when credentials selector is direct access keys and package version is ${CLOUD_SECURITY_POSTURE_PACKAGE_VERSION}`, async () => {
await cisIntegration.navigateToAddIntegrationCspmWithVersionPage(
AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION
CLOUD_SECURITY_POSTURE_PACKAGE_VERSION
);
await pageObjects.header.waitUntilLoadingHasFinished();
@ -73,9 +73,9 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});
describe('Serverless - Agentless CIS_AWS ORG Account Launch Cloud formation', () => {
it(`should show CIS_AWS Launch Cloud formation button when credentials selector is direct access keys and package version is ${AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION}`, async () => {
it(`should show CIS_AWS Launch Cloud formation button when credentials selector is direct access keys and package version is ${CLOUD_SECURITY_POSTURE_PACKAGE_VERSION}`, async () => {
await cisIntegration.navigateToAddIntegrationCspmWithVersionPage(
AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION
CLOUD_SECURITY_POSTURE_PACKAGE_VERSION
);
await pageObjects.header.waitUntilLoadingHasFinished();

View file

@ -7,7 +7,7 @@
import expect from '@kbn/expect';
import * as http from 'http';
import { AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION } from '../../../constants';
import { CLOUD_SECURITY_POSTURE_PACKAGE_VERSION } from '../../../constants';
import type { FtrProviderContext } from '../../../../../ftr_provider_context';
import { setupMockServer } from './mock_agentless_api';
export default function ({ getPageObjects, getService }: FtrProviderContext) {
@ -36,7 +36,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
after(async () => {
await supertest
.delete(
`/api/fleet/epm/packages/cloud_security_posture/${AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION}`
`/api/fleet/epm/packages/cloud_security_posture/${CLOUD_SECURITY_POSTURE_PACKAGE_VERSION}`
)
.set('kbn-xsrf', 'xxxx')
.send({ force: true })
@ -45,9 +45,9 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});
describe('Agentless CIS_GCP Single Account Launch Cloud shell', () => {
it(`should show CIS_GCP Launch Cloud Shell button when package version is ${AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION}`, async () => {
it(`should show CIS_GCP Launch Cloud Shell button when package version is ${CLOUD_SECURITY_POSTURE_PACKAGE_VERSION}`, async () => {
await cisIntegration.navigateToAddIntegrationCspmWithVersionPage(
AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION
CLOUD_SECURITY_POSTURE_PACKAGE_VERSION
);
await cisIntegration.clickOptionButton(testSubjectIds.CIS_GCP_OPTION_TEST_ID);
@ -62,9 +62,9 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});
describe('Agentless CIS_GCP ORG Account Launch Cloud Shell', () => {
it(`should show CIS_GCP Launch Cloud Shell button when package version is ${AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION}`, async () => {
it(`should show CIS_GCP Launch Cloud Shell button when package version is ${CLOUD_SECURITY_POSTURE_PACKAGE_VERSION}`, async () => {
await cisIntegration.navigateToAddIntegrationCspmWithVersionPage(
AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION
CLOUD_SECURITY_POSTURE_PACKAGE_VERSION
);
await cisIntegration.clickOptionButton(testSubjectIds.CIS_GCP_OPTION_TEST_ID);

View file

@ -7,7 +7,7 @@
import * as http from 'http';
import expect from '@kbn/expect';
import { AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION } from '../../../constants';
import { CLOUD_SECURITY_POSTURE_PACKAGE_VERSION } from '../../../constants';
import { setupMockServer } from './mock_agentless_api';
import type { FtrProviderContext } from '../../../../../ftr_provider_context';
export default function ({ getPageObjects, getService }: FtrProviderContext) {
@ -44,7 +44,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
it(`should create agentless-agent`, async () => {
const integrationPolicyName = `cloud_security_posture-${new Date().toISOString()}`;
await cisIntegration.navigateToAddIntegrationCspmWithVersionPage(
AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION
CLOUD_SECURITY_POSTURE_PACKAGE_VERSION
);
await cisIntegration.clickOptionButton(CIS_AWS_OPTION_TEST_ID);
@ -77,7 +77,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const integrationPolicyName = `cloud_security_posture-${new Date().toISOString()}`;
await cisIntegration.navigateToAddIntegrationCspmWithVersionPage(
AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION
CLOUD_SECURITY_POSTURE_PACKAGE_VERSION
);
await pageObjects.header.waitUntilLoadingHasFinished();

View file

@ -6,7 +6,7 @@
*/
import expect from '@kbn/expect';
import { AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION } from '../../../../constants';
import { CLOUD_SECURITY_POSTURE_PACKAGE_VERSION_QUALITY_GATES } from '../../../../constants';
import type { FtrProviderContext } from '../../../../../../ftr_provider_context';
export default function ({ getPageObjects, getService }: FtrProviderContext) {
const testSubjects = getService('testSubjects');
@ -35,7 +35,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
it(`should create agentless-agent`, async () => {
const integrationPolicyName = `cloud_security_posture-${new Date().toISOString()}`;
await cisIntegration.navigateToAddIntegrationCspmWithVersionPage(
AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION
CLOUD_SECURITY_POSTURE_PACKAGE_VERSION_QUALITY_GATES
);
await cisIntegration.clickOptionButton(CIS_AWS_OPTION_TEST_ID);
@ -79,7 +79,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const integrationPolicyName = `cloud_security_posture-${new Date().toISOString()}`;
await cisIntegration.navigateToAddIntegrationCspmWithVersionPage(
AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION
CLOUD_SECURITY_POSTURE_PACKAGE_VERSION_QUALITY_GATES
);
await cisIntegration.clickOptionButton(CIS_AWS_OPTION_TEST_ID);