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

[Security Solution] Unskips Overview tests #82459

Merged
merged 8 commits into from
Nov 5, 2020

Conversation

MadameSheema
Copy link
Member

@MadameSheema MadameSheema commented Nov 3, 2020

Summary

In this PR we are fixing and unskipping the Overview Cypress tests.

Overview Page

Failure:

  • Host stats render with correct values and Network stats render with correct values on CI execution were returning different number than the expected ones. In local, those tests passed.

Problem:

  • We were originally stubbing just one call, now from the same API we are stubbing two. As our machines are pretty fast the stub was working fine, as CI machine is slow we started to have problems with the stubbing, so the second call was not properly stubbed getting as a result the original number of events indexed.

Fix:

  • Separate the stub between the two tests since for checking the hosts events are working fine we just care about the overviewHostQuery call and for the Network events the overviewNetworkQuery. In this manner the stub is done properly. The downside of this fix is that we are loading the page two times (originally just one), making the overall execution tests a little bit slow.

With no data

Failure:

  • On local the test was passing on CI the test sometimes fails.

Problem:

  • The problem here is the way tests are executed on the CI. All the Kibana tests are executed in parallel, so although using es_archive we prepare the instance to don't have data, looks like that a different test that we don't control is injecting data on the same instance, this is why the splash page sometimes is not displayed on CI.

Fix:

  • Stub the /internal/search/securitySolutionIndexFields call in order to make the UI think that we don't have indexed.

@MadameSheema
Copy link
Member Author

@elasticmachine merge upstream

@MadameSheema MadameSheema self-assigned this Nov 4, 2020
@MadameSheema MadameSheema added release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v7.11.0 v8.0.0 Team:Threat Hunting Security Solution Threat Hunting Team labels Nov 4, 2020
@MadameSheema MadameSheema marked this pull request as ready for review November 4, 2020 17:31
@MadameSheema MadameSheema requested review from a team as code owners November 4, 2020 17:31
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

distributable file count

id before after diff
default 42715 42716 +1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@MadameSheema MadameSheema merged commit 706be6b into elastic:master Nov 5, 2020
@MadameSheema MadameSheema deleted the fix/overview branch November 5, 2020 06:14
MadameSheema added a commit to MadameSheema/kibana that referenced this pull request Nov 5, 2020
* unskips Overview tests

* fixes overview tests

* unskips 'with no data' test

* fixes 'with no data' test

* stubs empty instace

* fixes typecheck issue

* fixes hooks issue

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
MadameSheema added a commit that referenced this pull request Nov 5, 2020
* unskips Overview tests

* fixes overview tests

* unskips 'with no data' test

* fixes 'with no data' test

* stubs empty instace

* fixes typecheck issue

* fixes hooks issue

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Nov 5, 2020
* master: (127 commits)
  [ILM] Fix breadcrumbs (elastic#82594)
  [UX]Swap env filter with percentile (elastic#82246)
  Add platform's missing READMEs (elastic#82268)
  [Discover] Adding uiMetric to track Visualize link click (elastic#82344)
  [Search] Add used index pattern name to the search agg error field (elastic#82604)
  improve client-side SO client get pooling (elastic#82603)
  [Security Solution] Unskips Overview tests (elastic#82459)
  Embeddables/migrations (elastic#82296)
  [Enterprise Search] Refactor product server route registrations to their own files/folders (elastic#82663)
  Moving reinstall function outside of promise.all (elastic#82672)
  Load choropleth layer correctly (elastic#82628)
  Master  backport elastic#81233 (elastic#82642)
  [Fleet] Allow snake cased Kibana assets (elastic#77515)
  Reduce saved objects authorization checks (elastic#82204)
  [data.search] Add request handler context and asScoped pattern (elastic#80775)
  [ML] Fixes formatting of fields in index data visualizer (elastic#82593)
  Usage collector readme (elastic#82548)
  [Lens] Visualization validation and better error messages (elastic#81439)
  [ML] Add annotation markers to time series brush area to indicate annotations exist outside of selected range (elastic#81490)
  chore(NA): install microdnf in UBI docker build only (elastic#82611)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting Security Solution Threat Hunting Team v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants