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

Adding capability of running automated process rules tests #127

Merged
merged 6 commits into from
May 26, 2022

Conversation

jeniawhite
Copy link
Contributor

@jeniawhite jeniawhite commented May 11, 2022

Enhancing the tests framework to automatically evaluate process rules

Fixes #157

@jeniawhite jeniawhite requested review from DaveSys911 and a team as code owners May 11, 2022 15:01
@jeniawhite jeniawhite marked this pull request as draft May 11, 2022 15:02
@github-actions
Copy link

github-actions bot commented May 11, 2022

Cloudbeat CI 🤖

Integration tests passed! 💚
Tests Summary:

=========================== short test summary info ============================
PASSED integration/tests/test_output_to_elasticsearch.py::test_elastic_index_exists[file]
PASSED integration/tests/test_output_to_elasticsearch.py::test_elastic_index_exists[process]
PASSED integration/tests/test_output_to_elasticsearch.py::test_elastic_index_exists[k8s_object]
PASSED product/tests/test_cloudbeat.py::test_cloudbeat_pod_exist
PASSED product/tests/test_cloudbeat.py::test_cloudbeat_pods_running
================= 5 passed, 60 deselected, 6 warnings in 1.26s =================

Link to detailed report: https://elastic.github.io/cloudbeat/579

Copy link
Collaborator

@gurevichdmitry gurevichdmitry left a comment

Choose a reason for hiding this comment

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

Please create a separate file for process rule tests and check if it possible to move sleep method to test level


# Wait for process reboot
# TODO: Implement a more optimal way of waiting
time.sleep(60)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not a good idea to put sleep function on infra level.

# ),
],
)
def test_process_rules(data,
Copy link
Collaborator

Choose a reason for hiding this comment

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

It is possible to create a separate file for process rule tests.

@jeniawhite jeniawhite marked this pull request as ready for review May 24, 2022 07:49
@jeniawhite jeniawhite requested a review from a team as a code owner May 24, 2022 07:49
Copy link
Collaborator

@gurevichdmitry gurevichdmitry left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@DaveSys911 DaveSys911 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@uri-weisman uri-weisman left a comment

Choose a reason for hiding this comment

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

GJ Jenia!! 💪
Added few comments...

tests/commonlib/io_utils.py Outdated Show resolved Hide resolved
raise Exception(
f"Command '{command}' still not implemented in test framework")

@staticmethod
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we plz add some description to the function?

tests/commonlib/io_utils.py Show resolved Hide resolved
tests/commonlib/io_utils.py Show resolved Hide resolved
@jeniawhite jeniawhite merged commit 4002847 into elastic:main May 26, 2022
orouz pushed a commit to orouz/cloudbeat that referenced this pull request Sep 6, 2023
* Initial commit of kubelet audits and refactoring to process

* Code review changes

* Refactor "with" keyword in tests

* Fixing duplicated "with" parameters
orestisfl pushed a commit to orestisfl/cloudbeat that referenced this pull request Oct 11, 2023
…ctor (elastic#127)

* Initial commit of kubelet audits and refactoring to process

* Code review changes

* Refactor "with" keyword in tests

* Fixing duplicated "with" parameters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Implement kubelet process automated tests
4 participants