Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9dfa6315
Commit
9dfa6315
authored
Oct 05, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix 500 error updating mirror URLs for projects
parent
c86ef86c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
1 deletion
+34
-1
CHANGELOG-EE
CHANGELOG-EE
+1
-0
app/models/project.rb
app/models/project.rb
+1
-1
spec/requests/projects/mirrors_controller_spec.rb
spec/requests/projects/mirrors_controller_spec.rb
+32
-0
No files found.
CHANGELOG-EE
View file @
9dfa6315
Please view this file on the master branch, on stable branches it's out of date.
v 8.13.0 (unreleased)
- Fix 500 error updating mirror URLs for projects
v 8.12.4 (unreleased)
- [ES] Indexer works with smaller batches of repositories to not exceed NOFILE limit
...
...
app/models/project.rb
View file @
9dfa6315
...
...
@@ -527,7 +527,7 @@ class Project < ActiveRecord::Base
end
def
import_url
if
import_data
&&
super
if
import_data
&&
super
.
present?
import_url
=
Gitlab
::
UrlSanitizer
.
new
(
super
,
credentials:
import_data
.
credentials
)
import_url
.
full_url
else
...
...
spec/requests/projects/mirrors_controller_spec.rb
0 → 100644
View file @
9dfa6315
require
'spec_helper'
describe
Projects
::
MirrorsController
do
let
(
:project
)
do
create
(
:project
,
mirror:
true
,
mirror_user:
user
,
import_url:
'http://user:pass@test.url'
)
end
let
(
:user
)
{
create
(
:user
)
}
describe
'updates the mirror URL'
do
before
do
project
.
team
<<
[
user
,
:master
]
login_as
(
user
)
end
it
'complains about passing an empty URL'
do
patch
namespace_project_mirror_path
(
project
.
namespace
,
project
),
project:
{
mirror:
'1'
,
import_url:
''
,
mirror_user_id:
'1'
,
mirror_trigger_builds:
'0'
}
expect
(
response
).
to
have_http_status
:success
expect
(
response
).
to
render_template
(
:show
)
expect
(
response
.
body
).
to
include
(
'Import url can't be blank'
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment