@@ -190,10 +190,10 @@ def test_write_metrics_log(self):
190190
191191 expected_output = (
192192 "Invoice Month,Report Start Time,Report End Time,Project - Allocation,Project - Allocation ID,Manager (PI),Cluster Name,Invoice Email,Invoice Address,Institution,Institution - Specific Code,SU Hours (GBhr or SUhr),SU Type,Rate,Cost,Generated At\n "
193- "2023-01,2023-01-0100 :00:00Z ,2023-01-0300 :00:00Z ,namespace1,namespace1,,test-cluster,,,,,1128,OpenShift CPU,0.013,14.66,2023-01-0500 :00:00Z \n "
194- "2023-01,2023-01-0100 :00:00Z ,2023-01-0300 :00:00Z ,namespace2,namespace2,,test-cluster,,,,,96,OpenShift CPU,0.013,1.25,2023-01-0500 :00:00Z \n "
195- "2023-01,2023-01-0100 :00:00Z ,2023-01-0300 :00:00Z ,namespace2,namespace2,,test-cluster,,,,,48,OpenShift GPUA100,1.803,86.54,2023-01-0500 :00:00Z \n "
196- "2023-01,2023-01-0100 :00:00Z ,2023-01-0300 :00:00Z ,namespace2,namespace2,,test-cluster,,,,,48,OpenShift GPUA100SXM4,2.078,99.74,2023-01-0500 :00:00Z \n "
193+ "2023-01,2023-01-01T00 :00:00+00:00 ,2023-01-03T00 :00:00+00:00 ,namespace1,namespace1,,test-cluster,,,,,1128,OpenShift CPU,0.013,14.66,2023-01-05T00 :00:00+00:00 \n "
194+ "2023-01,2023-01-01T00 :00:00+00:00 ,2023-01-03T00 :00:00+00:00 ,namespace2,namespace2,,test-cluster,,,,,96,OpenShift CPU,0.013,1.25,2023-01-05T00 :00:00+00:00 \n "
195+ "2023-01,2023-01-01T00 :00:00+00:00 ,2023-01-03T00 :00:00+00:00 ,namespace2,namespace2,,test-cluster,,,,,48,OpenShift GPUA100,1.803,86.54,2023-01-05T00 :00:00+00:00 \n "
196+ "2023-01,2023-01-01T00 :00:00+00:00 ,2023-01-03T00 :00:00+00:00 ,namespace2,namespace2,,test-cluster,,,,,48,OpenShift GPUA100SXM4,2.078,99.74,2023-01-05T00 :00:00+00:00 \n "
197197 )
198198
199199 with tempfile .NamedTemporaryFile (mode = "w+" ) as tmp :
@@ -238,8 +238,8 @@ def test_write_metrics_for_vms(self):
238238
239239 expected_output = (
240240 "Invoice Month,Report Start Time,Report End Time,Project - Allocation,Project - Allocation ID,Manager (PI),Cluster Name,Invoice Email,Invoice Address,Institution,Institution - Specific Code,SU Hours (GBhr or SUhr),SU Type,Rate,Cost,Generated At\n "
241- "2023-01,2023-01-0100 :00:00Z ,2023-01-0300 :00:00Z ,namespace1,namespace1,,test-cluster,,,,,24,OpenShift GPUA100SXM4,2.078,49.87,2023-01-0500 :00:00Z \n "
242- "2023-01,2023-01-0100 :00:00Z ,2023-01-0300 :00:00Z ,namespace1,namespace1,,test-cluster,,,,,24,OpenShift GPUH100,6.04,144.96,2023-01-0500 :00:00Z \n "
241+ "2023-01,2023-01-01T00 :00:00+00:00 ,2023-01-03T00 :00:00+00:00 ,namespace1,namespace1,,test-cluster,,,,,24,OpenShift GPUA100SXM4,2.078,49.87,2023-01-05T00 :00:00+00:00 \n "
242+ "2023-01,2023-01-01T00 :00:00+00:00 ,2023-01-03T00 :00:00+00:00 ,namespace1,namespace1,,test-cluster,,,,,24,OpenShift GPUH100,6.04,144.96,2023-01-05T00 :00:00+00:00 \n "
243243 )
244244
245245 with tempfile .NamedTemporaryFile (mode = "w+" ) as tmp :
@@ -338,10 +338,10 @@ def test_write_metrics_log(self):
338338
339339 expected_output = (
340340 "Invoice Month,Report Start Time,Report End Time,Project - Allocation,Project - Allocation ID,Manager (PI),Cluster Name,Invoice Email,Invoice Address,Institution,Institution - Specific Code,SU Hours (GBhr or SUhr),SU Type,Rate,Cost,Generated At\n "
341- "2023-01,2023-01-0100 :00:00Z ,2023-01-0300 :00:00Z ,namespace2:noclass,namespace2:noclass,,test-cluster,,,,,96,OpenShift CPU,0.013,1.25,2023-01-0500 :00:00Z \n "
342- "2023-01,2023-01-0100 :00:00Z ,2023-01-0300 :00:00Z ,namespace2:math-201,namespace2:math-201,,test-cluster,,,,,96,OpenShift CPU,0.013,1.25,2023-01-0500 :00:00Z \n "
343- "2023-01,2023-01-0100 :00:00Z ,2023-01-0300 :00:00Z ,namespace2:math-201,namespace2:math-201,,test-cluster,,,,,24,OpenShift GPUA100,1.803,43.27,2023-01-0500 :00:00Z \n "
344- "2023-01,2023-01-0100 :00:00Z ,2023-01-0300 :00:00Z ,namespace2:cs-101,namespace2:cs-101,,test-cluster,,,,,48,OpenShift GPUA100SXM4,2.078,99.74,2023-01-0500 :00:00Z \n "
341+ "2023-01,2023-01-01T00 :00:00+00:00 ,2023-01-03T00 :00:00+00:00 ,namespace2:noclass,namespace2:noclass,,test-cluster,,,,,96,OpenShift CPU,0.013,1.25,2023-01-05T00 :00:00+00:00 \n "
342+ "2023-01,2023-01-01T00 :00:00+00:00 ,2023-01-03T00 :00:00+00:00 ,namespace2:math-201,namespace2:math-201,,test-cluster,,,,,96,OpenShift CPU,0.013,1.25,2023-01-05T00 :00:00+00:00 \n "
343+ "2023-01,2023-01-01T00 :00:00+00:00 ,2023-01-03T00 :00:00+00:00 ,namespace2:math-201,namespace2:math-201,,test-cluster,,,,,24,OpenShift GPUA100,1.803,43.27,2023-01-05T00 :00:00+00:00 \n "
344+ "2023-01,2023-01-01T00 :00:00+00:00 ,2023-01-03T00 :00:00+00:00 ,namespace2:cs-101,namespace2:cs-101,,test-cluster,,,,,48,OpenShift GPUA100SXM4,2.078,99.74,2023-01-05T00 :00:00+00:00 \n "
345345 )
346346
347347 with tempfile .NamedTemporaryFile (mode = "w+" ) as tmp :
@@ -386,7 +386,7 @@ def test_write_metrics_by_namespace_decimal(self):
386386
387387 expected_output = (
388388 "Invoice Month,Report Start Time,Report End Time,Project - Allocation,Project - Allocation ID,Manager (PI),Cluster Name,Invoice Email,Invoice Address,Institution,Institution - Specific Code,SU Hours (GBhr or SUhr),SU Type,Rate,Cost,Generated At\n "
389- "2023-01,2023-01-0100 :00:00Z ,2023-01-0300 :00:00Z ,namespace1,namespace1,,test-cluster,,,,,35,OpenShift CPU,0.013,0.46,2023-01-0500 :00:00Z \n "
389+ "2023-01,2023-01-01T00 :00:00+00:00 ,2023-01-03T00 :00:00+00:00 ,namespace1,namespace1,,test-cluster,,,,,35,OpenShift CPU,0.013,0.46,2023-01-05T00 :00:00+00:00 \n "
390390 )
391391
392392 with tempfile .NamedTemporaryFile (mode = "w+" ) as tmp :
@@ -472,9 +472,9 @@ def setUp(self):
472472 def test_write_metrics_by_namespace_with_ignore_hours (self ):
473473 expected_output = (
474474 "Invoice Month,Report Start Time,Report End Time,Project - Allocation,Project - Allocation ID,Manager (PI),Cluster Name,Invoice Email,Invoice Address,Institution,Institution - Specific Code,SU Hours (GBhr or SUhr),SU Type,Rate,Cost,Generated At\n "
475- "2023-01,2023-01-0100 :00:00Z ,2023-01-0300 :00:00Z ,namespace1,namespace1,,test-cluster,,,,,12,OpenShift CPU,0.013,0.16,2023-01-0500 :00:00Z \n "
476- "2023-01,2023-01-0100 :00:00Z ,2023-01-0300 :00:00Z ,namespace2,namespace2,,test-cluster,,,,,170,OpenShift CPU,0.013,2.21,2023-01-0500 :00:00Z \n "
477- "2023-01,2023-01-0100 :00:00Z ,2023-01-0300 :00:00Z ,namespace2,namespace2,,test-cluster,,,,,37,OpenShift GPUA100SXM4,2.078,76.89,2023-01-0500 :00:00Z \n "
475+ "2023-01,2023-01-01T00 :00:00+00:00 ,2023-01-03T00 :00:00+00:00 ,namespace1,namespace1,,test-cluster,,,,,12,OpenShift CPU,0.013,0.16,2023-01-05T00 :00:00+00:00 \n "
476+ "2023-01,2023-01-01T00 :00:00+00:00 ,2023-01-03T00 :00:00+00:00 ,namespace2,namespace2,,test-cluster,,,,,170,OpenShift CPU,0.013,2.21,2023-01-05T00 :00:00+00:00 \n "
477+ "2023-01,2023-01-01T00 :00:00+00:00 ,2023-01-03T00 :00:00+00:00 ,namespace2,namespace2,,test-cluster,,,,,37,OpenShift GPUA100SXM4,2.078,76.89,2023-01-05T00 :00:00+00:00 \n "
478478 )
479479
480480 with tempfile .NamedTemporaryFile (mode = "w+" ) as tmp :
0 commit comments