Update file locking QA feature spec
We recently introduced a new merge request check that looks for locked files. The check ensures that none of the paths are locked by anyone other than the author. It looks like we forgot to update the spec. The spec didn't fail because the author was also locking the file so we weren't tripping this check. We also introduced a new merge commit diff mode which interacts with this check. The diff mode will ignore changes from merge commits that are present in all parents i.e. If the merge request author merged the target_branch into the source_branch after making changes in the source_branch: Previously, we would include all of those files as changed_paths even if the merge request author hadn't modifed them through fixing merge conflicts or manually amending the commit. Now, we only include the merged changes in the changed_paths if the user fixed a merge conflict or manually amended the file. So what was previously happening was the check during the MR phase would return zero locked paths but then when you merge and gitlab pushes the changes to the repository we would run the same checks on the merge commit and that would be flagged because it's no longer the merge request author but the person who merged the MR. When we enable the new merge commit diff mode this change isn't evaluated after being merged so we do not receive any error and the test fails. I've updated the test to now check that the path lock check has failed.
加载中
想要评论请 注册 或 登录