Commit 1b20f827 authored by Vasilii Iakliushin's avatar Vasilii Iakliushin

Fix typo in Pull mirror verification

* Contributes to https://gitlab.com/gitlab-org/gitlab/-/issues/351520
* Sentry error:
https://sentry.gitlab.net/gitlab/gitlabcom/issues/3152531/

Changelog: fixed
EE: true
parent dbe9b35c
......@@ -631,7 +631,7 @@ module EE
unless ::Gitlab::UrlSanitizer.valid?(value)
self.import_url = value
self.import_data&.user = nil
value
return
end
url = ::Gitlab::UrlSanitizer.new(value)
......
......@@ -216,6 +216,15 @@ RSpec.describe Projects::MirrorsController do
expect(flash[:alert]).to match(/is blocked/)
end
end
context 'with an invalid port for a pull' do
it 'processes an unsuccessful update' do
do_put(project, username_only_import_url: 'https://updated.example.com:wrong_port')
expect(response).to redirect_to(project_settings_repository_path(project, anchor: 'js-push-remote-settings'))
expect(flash[:alert]).to match(/is blocked/)
end
end
end
def do_put(project, options, extra_attrs = {})
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment