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
08118105
Commit
08118105
authored
8 years ago
by
Florent Thiery
Browse files
Options
Downloads
Patches
Plain Diff
fix ssh test refs
#20596
parent
0be96f29
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_mediaworker.py
+6
-5
6 additions, 5 deletions
tests/test_mediaworker.py
with
6 additions
and
5 deletions
tests/test_mediaworker.py
+
6
−
5
View file @
08118105
...
...
@@ -22,13 +22,14 @@ es_utils = imp.load_source('es_utils', '../utils.py')
conf
=
es_utils
.
load_conf
()
def
check_ssh
(
ip
):
cmd
=
'
timeout 2
ssh -o StrictHostKeyChecking=no %s ls /tmp
'
%
ip
cmd
=
'
/usr/bin/
ssh -o StrictHostKeyChecking=no
-o PasswordAuthentication=no
%s ls /tmp
'
%
ip
print
(
'
Connecting: %s
'
%
cmd
)
status
,
output
=
subprocess
.
getstatusoutput
(
cmd
)
if
status
!=
0
:
print
(
'
%sFailed to login using SSH%s
'
%
(
RED
,
DEF
))
try
:
subprocess
.
check_output
(
cmd
,
shell
=
True
,
timeout
=
2
)
print
(
'
%sLogged in successfully%s
'
%
(
GREEN
,
DEF
))
except
subprocess
.
CalledProcessError
:
print
(
'
%sFailed to login using SSH, run ssh-copy-id %s %s
'
%
(
RED
,
ip
,
DEF
))
return
False
print
(
'
%sLogged in successfully%s
'
%
(
GREEN
,
DEF
))
return
True
all_ok
=
True
...
...
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