Refactor protected branch resource and spec
What does this MR do?
Some improvements to the protected branch resource and spec in preparation for adding a new one (see gitlab-org/quality/testcases#117 (closed))
Renames Resource::Branch
to Resource::ProtectedBranch
to be clear that it configures the settings to protect a branch, rather than just creating a new branch.
Makes branch
an attribute to make it clear creating the branch is not the main responsibility of the class.
Initializes the project with a readme so that the resource only has to push once when it creates a branch.
Stops ProjectPush
from visiting the project page so that it doesn't have to use the browser UI.
EE MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/16310
Screenshots
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry for user-facing changes, or community contribution. Check the link for other scenarios.
- [-] Documentation created/updated or follow-up review issue created
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
-
Separation of EE specific content
Performance and Testing
Edited by Mark Lapierre