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

Commit

Permalink
Check uploaded results in integration tests
Browse files Browse the repository at this point in the history
These checks were unintentionally removed in
a31066e.
  • Loading branch information
ramosbugs committed Mar 16, 2024
1 parent ed5c71a commit 23540f9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,20 @@ def run_test_case(
json.loads(gzip.decompress(upload_request.body))
)

assert_regex(TIMESTAMP_REGEX, upload_body['start_time'])
assert_regex(TIMESTAMP_REGEX, upload_body['end_time'])

actual_test_runs = {
(test_run_record['filename'], tuple(test_run_record['name'])): [
attempt['result'] for attempt in test_run_record['attempts']
]
for test_run_record in upload_body['test_runs']
}
assert actual_test_runs == expected_uploaded_test_runs

# Make sure there aren't any duplicate test keys.
assert len(upload_body['test_runs']) == len(actual_test_runs)

if expected_commit is not None:
assert upload_body['commit'] == expected_commit
else:
Expand Down

0 comments on commit 23540f9

Please sign in to comment.