Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.6] [Stack Monitoring] api tests for cluster and elasticsearch (#14…
…5138) (#145985) # Backport This will backport the following commits from `main` to `8.6`: - [[Stack Monitoring] api tests for cluster and elasticsearch (#145138)](#145138) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Kevin Lacabane","email":"kevin.lacabane@elastic.co"},"sourceCommit":{"committedDate":"2022-11-22T13:02:50Z","message":"[Stack Monitoring] api tests for cluster and elasticsearch (#145138)\n\n### Summary\r\nPart of #119658 api integration tests for cluster and elasticsearch routes to\r\nvalidate behavior when reading data ingested by elastic-agent.\r\n\r\nWe currently have a testing suite for legacy and another one for\r\nmetricbeat. Since metricbeat and agent documents only differ in their\r\nmetadata, for example agent will populate a `data_stream.*` property to\r\nidentify the document types while metricbeat uses `metricset.*`, the\r\ntests assertion validating _business_ data should pass regardless of the\r\ndocuments source. With this in mind the metricbeat tests were updated to\r\nrun the tests twice, one time with metricbeat data and a second time\r\nwith package data.\r\n\r\nTo generate the archives the `metrics-*` mappings were extracted with\r\nesArchiver from an elasticsearch with the package installed, and the\r\ndocuments were transformed from the metricbeat documents with [this\r\nscript](https://gist.github.com/klacabane/654497ff86053c60af6df15fa6f6f657).\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"5cf0d0f24817db4b36501c6c06f6cfb4cd61c296","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Infra Monitoring UI","release_note:skip","Feature:Stack Monitoring","v8.6.0","v8.7.0"],"number":145138,"url":"#145138 Monitoring] api tests for cluster and elasticsearch (#145138)\n\n### Summary\r\nPart of #119658 api integration tests for cluster and elasticsearch routes to\r\nvalidate behavior when reading data ingested by elastic-agent.\r\n\r\nWe currently have a testing suite for legacy and another one for\r\nmetricbeat. Since metricbeat and agent documents only differ in their\r\nmetadata, for example agent will populate a `data_stream.*` property to\r\nidentify the document types while metricbeat uses `metricset.*`, the\r\ntests assertion validating _business_ data should pass regardless of the\r\ndocuments source. With this in mind the metricbeat tests were updated to\r\nrun the tests twice, one time with metricbeat data and a second time\r\nwith package data.\r\n\r\nTo generate the archives the `metrics-*` mappings were extracted with\r\nesArchiver from an elasticsearch with the package installed, and the\r\ndocuments were transformed from the metricbeat documents with [this\r\nscript](https://gist.github.com/klacabane/654497ff86053c60af6df15fa6f6f657).\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"5cf0d0f24817db4b36501c6c06f6cfb4cd61c296"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"#145138 Monitoring] api tests for cluster and elasticsearch (#145138)\n\n### Summary\r\nPart of #119658 api integration tests for cluster and elasticsearch routes to\r\nvalidate behavior when reading data ingested by elastic-agent.\r\n\r\nWe currently have a testing suite for legacy and another one for\r\nmetricbeat. Since metricbeat and agent documents only differ in their\r\nmetadata, for example agent will populate a `data_stream.*` property to\r\nidentify the document types while metricbeat uses `metricset.*`, the\r\ntests assertion validating _business_ data should pass regardless of the\r\ndocuments source. With this in mind the metricbeat tests were updated to\r\nrun the tests twice, one time with metricbeat data and a second time\r\nwith package data.\r\n\r\nTo generate the archives the `metrics-*` mappings were extracted with\r\nesArchiver from an elasticsearch with the package installed, and the\r\ndocuments were transformed from the metricbeat documents with [this\r\nscript](https://gist.github.com/klacabane/654497ff86053c60af6df15fa6f6f657).\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"5cf0d0f24817db4b36501c6c06f6cfb4cd61c296"}}]}] BACKPORT--> Co-authored-by: Kevin Lacabane <kevin.lacabane@elastic.co>
- Loading branch information