Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
106
Merge Requests
106
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
24e30be2
Commit
24e30be2
authored
Apr 29, 2024
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow to set root password during installation for tests
parent
39bab215
Pipeline
#34301
failed with stage
in 0 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
software/gitlab/buildout.hash.cfg
software/gitlab/buildout.hash.cfg
+1
-1
software/gitlab/instance-gitlab.cfg.in
software/gitlab/instance-gitlab.cfg.in
+4
-0
software/gitlab/test/test.py
software/gitlab/test/test.py
+7
-3
No files found.
software/gitlab/buildout.hash.cfg
View file @
24e30be2
...
...
@@ -54,7 +54,7 @@ md5sum = d769ea27820e932c596c35bbbf3f2902
[instance-gitlab.cfg.in]
_update_hash_filename_ = instance-gitlab.cfg.in
md5sum =
d63a14446f52e147c734a0a285cb4f09
md5sum =
9b741e61a5a8a86efbc2c0334de107a0
[instance-gitlab-export.cfg.in]
_update_hash_filename_ = instance-gitlab-export.cfg.in
...
...
software/gitlab/instance-gitlab.cfg.in
View file @
24e30be2
...
...
@@ -628,6 +628,10 @@ wrapper-path = ${directory:service}/puma
# Those operations require PG and Redis to be up and running already, that's
# why we do it here. See gitlab-puma-startup for details.
command-line = ${gitlab-puma-startup:output}
{% if instance_parameter_dict.get('root-password') -%}
environment =
GITLAB_ROOT_PASSWORD={{ instance_parameter_dict['root-password'] }}
{% endif %}
depend =
${promise-puma:recipe}
...
...
software/gitlab/test/test.py
View file @
24e30be2
...
...
@@ -46,6 +46,10 @@ class TestGitlab(SlapOSInstanceTestCase):
def
getInstanceSoftwareType
(
cls
):
return
'gitlab'
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'root-password'
:
'admin1234'
}
def
setUp
(
self
):
self
.
backend_url
=
self
.
computer_partition
.
getConnectionParameterDict
(
)[
'backend_url'
]
...
...
@@ -79,8 +83,8 @@ class TestGitlab(SlapOSInstanceTestCase):
verify
=
False
)
for
_
in
range
(
10
):
sign_in
(
headers
=
{
'X
_FORWARDED_FOR
'
:
'1.2.3.4'
})
sign_in
(
headers
=
{
'X
-Forwarded-For
'
:
'1.2.3.4'
})
# after 10 authentication failures, this client is rate limited
self
.
assertEqual
(
sign_in
(
headers
=
{
'X
_FORWARDED_FOR
'
:
'1.2.3.4'
}).
status_code
,
429
)
self
.
assertEqual
(
sign_in
(
headers
=
{
'X
-Forwarded-For
'
:
'1.2.3.4'
}).
status_code
,
429
)
# but other clients are not
self
.
assertNotEqual
(
sign_in
(
headers
=
{
'X
_FORWARDED_FOR
'
:
'5.6.7.8'
}).
status_code
,
429
)
self
.
assertNotEqual
(
sign_in
(
headers
=
{
'X
-Forwarded-For
'
:
'5.6.7.8'
}).
status_code
,
429
)
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