From c09d8224169fd78e2e14e0c3783c87e9ccb41b2b Mon Sep 17 00:00:00 2001 From: Sean Marlow Date: Wed, 2 Oct 2024 15:30:44 -0400 Subject: [PATCH] Add start and end timestamps for metering hook --- csp_billing_adapter_amazon/plugin.py | 2 ++ tests/unit/test_plugin.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/csp_billing_adapter_amazon/plugin.py b/csp_billing_adapter_amazon/plugin.py index 983fb62..2292c8e 100644 --- a/csp_billing_adapter_amazon/plugin.py +++ b/csp_billing_adapter_amazon/plugin.py @@ -48,6 +48,8 @@ def meter_billing( config: Config, dimensions: dict, timestamp: datetime, + billing_period_start: str, + billing_period_end: str, dry_run: bool ): """ diff --git a/tests/unit/test_plugin.py b/tests/unit/test_plugin.py index 25b0d60..87e5521 100644 --- a/tests/unit/test_plugin.py +++ b/tests/unit/test_plugin.py @@ -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 ) @@ -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 )