[Automatic Import] Add serverless availability cypress test (#202872)

This commit is contained in:
Bharat Pasupula 2024-12-05 21:25:07 +01:00 committed by GitHub
parent d508b5da9c
commit 5145d76fb1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 85 additions and 0 deletions

View file

@ -0,0 +1,20 @@
steps:
- command: .buildkite/scripts/steps/functional/security_serverless_automatic_import.sh
label: 'Serverless Automatic Import - Security Solution Cypress Tests'
agents:
machineType: n2-standard-4
preemptible: true
depends_on:
- build
- quick_checks
- checks
- linting
- linting_with_types
- check_types
- check_oas_snapshot
timeout_in_minutes: 60
parallelism: 1
retry:
automatic:
- exit_status: '-1'
limit: 1

View file

@ -266,6 +266,9 @@ const getPipeline = (filename: string, removeSteps = true) => {
pipeline.push(
getPipeline('.buildkite/pipelines/pull_request/security_solution/ai_assistant.yml')
);
pipeline.push(
getPipeline('.buildkite/pipelines/pull_request/security_solution/automatic_import.yml')
);
pipeline.push(
getPipeline('.buildkite/pipelines/pull_request/security_solution/detection_engine.yml')
);

View file

@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -euo pipefail
source .buildkite/scripts/steps/functional/common.sh
export JOB=kibana-security-solution-chrome
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}
echo "--- Automatic Import Cypress Tests on Serverless"
cd x-pack/test/security_solution_cypress
set +e
BK_ANALYTICS_API_KEY=$(vault_get security-solution-ci sec-sol-cypress-bk-api-key)
BK_ANALYTICS_API_KEY=$BK_ANALYTICS_API_KEY yarn cypress:automatic_import:run:serverless; status=$?; yarn junit:merge || :; exit $status

1
.github/CODEOWNERS vendored
View file

@ -2148,6 +2148,7 @@ x-pack/test_serverless/functional/test_suites/security/index.mki_only.ts @elasti
/x-pack/plugins/security_solution/public/attack_discovery @elastic/security-generative-ai
/x-pack/test/security_solution_cypress/cypress/e2e/ai_assistant @elastic/security-generative-ai
/x-pack/plugins/security_solution_ess/public/upselling/pages/attack_discovery @elastic/security-generative-ai
/x-pack/test/security_solution_cypress/cypress/e2e/automatic_import @elastic/security-scalability
# Security Solution cross teams ownership
/x-pack/test/security_solution_cypress/cypress/fixtures @elastic/security-detections-response @elastic/security-threat-hunting

View file

@ -0,0 +1,34 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { ASSISTANT_BUTTON, CREATE_INTEGRATION_LANDING_PAGE } from '../../screens/automatic_import';
import { login } from '../../tasks/login';
describe(
'App Features for Security Essentials',
{
tags: ['@serverless'],
env: {
ftrConfig: {
productTypes: [
{ product_line: 'security', product_tier: 'essentials' },
{ product_line: 'endpoint', product_tier: 'essentials' },
],
},
},
},
() => {
beforeEach(() => {
login();
});
it('should not have Automatic Import available', () => {
cy.visit(CREATE_INTEGRATION_LANDING_PAGE);
cy.get(ASSISTANT_BUTTON).should('not.exist');
});
}
);

View file

@ -0,0 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
export const CREATE_INTEGRATION_LANDING_PAGE = '/app/integrations/create';
export const ASSISTANT_BUTTON = 'assistantButton';

View file

@ -33,6 +33,7 @@
"cypress:detection_engine:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/detection_response/detection_engine/!(exceptions)/**/*.cy.ts'",
"cypress:detection_engine:exceptions:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/detection_response/detection_engine/exceptions/**/*.cy.ts'",
"cypress:ai_assistant:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/ai_assistant/**/*.cy.ts'",
"cypress:automatic_import:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/automatic_import/**/*.cy.ts'",
"cypress:investigations:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/investigations/**/*.cy.ts'",
"cypress:explore:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/explore/**/*.cy.ts'",
"cypress:changed-specs-only:serverless": "yarn cypress:serverless --changed-specs-only --env burn=5",