Skip to content

Commit

Permalink
approval testing
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrcho committed Nov 29, 2023
1 parent 80e7f42 commit c6dbb19
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Empty file added aws/logs_monitoring/__init__.py
Empty file.
6 changes: 6 additions & 0 deletions aws/logs_monitoring/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

from approvaltests.approvals import *
from approvaltests.reporters import *


set_default_reporter(GenericDiffReporter(GenericDiffReporterConfig("VSCODE", "/Applications/Visual Studio Code.app/contents/Resources/app/bin/code", ["-d"])))
3 changes: 3 additions & 0 deletions aws/logs_monitoring/tests/test_lambda_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import base64
from time import time
from botocore.exceptions import ClientError
from approvaltests.approvals import *

sys.modules["trace_forwarder.connection"] = MagicMock()
sys.modules["datadog_lambda.wrapper"] = MagicMock()
Expand Down Expand Up @@ -167,6 +168,8 @@ def test_datadog_forwarder(
enriched_events = enrich(normalized_events)
transformed_events = transform(enriched_events)

verify_as_json(transformed_events)

metrics, logs, trace_payloads = split(transformed_events)
self.assertEqual(len(trace_payloads), 1)

Expand Down

0 comments on commit c6dbb19

Please sign in to comment.