From 3c876cb8a704d2c20a925369c64a4570e6f5f5da Mon Sep 17 00:00:00 2001 From: Tim Pansino Date: Thu, 9 Feb 2023 16:20:30 -0800 Subject: [PATCH] Fix expected tests for new validator behavior --- tests/agent_features/test_ignore_expected_errors.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/agent_features/test_ignore_expected_errors.py b/tests/agent_features/test_ignore_expected_errors.py index 5cf61eced5..93595aa35b 100644 --- a/tests/agent_features/test_ignore_expected_errors.py +++ b/tests/agent_features/test_ignore_expected_errors.py @@ -94,8 +94,9 @@ def test_classes_error_event_inside_transaction(settings, expected, ignore): error_count = 1 if not ignore else 0 errors = _test_runtime_error if not ignore else [] + expected_errors = _runtime_error_name if expected and not ignore else None - @validate_transaction_errors(errors=errors) + @validate_transaction_errors(errors=errors, expected_errors=expected_errors) @validate_error_event_sample_data( required_attrs=attributes, required_user_attrs=False, @@ -268,8 +269,9 @@ def test_status_codes_inside_transaction(settings, expected, ignore, status_code error_count = 1 if not ignore else 0 errors = _test_teapot_error if not ignore else [] + expected_errors = _teapot_error_name if expected and not ignore else None - @validate_transaction_errors(errors=errors) + @validate_transaction_errors(errors=errors, expected_errors=expected_errors) @validate_error_event_sample_data( required_attrs=attributes, required_user_attrs=False, @@ -359,8 +361,9 @@ def test_mixed_ignore_expected_settings_inside_transaction( error_count = 1 if not ignore else 0 errors = _test_runtime_error if not ignore else [] + expected_errors = _runtime_error_name if expected and not ignore else None - @validate_transaction_errors(errors=errors) + @validate_transaction_errors(errors=errors, expected_errors=expected_errors) @validate_error_event_sample_data( required_attrs=attributes, required_user_attrs=False, @@ -428,8 +431,9 @@ def test_overrides_inside_transaction(override, result, parameter): error_count = 1 if not ignore else 0 errors = _test_runtime_error if not ignore else [] + expected_errors = _runtime_error_name if expected and not ignore else None - @validate_transaction_errors(errors=errors) + @validate_transaction_errors(errors=errors, expected_errors=expected_errors) @validate_error_event_sample_data( required_attrs=attributes, required_user_attrs=False,