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

Failing test: Osquery Cypress.x-pack/plugins/osquery/cypress/e2e/all/cases·cy·ts - Add to Cases security "before all" hook for "should add result a case and have add to timeline in result" "before all" hook for "should add result a case and have add to timeline in result" #169747

Closed
kibanamachine opened this issue Oct 25, 2023 · 11 comments · Fixed by #190231
Assignees
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Team:Defend Workflows “EDR Workflows” sub-team of Security Solution

Comments

@kibanamachine
Copy link
Contributor

kibanamachine commented Oct 25, 2023

A test failed on a tracked branch

CypressError: `cy.request()` failed on:

https://localhost:5647/api/osquery/live_queries

The response we received from your web server was:

  > 400: Bad Request

This was considered a failure because the status code was not `2xx` or `3xx`.

If you do not want status codes to cause failures pass the option: `failOnStatusCode: false`

-----------------------------------------------------------

The request we sent was:

Method: POST
URL: https://localhost:5647/api/osquery/live_queries
Headers: {
  "Connection": "keep-alive",
  "kbn-xsrf": "cypress",
  "x-elastic-internal-origin": "security-solution",
  "Elastic-Api-Version": "2023-10-31",
  "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Cypress/13.3.0 Chrome/114.0.5735.289 Electron/25.8.1 Safari/537.36",
  "accept": "*/*",
  "cookie": "sid=Fe26.2**66e525d1fa1fbf388ed210f747ad472c0a2939d0691781568df9a15c7f2cb18b*eLMEK3e3p7Ix2VDPdDh_HA*0mU8VMGTzKm3JjuK2-jWmbMN5t6RzLr15Mjvn3M87rUcj_hHt1YXB43HgBDUhveSjrKjwET4AY4gtfX6Zdydh0qslI_3Dm44EDHt5bjqlJBoe_KknLoC-1LmNhw3M5vvbhLJINYjDEOLZ9nzBuSNgjF-_seSyslqcvqiP6dDwfZ3hwJSaqiP1e52TQPC71E0iM6Am6VisNRN3kwgDSfjS1hCEZ2VDrZq5OI3u2BXULw0iJBLIhbMri1QyWi_SmB_**b597b3919b6b5d491112e24442d75ffb6d8019f64395cbff9bb3a51213793b0a*GG473q6ofaD0Y2VGN4ukcE2jy_k1sgkJl8WHWt5JDGM",
  "authorization": "Basic ZWxhc3RpY19zZXJ2ZXJsZXNzOmNoYW5nZW1l",
  "accept-encoding": "gzip, deflate",
  "content-type": "application/json",
  "content-length": 85
}
Body: {"agent_all":true,"query":"SELECT * FROM os_version where name='Ubuntu';","kuery":""}

-----------------------------------------------------------

The response we got was:

Status: 400 - Bad Request
Headers: {
  "elastic-api-version": "2023-10-31",
  "strict-transport-security": "max-age=31536000; includeSubDomains",
  "x-content-type-options": "nosniff",
  "referrer-policy": "no-referrer-when-downgrade",
  "permissions-policy": "camera=(), display-capture=(), fullscreen=(self), geolocation=(), microphone=(), web-share=()",
  "cross-origin-opener-policy": "same-origin",
  "x-frame-options": "SAMEORIGIN",
  "content-security-policy": "script-src 'report-sample' 'self'; worker-src 'report-sample' 'self' blob:; style-src 'report-sample' 'self' 'unsafe-inline'; frame-ancestors 'self'",
  "kbn-name": "kb-n2-4-spot-845d4a5c0cd70258",
  "kbn-license-sig": "13efe943d4167cafce8650cf0f31ffe405a638222890a546cb1939c7841d872c",
  "content-type": "application/json; charset=utf-8",
  "cache-control": "private, no-cache, no-store, must-revalidate",
  "content-length": "82",
  "date": "Wed, 25 Oct 2023 05:36:54 GMT",
  "connection": "keep-alive",
  "keep-alive": "timeout=120"
}
Body: {
  "statusCode": 400,
  "error": "Bad Request",
  "message": "No agents found for selection"
}


https://on.cypress.io/request

Because this error occurred during a `before all` hook we are skipping the remaining tests in the current suite: `Add to Cases`
    at <unknown> (https://localhost:5647/__cypress/runner/cypress_runner.js:133043:72)
    at tryCatcher (https://localhost:5647/__cypress/runner/cypress_runner.js:1807:23)
    at Promise._settlePromiseFromHandler (https://localhost:5647/__cypress/runner/cypress_runner.js:1519:31)
    at Promise._settlePromise (https://localhost:5647/__cypress/runner/cypress_runner.js:1576:18)
    at Promise._settlePromise0 (https://localhost:5647/__cypress/runner/cypress_runner.js:1621:10)
    at Promise._settlePromises (https://localhost:5647/__cypress/runner/cypress_runner.js:1701:18)
    at _drainQueueStep (https://localhost:5647/__cypress/runner/cypress_runner.js:2407:12)
    at _drainQueue (https://localhost:5647/__cypress/runner/cypress_runner.js:2400:9)
    at Async._drainQueues (https://localhost:5647/__cypress/runner/cypress_runner.js:2416:5)
    at Async.drainQueues (https://localhost:5647/__cypress/runner/cypress_runner.js:2286:14)
From Your Spec Code:
    at request (webpack:///./tasks/common.ts:21:5)
    at loadLiveQuery (webpack:///./tasks/api_fixtures.ts:131:5)
    at Context.eval (webpack:///./e2e/all/cases.cy.ts:21:18)

First failure: CI Build - main

@kibanamachine kibanamachine added the failed-test A test failure on a tracked branch, potentially flaky-test label Oct 25, 2023
@botelastic botelastic bot added the needs-team Issues missing a team label label Oct 25, 2023
@kibanamachine kibanamachine added the Team:Defend Workflows “EDR Workflows” sub-team of Security Solution label Oct 25, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-defend-workflows (Team:Defend Workflows)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Oct 25, 2023
@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@mistic
Copy link
Member

mistic commented Oct 25, 2023

Skipped.

main: 76bd0ef

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

1 similar comment
@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

1 similar comment
@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

1 similar comment
@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - main

1 similar comment
@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Team:Defend Workflows “EDR Workflows” sub-team of Security Solution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants