diff --git a/tests/appsec/test_PII.py b/tests/appsec/test_PII.py index ec6cf9f4a24..fdcf874f3f7 100644 --- a/tests/appsec/test_PII.py +++ b/tests/appsec/test_PII.py @@ -1,7 +1,6 @@ from utils import BaseTestCase, context, skipif -@skipif(context.library == "cpp", reason="not relevant: No C++ appsec planned") @skipif(not context.appsec_is_released, reason=context.appsec_not_released_reason) @skipif(context.library == "dotnet", reason="missing feature") @skipif(context.library == "java", reason="missing feature") diff --git a/tests/appsec/test_conf.py b/tests/appsec/test_conf.py index 0187dfdb551..cbfca089d51 100644 --- a/tests/appsec/test_conf.py +++ b/tests/appsec/test_conf.py @@ -1,7 +1,6 @@ from utils import BaseTestCase, context, skipif, interfaces -@skipif(context.library == "cpp", reason="not relevant: No C++ appsec planned") @skipif(not context.appsec_is_released, reason=context.appsec_not_released_reason) class Test_StaticRuleSet(BaseTestCase): """Test different way to configure AppSec""" @@ -13,7 +12,6 @@ def test_basic_hardcoded_ruleset(self): stdout.assert_presence(r"AppSec loaded \d+ rules from file <.*>$", level="INFO") -@skipif(context.library == "cpp", reason="not relevant: No C++ appsec planned") @skipif(not context.appsec_is_released, reason=context.appsec_not_released_reason) @skipif(context.library == "dotnet", reason="Missing feature") @skipif(context.library == "java", reason="Missing feature") diff --git a/tests/appsec/test_logs.py b/tests/appsec/test_logs.py index 69420a054aa..7123cec2a51 100644 --- a/tests/appsec/test_logs.py +++ b/tests/appsec/test_logs.py @@ -4,7 +4,6 @@ stdout = interfaces.library_stdout if context.library != "dotnet" else interfaces.library_dotnet_managed -@skipif(context.library == "cpp", reason="not relevant: No C++ appsec planned") @skipif(not context.appsec_is_released, reason=context.appsec_not_released_reason) class Test_Standardization(BaseTestCase): """AppSec logs should be standardized""" @@ -53,11 +52,6 @@ def test_d06(self): stdout.assert_presence(r"Detecting an attack from rule crs-921-160:.*", level="DEBUG") stdout.assert_presence(r"Detecting an attack from rule crs-913-110:.*", level="DEBUG") - @skipif(True, reason="missing feature: not testable as now") - def test_d07(self): - """Log D7: Exception in rule""" - stdout.assert_presence(r"Rule .* failed. Error details: ", level="DEBUG") - @skipif(context.library == "dotnet", reason="missing feature") def test_d09(self): """Log D9: WAF start of execution""" @@ -95,18 +89,25 @@ def test_i08(self): """Log I8: Sending AppSec events""" stdout.assert_presence(r"Sending \d+ AppSec events to the agent$", level="INFO") - @skipif(True, reason="missing feature: not testable as now") + +@skipif(not context.appsec_is_released, reason=context.appsec_not_released_reason) +@skipif(True, reason="missing feature: not testable as now") +class Test_StandardizationErrors(BaseTestCase): + """AppSec error logs should be standardized""" + + def test_d07(self): + """Log D7: Exception in rule""" + stdout.assert_presence(r"Rule .* failed. Error details: ", level="DEBUG") + def test_i09(self): """Log I9: Dropping events""" stdout.assert_presence(r"Dropping \d+ AppSec events because ", level="INFO") - @skipif(True, reason="missing feature: not testable as now") def test_i10(self): """Log I10: Flushing events before shutdown""" stdout.assert_presence(r"Reporting AppSec event batch because of process shutdown.$", level="INFO") -@skipif(context.library == "cpp", reason="not relevant: No C++ appsec planned") @skipif(not context.appsec_is_released, reason=context.appsec_not_released_reason) @skipif(True, reason="missing feature: will need a dedicated testing scenario") class Test_StandardizationBlockMode(BaseTestCase):