-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Improve NAP DoS tests #2996
Improve NAP DoS tests #2996
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2996 +/- ##
==========================================
- Coverage 52.31% 52.29% -0.03%
==========================================
Files 58 58
Lines 15965 15995 +30
==========================================
+ Hits 8352 8364 +12
- Misses 7335 7352 +17
- Partials 278 279 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -206,6 +215,12 @@ def test_dos_vs_logs( | |||
print(f"log_loc: {log_loc} syslog_pod: {syslog_pod} namespace: {ingress_controller_prerequisites.namespace}") | |||
log_contents = get_file_contents(kube_apis.v1, log_loc, syslog_pod, ingress_controller_prerequisites.namespace) | |||
|
|||
# print("\n===================== ADMD Logs Start =====================") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pasmant can you please remove the commented code if not needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is any log level in pytest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the logs
@@ -133,6 +141,7 @@ def fin(): | |||
delete_dos_policy(kube_apis.custom_objects, pol_name, test_namespace) | |||
delete_dos_logconf(kube_apis.custom_objects, log_name, test_namespace) | |||
delete_dos_protected(kube_apis.custom_objects, protected_name, test_namespace) | |||
clean_good_bad_clients() | |||
# delete_items_from_yaml(kube_apis, src_webapp_yaml, test_namespace) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pasmant more commented code here, can you please have a look?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
@@ -233,74 +243,6 @@ def test_dos_sec_logs_on( | |||
assert f'vs_name="{test_namespace}/dos-protected/name"' in log_contents | |||
assert "bad_actor" in log_contents | |||
|
|||
def test_dos_under_attack_no_learning( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need this anymore?
Make dos tests more robust