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
9531f46b
Commit
9531f46b
authored
Aug 01, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
b2fbc919
beb7d892
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
8 deletions
+33
-8
doc/ci/variables/README.md
doc/ci/variables/README.md
+5
-2
qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_file_size_spec.rb
...r_ui/3_create/repository/push_over_http_file_size_spec.rb
+28
-6
No files found.
doc/ci/variables/README.md
View file @
9531f46b
...
...
@@ -370,8 +370,11 @@ variables take precedence over those defined in `.gitlab-ci.yml`.
## Unsupported variables
There are cases where some variables cannot be used in the context of a
`.gitlab-ci.yml`
definition (for example under
`script`
). Read more
about which variables are
[
not supported
](
where_variables_can_be_used.md
)
.
`.gitlab-ci.yml`
definition (for example under
`script`
). Read more about which variables are
[
not supported
](
where_variables_can_be_used.md
)
.
## Where variables can be used
Click
[
here
](
where_variables_can_be_used.md
)
for a section that describes where and how the different types of variables can be used.
## Advanced use
...
...
qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_file_size_spec.rb
View file @
9531f46b
# frozen_string_literal: true
module
QA
# Failure issue: https://gitlab.com/gitlab-org/quality/nightly/issues/113
context
'Create'
,
:requires_admin
,
:quarantine
do
context
'Create'
,
:requires_admin
do
describe
'push after setting the file size limit via admin/application_settings'
do
before
(
:context
)
do
@project
=
Resource
::
Project
.
fabricate_via_api!
do
|
p
|
...
...
@@ -21,14 +20,21 @@ module QA
it
'push successful when the file size is under the limit'
do
set_file_size_limit
(
5
)
push
=
push_new_file
(
'oversize_file_1.bin'
,
wait_for_push:
true
)
expect
(
push
.
output
).
not_to
have_content
'remote: fatal: pack exceeds maximum allowed size'
retry_on_fail
do
push
=
push_new_file
(
'oversize_file_1.bin'
,
wait_for_push:
true
)
expect
(
push
.
output
).
not_to
have_content
'remote: fatal: pack exceeds maximum allowed size'
end
end
it
'push fails when the file size is above the limit'
do
set_file_size_limit
(
1
)
expect
{
push_new_file
(
'oversize_file_2.bin'
,
wait_for_push:
false
)
}
.
to
raise_error
(
QA
::
Git
::
Repository
::
RepositoryCommandError
,
/remote: fatal: pack exceeds maximum allowed size/
)
retry_on_fail
do
expect
{
push_new_file
(
'oversize_file_2.bin'
,
wait_for_push:
false
)
}
.
to
raise_error
(
QA
::
Git
::
Repository
::
RepositoryCommandError
,
/remote: fatal: pack exceeds maximum allowed size/
)
end
end
def
set_file_size_limit
(
limit
)
...
...
@@ -54,6 +60,22 @@ module QA
output
end
# Application settings are cached for up to a minute. So when we change
# the `receive_max_input_size` setting, the setting might not be applied
# for minute. This caused the tests to intermittently fail.
# See https://gitlab.com/gitlab-org/quality/nightly/issues/113
#
# Instead of waiting a minute after changing the setting, we retry the
# attempt to push if it fails. Most of the time the setting is updated in
# under a minute, i.e., in fewer than 6 attempts with a 10 second sleep
# between attempts.
# See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/30233#note_188616863
def
retry_on_fail
Support
::
Retrier
.
retry_on_exception
(
max_attempts:
6
,
reload_page:
nil
,
sleep_interval:
10
)
do
yield
end
end
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