Skip to content

Adjust error check to accept additional prefix

Pavlo Strokov requested to merge ps-regexp-expected-error into master

What does this MR do and why?

In the MR gitaly!5027 (merged) the errors creation was a bit refactored to include more info that helps to investigate the issues. It became a cause of the GitLab tests failure https://gitlab.com/gitlab-org/gitlab/-/jobs/3298615344. As it is totally legit to change the error messages by the API contract the equality check is replaced with regexp match. The specs are still verify the expected text is included in the error message, but also allow to include additional suffixes or prefixes to it. The tree_spec.rb is changed as well, because it may become a cause of another failure with upcoming changes in Gitaly. That is why it is changed beforehand.

Part of: gitaly#4471 (closed)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports