-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Automatic Import] Add serverless availability cypress test (#202872)
- Loading branch information
Showing
7 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
.buildkite/pipelines/pull_request/security_solution/automatic_import.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
.buildkite/scripts/steps/functional/security_serverless_automatic_import.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
x-pack/test/security_solution_cypress/cypress/e2e/automatic_import/feature_essentials.cy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'); | ||
}); | ||
} | ||
); |
9 changes: 9 additions & 0 deletions
9
x-pack/test/security_solution_cypress/cypress/screens/automatic_import.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters