]> git.apps.os.sepia.ceph.com Git - teuthology.git/commit
suite/test/test_run.py: Add tests for SHA1 handling with --newest 2055/head
authorKamoltat Sirivadhna <ksirivad@redhat.com>
Thu, 12 Jun 2025 21:03:59 +0000 (17:03 -0400)
committerKamoltat Sirivadhna <ksirivad@redhat.com>
Fri, 13 Jun 2025 18:00:32 +0000 (18:00 +0000)
commite895b180dc888ca16adaadc441d9b92d6766054a
tree02f1c4e621f97360482c8565bc2e9fe42158efbd
parent09e517d9a6bf34236c989f2903e38488beba5ecf
suite/test/test_run.py: Add tests for SHA1 handling with --newest

Added two test cases to verify SHA1 handling when using --newest backtracking:

1. test_newest_success_same_branch_same_repo: Tests when ceph_branch and
   suite_branch are the same. Verifies that both ceph_hash and suite_hash
   are updated to the backtracked working SHA1.

2. test_newest_success_diff_branch_diff_repo: Tests when ceph_branch and
   suite_branch differ. Verifies that only ceph_hash is updated to the
   working SHA1, while suite_hash remains as the original suite_sha1.

Both tests verify the complete flow through collect_jobs() and
schedule_suite(), ensuring the YAML files generated for each job
contain the correct SHA1 references.

Fixes: https://tracker.ceph.com/issues/71668
Signed-off-by: Kamoltat Sirivadhna <ksirivad@redhat.com>
teuthology/suite/test/test_run_.py