Skip to content
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

Add start and end timestamps for metering hook #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading