Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
envsetup
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mediaserver
envsetup
Commits
9a3d3206
Commit
9a3d3206
authored
8 years ago
by
Florent Thiery
Browse files
Options
Downloads
Patches
Plain Diff
test for celerity connectivity, refs
#20596
parent
34dbcae5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_mediaworker.py
+14
-0
14 additions, 0 deletions
tests/test_mediaworker.py
with
14 additions
and
0 deletions
tests/test_mediaworker.py
+
14
−
0
View file @
9a3d3206
...
@@ -47,6 +47,17 @@ def run_tests(ip):
...
@@ -47,6 +47,17 @@ def run_tests(ip):
print
(
'
%apt-get update failed on MediaWorker%s
'
%
(
RED
,
DEF
))
print
(
'
%apt-get update failed on MediaWorker%s
'
%
(
RED
,
DEF
))
return
False
return
False
def
check_celerity_connectivity
(
ip
):
h
=
conf
.
get
(
'
MS_SERVER_NAME
'
)
cmd
=
"
ssh %i curl -k https://%s:6200
"
%
(
ip
,
h
)
print
(
'
Checking celerity connectivity: %s
'
%
cmd
)
d
=
subprocess
.
check_output
(
cmd
,
shell
=
True
,
timeout
=
5
)
if
"
Celerity tasks server
"
in
d
:
print
(
'
%sSuccessfully reached tasks server%s
'
%
(
GREEN
,
DEF
))
return
True
print
(
'
%sFailed to reach tasks server%s
'
%
(
RED
,
DEF
))
return
False
all_ok
=
True
all_ok
=
True
worker_ip
=
conf
.
get
(
'
CELERITY_WORKER_IP
'
)
worker_ip
=
conf
.
get
(
'
CELERITY_WORKER_IP
'
)
...
@@ -56,4 +67,7 @@ if worker_ip != '127.0.1.1':
...
@@ -56,4 +67,7 @@ if worker_ip != '127.0.1.1':
else
:
else
:
if
not
run_tests
(
worker_ip
):
if
not
run_tests
(
worker_ip
):
all_ok
=
False
all_ok
=
False
if
not
check_celerity_connectivity
(
ip
):
all_ok
=
False
sys
.
exit
(
int
(
not
all_ok
))
sys
.
exit
(
int
(
not
all_ok
))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment