Skip to content

Commit

Permalink
Add start and end timestamps for metering hook
Browse files Browse the repository at this point in the history
  • Loading branch information
smarlowucf committed Oct 2, 2024
1 parent ebdd559 commit c09d822
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions csp_billing_adapter_amazon/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ def meter_billing(
config: Config,
dimensions: dict,
timestamp: datetime,
billing_period_start: str,
billing_period_end: str,
dry_run: bool
):
"""
Expand Down
4 changes: 4 additions & 0 deletions tests/unit/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ def test_meter_billing(mock_boto3, mock_get_region):
config,
dimensions,
timestamp,
'2024-10-02T17:58:09.985794+00:00',
'2024-10-02T17:58:09.985794+00:00',
dry_run=True
)

Expand All @@ -74,6 +76,8 @@ def test_meter_billing_error(mock_boto3, mock_get_region):
config,
dimensions,
timestamp,
'2024-10-02T17:58:09.985794+00:00',
'2024-10-02T17:58:09.985794+00:00',
dry_run=True
)

Expand Down

0 comments on commit c09d822

Please sign in to comment.