Commit 6b6df866 authored by Jan Provaznik's avatar Jan Provaznik

Merge branch 'fix_typo_in_pull_mirror_code' into 'master'

Fix typo in Pull mirror verification

See merge request gitlab-org/gitlab!80408
parents f013396b 1b20f827
......@@ -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