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

[IDEA] Test for ftanomaly #107

Closed
NS4nti opened this issue Oct 31, 2019 · 0 comments · Fixed by #132
Closed

[IDEA] Test for ftanomaly #107

NS4nti opened this issue Oct 31, 2019 · 0 comments · Fixed by #132
Assignees
Labels
enhancement New feature or request important pending Issue have a pull request waiting for review tests
Milestone

Comments

@NS4nti
Copy link
Contributor

NS4nti commented Oct 31, 2019

What is your feature about ?
Need automated test for tanomaly filter
https://github.com/VultureProject/darwin/wiki/Filter-Anomaly-thread

Describe what you'd like
Test must be passed on Ubuntu and FreeBSD

Additional context
Tanomaly function with a thread, so test will include "asynchronous" test for the thread

@NS4nti NS4nti added enhancement New feature or request important tests labels Oct 31, 2019
@HugoSoszynski HugoSoszynski added this to the Version 1.1.1 milestone Nov 12, 2019
@NS4nti NS4nti mentioned this issue Nov 14, 2019
6 tasks
@HugoSoszynski HugoSoszynski added the pending Issue have a pull request waiting for review label Nov 20, 2019
HugoSoszynski pushed a commit that referenced this issue Dec 2, 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](https://github.com/VultureProject/darwin/wiki/Filters-Summary)  section

## 📃 Type of change

**New feature**: non-breaking change which adds functionality.

## 💡 Related Issue(s)

- Resolve #107 

## ✒️ 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 (‼️ 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:

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

</br>

- [x] 🙋 **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**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request important pending Issue have a pull request waiting for review tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants