Skip to content

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

Merged
mrodm merged 12 commits intoelastic:mainfrom
mrodm:elastic-agent-logs-false-positive
Sep 6, 2024
Merged

Add false positive test package to detect errors in elastic agent logs#2084
mrodm merged 12 commits intoelastic:mainfrom
mrodm:elastic-agent-logs-false-positive

Conversation

@mrodm
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

mrodm commented Sep 5, 2024

/test

1 similar comment
@mrodm
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

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
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

@mrodm
Copy link
Copy Markdown
Contributor Author

mrodm commented Sep 6, 2024

/test

1 similar comment
@mrodm
Copy link
Copy Markdown
Contributor Author

mrodm commented Sep 6, 2024

/test

@elasticmachine
Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

cc @mrodm

@mrodm mrodm merged commit b838f0a into elastic:main Sep 6, 2024
@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