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
1f0edaa3
Commit
1f0edaa3
authored
Feb 15, 2019
by
Alejandro Rodríguez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix access to constant `Gitlab::RepositorySizeError`
parent
832408da
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
1 deletion
+37
-1
ee/app/services/ee/commits/create_service.rb
ee/app/services/ee/commits/create_service.rb
+1
-1
ee/changelogs/unreleased/9800-500-error-when-trying-to-update-project-surpassing-repository-limit-through-the-web-interface.yml
...surpassing-repository-limit-through-the-web-interface.yml
+5
-0
ee/spec/services/ee/commits/create_service_spec.rb
ee/spec/services/ee/commits/create_service_spec.rb
+31
-0
No files found.
ee/app/services/ee/commits/create_service.rb
View file @
1f0edaa3
...
...
@@ -16,7 +16,7 @@ module EE
def
validate_repository_size!
if
project
.
above_size_limit?
raise_error
(
Gitlab
::
RepositorySizeError
.
new
(
project
).
commit_error
)
raise_error
(
::
Gitlab
::
RepositorySizeError
.
new
(
project
).
commit_error
)
end
end
end
...
...
ee/changelogs/unreleased/9800-500-error-when-trying-to-update-project-surpassing-repository-limit-through-the-web-interface.yml
0 → 100644
View file @
1f0edaa3
---
title
:
Fix access to constant Gitlab::RepositorySizeError
merge_request
:
9579
author
:
type
:
fixed
ee/spec/services/ee/commits/create_service_spec.rb
0 → 100644
View file @
1f0edaa3
# frozen_string_literal: true
require
'spec_helper'
describe
Commits
::
CreateService
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
create
(
:user
)
}
before
do
project
.
add_maintainer
(
user
)
end
subject
(
:service
)
do
described_class
.
new
(
project
,
user
,
start_branch:
'master'
,
branch_name:
'master'
)
end
describe
'#execute'
do
before
do
stub_licensed_features
(
repository_size_limit:
true
)
project
.
update!
(
repository_size_limit:
1
)
allow
(
project
).
to
receive
(
:repository_and_lfs_size
).
and_return
(
2
)
end
subject
(
:result
)
{
service
.
execute
}
it
'raises an error if the repositoy exceeds the size limit'
do
expect
(
result
[
:status
]).
to
be
(
:error
)
expect
(
result
[
:message
]).
to
eq
(
'Your changes could not be committed, because this repository has exceeded its size limit of 1 Byte by 1 Byte'
)
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