-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If either started_at or completed_at timestamp is null, use the current timestamp as the event time and set duration to zero. Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
- Loading branch information
1 parent
14c1fa5
commit 56a6b2e
Showing
5 changed files
with
2,562 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import json | ||
from unittest import TestCase | ||
from push import jobs_to_stream | ||
|
||
|
||
class Test(TestCase): | ||
|
||
def test_jobs_to_stream(self): | ||
with open("testdata/run.json") as run_json, open("testdata/jobs.json") as jobs_json: | ||
run = json.load(run_json) | ||
jobs = json.load(jobs_json) | ||
# Make sure it can handle null timestamps | ||
jobs_to_stream(run, jobs, "main") |
Oops, something went wrong.