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 ftanomaly tests #132

Merged
merged 7 commits into from
Dec 2, 2019
Merged

Add ftanomaly tests #132

merged 7 commits into from
Dec 2, 2019

Conversation

NS4nti
Copy link
Contributor

@NS4nti NS4nti commented Nov 14, 2019

✨ Pull Request Template

‼️ Once all the checklist is done you have to:

  • stash merge this pull request
  • delete the corresponding branch
  • close the associated issue
  • move TANOMALY in TESTED AND APPROVED section

📃 Type of change

New feature: non-breaking change which adds functionality.

💡 Related Issue(s)

✒️ Description

Add tests for tanomaly filter :

  • well_formatted_data_test
  • data_too_short_ignored_test
  • not_data_string_ignored_test
  • not_data_list_ignored_test
  • invalid_ip_ignored_test
  • invalid_protocol_ignored_test
  • thread_working_test (:bangbang: this test wait 5 minutes to see if the thread really take redis data)

🎯 Test Environments

FreeBSD 12.0

  • clang++ 6.0.1
  • CMake 3.7.2
  • Python 3

Ubuntu 19.0.4

  • g++ 8.3.0
  • CMake 3.7.2
  • Python 3

Valgrind test don't pass because of memory leak in the mlpack library :

==1294== 352 bytes in 2 blocks are definitely lost in loss record 2 of 2
==1294==    at 0x4838DBF: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==1294==    by 0x19485C: mlpack::range::RangeSearch<mlpack::metric::LMetric<2, true>, arma::Mat<double>, mlpack::tree::KDTree>::RangeSearch(bool, bool, mlpack::metric::LMetric<2, true>) (range_search_impl.hpp:100)
==1294==    by 0x19002F: AnomalyTask::Detection() (AnomalyTask.cpp:62)

✔️ Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

  • 🙋 I certify on my honor that all the information provided is true, and I've done all I can to deliver a high quality code

* well_formatted_data_test
* data_too_short_ignored_test
* not_data_string_ignored_test
* not_data_list_ignored_test
* invalid_ip_ignored_test
* invalid_protocol_ignored_test
* thread_working_test
@NS4nti NS4nti marked this pull request as ready for review November 14, 2019 15:18
@NS4nti NS4nti added the DO NOT MERGE Do not merge this PR label Nov 14, 2019
@NS4nti
Copy link
Contributor Author

NS4nti commented Nov 15, 2019

Add this tests :

  • verify if received alert in channel
  • verify if received alert in list
  • verify if received alert in file
  • verify data stored in list (can have same name that the channel)
  • verify if no alert in list with same name

@NS4nti NS4nti removed the DO NOT MERGE Do not merge this PR label Nov 28, 2019
@NS4nti
Copy link
Contributor Author

NS4nti commented Nov 28, 2019

Tests added

Add this tests :

* verify if received alert in channel

* verify if received alert in list

* verify if received alert in file

* verify data stored in list (can have same name that the channel)

* verify if no alert in list with same name

@NS4nti NS4nti requested a review from frikilax November 29, 2019 13:59
frikilax
frikilax previously approved these changes Nov 29, 2019
@HugoSoszynski HugoSoszynski merged commit ac3575c into dev Dec 2, 2019
@HugoSoszynski HugoSoszynski deleted the test-ftanomaly branch December 2, 2019 16:09
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.

[IDEA] Test for ftanomaly
3 participants