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

[8.x] [EDR Workflows][Osquery] Re enable Cypress execution in CI/QA (#205478) #205686

Merged
merged 1 commit into from
Jan 7, 2025
Merged
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 @@ -27,7 +27,7 @@ export const getCypressBaseConfig = (
{
reporter: '../../../../../node_modules/cypress-multi-reporters',
reporterOptions: {
configFile: './reporter_config.json',
configFile: './cypress/reporter_config.json',
},

defaultCommandTimeout: 60000,
Expand All @@ -53,7 +53,7 @@ export const getCypressBaseConfig = (
},

e2e: {
specPattern: './e2e/**/*.cy.ts',
specPattern: './cypress/e2e/**/*.cy.ts',
experimentalRunAllSpecs: true,
experimentalMemoryManagement: true,
numTestsKeptInMemory: 3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe('Add to Cases', () => {

it('should add result a case and not have add to timeline in result', () => {
addLiveQueryToCase(liveQueryId, caseId);
cy.contains(`${caseTitle} has been updated`);
cy.contains(`Case ${caseTitle} updated`);
viewRecentCaseAndCheckResults();

cy.contains(liveQueryQuery);
Expand Down Expand Up @@ -80,7 +80,7 @@ describe('Add to Cases', () => {

it('should add result a case and have add to timeline in result', () => {
addLiveQueryToCase(liveQueryId, caseId);
cy.contains(`${caseTitle} has been updated`);
cy.contains(`Case ${caseTitle} updated`);
viewRecentCaseAndCheckResults();

cy.contains("SELECT * FROM os_version where name='Ubuntu';");
Expand Down
4 changes: 2 additions & 2 deletions x-pack/platform/plugins/shared/osquery/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"scripts": {
"cypress:burn": "yarn cypress:run --env burn=2 --headed",
"cypress:changed-specs-only": "yarn cypress:run --changed-specs-only --env burn=2",
"cypress": "NODE_OPTIONS=--openssl-legacy-provider node ../../../../solutions/security/plugins/security_solution/scripts/start_cypress_parallel --config-file ../../platform/plugins/shared/osquery/cypress/serverless_cypress.config.ts --ftr-config-file ../../../../../x-pack/test/osquery_cypress/cli_config",
"cypress": "NODE_OPTIONS=--openssl-legacy-provider node ../../../../solutions/security/plugins/security_solution/scripts/start_cypress_parallel --config-file ../../platform/plugins/shared/osquery/cypress/cypress.config.ts --ftr-config-file ../../../../../x-pack/test/osquery_cypress/cli_config",
"cypress:open": "yarn cypress open",
"cypress:run": "yarn cypress run",
"cypress:serverless": "NODE_OPTIONS=--openssl-legacy-provider node ../../../../solutions/security/plugins/security_solution/scripts/start_cypress_parallel --config-file ../../platform/plugins/shared/osquery/cypress/serverless_cypress.config.ts --ftr-config-file ../../../../../x-pack/test/osquery_cypress/serverless_cli_config",
"cypress:serverless:open": "yarn cypress:serverless open",
"cypress:serverless:run": "yarn cypress:serverless run",
"cypress:qa:serverless": "NODE_OPTIONS=--openssl-legacy-provider node ../../../../solutions/security/plugins/security_solution/scripts/start_cypress_parallel_serverless --config-file ../../platform/plugins/shared/osquery/cypress/serverless_cypress.config.ts --onBeforeHook ../../../../test/osquery_cypress/runner_qa.ts",
"cypress:qa:serverless": "NODE_OPTIONS=--openssl-legacy-provider node ../../../../solutions/security/plugins/security_solution/scripts/start_cypress_parallel_serverless --config-file ../../platform/plugins/shared/osquery/cypress/serverless_cypress_qa.config.ts --onBeforeHook ../../../../test/osquery_cypress/runner_qa.ts",
"cypress:qa:serverless:run": "yarn cypress:qa:serverless run",
"nyc": "../../../../../node_modules/.bin/nyc report --reporter=text-summary",
"junit:merge": "../../../../../node_modules/.bin/mochawesome-merge ../../../target/kibana-osquery/cypress/results/mochawesome*.json > ../../../target/kibana-osquery/cypress/results/output.json && ../../../node_modules/.bin/marge ../../../target/kibana-osquery/cypress/results/output.json --reportDir ../../../target/kibana-osquery/cypress/results && yarn junit:transform && mkdir -p ../../../target/junit && cp ../../../target/kibana-osquery/cypress/results/*.xml ../../../target/junit/",
Expand Down
Loading