Skip to content

Commit

Permalink
Bug 1453967 - Add tests to ensure job/perf hashes remain consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
edmorley committed Feb 11, 2019
1 parent f2babb2 commit 8b678c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/etl/test_job_ingestion.py
Expand Up @@ -17,6 +17,11 @@ def test_ingest_single_sample_job(test_repository, failure_classifications,
"""Process a single job structure in the job_data.txt file"""
job_data = sample_data.job_data[:1]
test_utils.do_job_ingestion(test_repository, job_data, sample_push)
assert Job.objects.count() == 1
job = Job.objects.get(id=1)
# Ensure we don't inadvertently change the way we generate job-related hashes.
assert job.option_collection_hash == '32faaecac742100f7753f0c1d0aa0add01b4046b'
assert job.signature.signature == '4dabe44cc898e585228c43ea21337a9b00f5ddf7'


def test_ingest_all_sample_jobs(test_repository, failure_classifications,
Expand Down
2 changes: 2 additions & 0 deletions tests/etl/test_perf_data_adapters.py
Expand Up @@ -236,6 +236,8 @@ def test_load_generic_data(test_repository,

summary_signature = PerformanceSignature.objects.get(
suite=perf_datum['suites'][0]['name'], test='')
# Ensure we don't inadvertently change the way we generate signature hashes.
assert summary_signature.signature_hash == 'f451f0c9000a7f99e5dc2f05792bfdb0e11d0cac'
subtest_signatures = PerformanceSignature.objects.filter(
parent_signature=summary_signature).values_list('signature_hash', flat=True)
assert len(subtest_signatures) == 3
Expand Down

0 comments on commit 8b678c9

Please sign in to comment.