[ 
https://issues.apache.org/jira/browse/LIBCLOUD-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13559715#comment-13559715
 ] 

Jaume Devesa edited comment on LIBCLOUD-278 at 1/22/13 3:39 PM:
----------------------------------------------------------------

Yes, you are right. 

About testing the BaseSSHClient class, I don't think that will give us to much 
value, because what I've modified is the ParamikoSSHClient. But this class is 
not covered by the tests: 
http://ci.apache.org/projects/libcloud/coverage/libcloud_compute_ssh.html#n114

I will try to mock the 'socket' module this way: 
http://paperairoplane.net/?p=312 but using the 'mock' library instead the 'mox' 
one.
                
      was (Author: jdevesa):
    Yes, you are right. 

About testing the BaseSSHClient class, I don't think that will give us to much 
value, because what I've modified is the ParamikoSSHClient. But this class is 
not covered by the tests: 
http://ci.apache.org/projects/libcloud/coverage/libcloud_compute_ssh.html#n114

I will can try to mock the 'socket' module this way: 
http://paperairoplane.net/?p=312 but using the 'mock' library instead the 'mox' 
one.
                  
> Name a ScriptDeployment object without absolute path fails the execution
> ------------------------------------------------------------------------
>
>                 Key: LIBCLOUD-278
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-278
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.11.2
>            Reporter: Jaume Devesa
>         Attachments: libcloud_278.patch
>
>
> If you set a name to a ScriptDeployment this way:
> sd = ScriptDeployment('touch total_success', name='success.sh')
> it fails the execution when you call the conn.deploy_node() function without 
> feedback to the user. 
> The 'put' method of the 'ParamikoSSHClient' copies the file 'success.sh'  in 
> the relative path of the logged user (/root/success.sh or 
> /home/ubuntu/success.sh in Ubuntu machines), but the 'run' method of the same 
> class runs directly the 'success.sh' script and this file is not in the 
> classpath. 
> If you set the line previous to the return statement of the 'run' method:
> print ("Out: '%s', Error: '%s', Status: '%d'") % (so, se, status)
> You get:
> Out: '', Error: 'bash: success.sh: command not found', Status: '127'
> If the name of the 'ScriptDeployment' is an absolute path (sd = 
> ScriptDeployment('touch total_success', name='/home/ubuntu/success.sh')), the 
> execution runs fine.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to