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

Osquerybeat: Improve testability and unit test coverage #27591

Merged
merged 2 commits into from
Aug 31, 2021

Conversation

aleksmaus
Copy link
Member

What does this PR do?

Improves testability and unit test coverage

  • Refactor action handler for testability, decouple from beats and
    osquery client details.
  • Cleanup lint warnings in config_plugin
  • Refactor and encapsulate events publishing details into
    pub/publisher.go

Why is it important?

Better tested code

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas

* Refactor action handler for testability, decouple from beats and
  osquery client details.
* Cleanup lint warnings in config_plugin
* Refactor and encapsulate events publishing details into
  pub/publisher.go
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Aug 25, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Aug 25, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2021-08-25T18:05:03.346+0000

  • Duration: 53 min 28 sec

  • Commit: fee89e1

Test stats 🧪

Test Results
Failed 0
Passed 3888
Skipped 0
Total 3888

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 3888
Skipped 0
Total 3888

@aleksmaus aleksmaus added the backport-v7.16.0 Automated backport with mergify label Aug 26, 2021
Copy link

@scunningham scunningham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests 👍

@aleksmaus aleksmaus merged commit 348a758 into elastic:master Aug 31, 2021
mergify bot pushed a commit that referenced this pull request Aug 31, 2021
* Osquerybeat: improve testability and unit test coverage

* Refactor action handler for testability, decouple from beats and
  osquery client details.
* Cleanup lint warnings in config_plugin
* Refactor and encapsulate events publishing details into
  pub/publisher.go

* Add missing copyright header

(cherry picked from commit 348a758)
aleksmaus added a commit that referenced this pull request Aug 31, 2021
)

* Osquerybeat: improve testability and unit test coverage

* Refactor action handler for testability, decouple from beats and
  osquery client details.
* Cleanup lint warnings in config_plugin
* Refactor and encapsulate events publishing details into
  pub/publisher.go

* Add missing copyright header

(cherry picked from commit 348a758)

Co-authored-by: Aleksandr Maus <aleksandr.maus@elastic.co>
mdelapenya added a commit to mdelapenya/beats that referenced this pull request Sep 1, 2021
* master:
  Forward port 7.14.1 changelog to master  (elastic#27687)
  Addressing multiple dashboard issues: deps loading once, field conversion, etc. (elastic#27669)
  Remove adaptive queue sizes from agent's spec files (elastic#27653)
  Osquerybeat: Improve testability and unit test coverage (elastic#27591)
  Osquerybeat: lockdown flagsfile, prevent global defaults (elastic#27611)
  Import the references of dashboard assets using the Saved Objects API (elastic#27647)
  Fix bug with override path in cgroups (elastic#27620)
  Allow Kibana client to authorize with Elasticsearch API key (elastic#27540)
  Filebeat auditd: Fix Top Exec Commands dashboard visualization (elastic#27638)
  [elastic-agent] Fix docker tar.gz generation for complete image (elastic#27621)
  Follow up changes in dashboards in mage check && fix minor issue (elastic#27553)
  [Heartbeat] Fix bug where `enabled: false` is ignored. (elastic#27615)
  Support kube_state_metrics v2.0.0 (elastic#27552)
Icedroid pushed a commit to Icedroid/beats that referenced this pull request Nov 1, 2021
* Osquerybeat: improve testability and unit test coverage

* Refactor action handler for testability, decouple from beats and
  osquery client details.
* Cleanup lint warnings in config_plugin
* Refactor and encapsulate events publishing details into
  pub/publisher.go

* Add missing copyright header
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants