Skip to content

Commit

Permalink
[EDR Workflows][Osquery] Re enable Cypress execution in CI/QA (#205478)
Browse files Browse the repository at this point in the history
(cherry picked from commit b02c735)
  • Loading branch information
szwarckonrad committed Jan 7, 2025
1 parent 567b237 commit 4f0f7e9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
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

0 comments on commit 4f0f7e9

Please sign in to comment.