Skip to content

Update validations for Push Mirrors

Vasilii Iakliushin requested to merge 455517_update_push_mirror_tests into master

What does this MR do and why?

Contributes to #455517 (closed)

Problem

  1. Push mirror update endpoint is missing tests for error cases
  2. only_protected_branches validation is missing and triggers 'ActiveRecord::NotNullViolation' exception.
  3. [Minor] Code to find remote mirror object is duplicated

Solution

  1. Add extra tests
  2. Add a validation for a boolean field
  3. Extract common code into a helper

Merge request reports