repository: modernize the tests for `FetchSourceBranch`
Currently the tests for FetchSourceBranch
use seeded repositories and
spread across multiple smaller tests. Combine all these tests using
table-driven tests and remove seeded repositories. This makes it easier
to extend the tests.
repository: Add test for non-quarantined FetchSourceBranch
Currently FetchSourceBranch
doesn't use a quarantined repository.
Because of this, if there is a failure mid-way and refs are already
pulled, we don't discard these refs. The fix for this is to move to
using a quarantined repository. But before we do that, let's add a test
to verify this behavior. When we do eventually fix this with quarantined
repositories, this test would fail (test-driven development).
Making this the first MR for this issue, to keep things small, the next one will add the implementation and fix the broken test.
Part of: #4520 (closed)