Skip to content
This repository was archived by the owner on Sep 1, 2024. It is now read-only.

Commit 23540f9

Browse files
committed
Check uploaded results in integration tests
These checks were unintentionally removed in a31066e.
1 parent ed5c71a commit 23540f9

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/common.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,20 @@ def run_test_case(
648648
json.loads(gzip.decompress(upload_request.body))
649649
)
650650

651+
assert_regex(TIMESTAMP_REGEX, upload_body['start_time'])
652+
assert_regex(TIMESTAMP_REGEX, upload_body['end_time'])
653+
654+
actual_test_runs = {
655+
(test_run_record['filename'], tuple(test_run_record['name'])): [
656+
attempt['result'] for attempt in test_run_record['attempts']
657+
]
658+
for test_run_record in upload_body['test_runs']
659+
}
660+
assert actual_test_runs == expected_uploaded_test_runs
661+
662+
# Make sure there aren't any duplicate test keys.
663+
assert len(upload_body['test_runs']) == len(actual_test_runs)
664+
651665
if expected_commit is not None:
652666
assert upload_body['commit'] == expected_commit
653667
else:

0 commit comments

Comments
 (0)