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

Add false positive test package to detect errors in elastic agent logs #2084

Merged
merged 12 commits into from
Sep 6, 2024

Conversation

mrodm
Copy link
Contributor

@mrodm mrodm commented Sep 5, 2024

Closes #1811

Added a new test package into false_positives to be able to check if there is any error in the logs from Elastic Agent container.

This package requires to be executed in a specific Elastic stack version 8.12.0 in order to reproduce the error.

Tested failure (not detected error logs) build (using 8.12.1):

@mrodm mrodm self-assigned this Sep 5, 2024
@mrodm
Copy link
Contributor Author

mrodm commented Sep 5, 2024

/test

1 similar comment
@mrodm
Copy link
Contributor Author

mrodm commented Sep 6, 2024

/test

@mrodm mrodm marked this pull request as ready for review September 6, 2024 10:40
@mrodm mrodm requested a review from a team as a code owner September 6, 2024 10:40
Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

Nice, thanks!

# Copy XML files to another extension so they are not used to check jUnit tests
# but those files will be able to be reviewed afterwards
for file in $(ls $result_tests) ; do
cp "${file}" "${file}.txt"
Copy link
Member

Choose a reason for hiding this comment

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

Nit. Could we add some meaningful suffix?

Suggested change
cp "${file}" "${file}.txt"
cp "${file}" "${file}-expected-errors.txt"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure!
I'll update it.

@@ -59,6 +59,11 @@ function check_expected_errors() {
cat ${results_no_spaces} | grep -E "${line}"
done < "${expected_errors_file}"

# Copy XML files to another extension so they are not used to check jUnit tests
# but those files will be able to be reviewed afterwards
Copy link
Member

Choose a reason for hiding this comment

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

👍

@mrodm
Copy link
Contributor Author

mrodm commented Sep 6, 2024

/test

1 similar comment
@mrodm
Copy link
Contributor Author

mrodm commented Sep 6, 2024

/test

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @mrodm

@mrodm mrodm merged commit b838f0a into elastic:main Sep 6, 2024
3 checks passed
@mrodm mrodm deleted the elastic-agent-logs-false-positive branch September 6, 2024 14:42
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.

Add negative tests for detection of issues in elastic agent logs
3 participants