Skip to content

Branch tests: use less indent-y featureset idiom

Continue amending the code changed in e87b76da ("featureset: Simplify execution with a new Run() function", 2020-11-03) to use the *.Run() idiom to use the testWithFeature() function instead.

This is better because when we add/remove these features we won't have this indent churn. There's a trivial cost that e.g. TestFailedUserDeleteBranchDueToHooks() does some needless setup now, but the CPU wastage is trivial, and it avoids future bugs as stuff that's supposed to be tested with/without the feature in that function would be put above the feature marker.

The two [Tt]estSuccessfulGitHooksForUserCreateBranchRequest() functions had also drifted apart in some previous changes, fix that while we're at it.

This also makes things more consistent with new code I'm adding in !2814 (closed).

Edited by Ævar Arnfjörð Bjarmason

Merge request reports