Skip to content

Refactor protected branch resource and spec

Mark Lapierre requested to merge qa-ml-refactor-protected-branch-test into master

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

Performance and Testing

Edited by Mark Lapierre

Merge request reports