Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Łukasz Nowak
slapos.toolbox
Commits
38c133c1
Commit
38c133c1
authored
Oct 20, 2017
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gitlab resiliencytest: wait until gitlab is ready before create project
parent
e96809ac
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
5 deletions
+21
-5
slapos/resiliencytest/suites/gitlab.py
slapos/resiliencytest/suites/gitlab.py
+21
-5
No files found.
slapos/resiliencytest/suites/gitlab.py
View file @
38c133c1
...
@@ -159,10 +159,26 @@ class GitlabTestSuite(SlaprunnerTestSuite):
...
@@ -159,10 +159,26 @@ class GitlabTestSuite(SlaprunnerTestSuite):
self
.
logger
.
info
(
'Gitlab root password is:
\
n
%s'
%
self
.
password
)
self
.
logger
.
info
(
'Gitlab root password is:
\
n
%s'
%
self
.
password
)
self
.
logger
.
info
(
'Gitlab private token is:
\
n
%s'
%
self
.
private_token
)
self
.
logger
.
info
(
'Gitlab private token is:
\
n
%s'
%
self
.
private_token
)
self
.
logger
.
info
(
'Waiting 1 minute so that gitlab can be started...'
)
self
.
logger
.
info
(
'Waiting 90 seconds so that gitlab can be started...'
)
time
.
sleep
(
90
)
self
.
logger
.
info
(
'Trying to connect to gitlab backend URL...'
)
loop
=
0
while
loop
<
3
:
try
:
self
.
_connectToGitlab
(
url
=
self
.
backend_url
)
except
Exception
,
e
:
if
loop
==
2
:
raise
self
.
logger
.
warning
(
str
(
e
))
self
.
logger
.
info
(
'Retry connection in 60 seconds...'
)
loop
+=
1
time
.
sleep
(
60
)
time
.
sleep
(
60
)
else
:
self
.
logger
.
info
(
'success!'
)
break
print
self
.
_createNewProject
(
'sample.test'
)
self
.
logger
.
info
(
self
.
_createNewProject
(
'sample.test'
)
)
project_list
=
self
.
_listProjects
()
project_list
=
self
.
_listProjects
()
self
.
default_project_list
=
[]
self
.
default_project_list
=
[]
for
project
in
project_list
:
for
project
in
project_list
:
...
@@ -173,7 +189,7 @@ class GitlabTestSuite(SlaprunnerTestSuite):
...
@@ -173,7 +189,7 @@ class GitlabTestSuite(SlaprunnerTestSuite):
self
.
sample_file
=
self
.
_connectToGitlab
(
url
=
self
.
file_uri
)
self
.
sample_file
=
self
.
_connectToGitlab
(
url
=
self
.
file_uri
)
self
.
logger
.
info
(
'Wait 10 minutes for main instance to have backup of gitlab...'
)
self
.
logger
.
info
(
'Wait 10 minutes for main instance to have backup of gitlab...'
)
time
.
sleep
(
60
)
#
0)
time
.
sleep
(
600
)
# in erp5testnode, we have only one IP, so we can't run at the same time
# in erp5testnode, we have only one IP, so we can't run at the same time
# gitlab in webrunner of main instance, and other services in import script of clone instance
# gitlab in webrunner of main instance, and other services in import script of clone instance
...
...
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