8000 tracee-ebpf: add output validate test by josedonizetti · Pull Request #881 · aquasecurity/tracee · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

tracee-ebpf: add output validate test #881

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

Merged

Conversation

josedonizetti
Copy link
Contributor

Add tests for OutputConfig.Validate():

=== RUN   TestOutputConfigValidate
=== RUN   TestOutputConfigValidate/format:table
=== RUN   TestOutputConfigValidate/format:table-verbose
=== RUN   TestOutputConfigValidate/format:json
=== RUN   TestOutputConfigValidate/format:gob
=== RUN   TestOutputConfigValidate/format:gotemplate=tmpl
=== RUN   TestOutputConfigValidate/invalid_format

I also refactored the code in a way I consider more readable than the huge if, but I can revert it if you prefer the previous version.

@josedonizetti josedonizetti force-pushed the add-output-validate-test branch from bf8af08 to 233a1a0 Compare August 5, 2021 14:05
@josedonizetti josedonizetti changed the title Add output validate test tracee-ebpf: add output validate test Aug 5, 2021
@grantseltzer grantseltzer self-requested a review August 5, 2021 16:45
@grantseltzer
Copy link
Contributor

Thanks so much for this @josedonizetti! Test looks great. I think i'd prefer the (admittedly ugly) single if statement rather than an if and a switch. Perhaps we can format like this if you'd like: https://play.golang.org/p/NOvSKBnhCjI

@josedonizetti josedonizetti force-pushed the add-output-validate-test branch from 233a1a0 to 65f121a Compare August 5, 2021 17:38
@josedonizetti
Copy link
Contributor Author

@grantseltzer thanks for the feedback. Reverted it and formatted.

Copy link
Contributor
@grantseltzer grantseltzer left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!

@grantseltzer grantseltzer merged commit aee7e8f into aquasecurity:main Aug 5, 2021
@josedonizetti josedonizetti deleted the add-output-validate-test branch August 5, 2021 23:11
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.

2 participants
0