Ejemplo n.º 1
0
 def test_ec2_rsync_download_command(self):
     self.assertEquals(
         ec2_rsync_download_command(self.instancewrapper, '/etc',
                                    '/tmp/etc'),
         'rsync -av -e "ssh -i /path/to/key.pem " [email protected]:/etc /tmp/etc'
     )
     self.assertEquals(
         ec2_rsync_download_command(self.instancewrapper, '/etc/',
                                    '/tmp/etc'),
         'rsync -av -e "ssh -i /path/to/key.pem " [email protected]:/etc /tmp/etc'
     )
     self.assertEquals(
         ec2_rsync_download_command(self.instancewrapper,
                                    '/etc/',
                                    '/tmp/etc',
                                    sync_content=True),
         'rsync -av -e "ssh -i /path/to/key.pem " [email protected]:/etc/ /tmp/etc'
     )
     self.assertEquals(
         ec2_rsync_download_command(self.instancewrapper,
                                    '/etc/',
                                    '/tmp/etc',
                                    sync_content=False),
         ec2_rsync_download_command(self.instancewrapper, '/etc/',
                                    '/tmp/etc'))
Ejemplo n.º 2
0
 def test_ec2_rsync_download_command(self):
     self.assertEquals(ec2_rsync_download_command(self.instancewrapper, '/etc', '/tmp/etc'),
                       'rsync -av -e "ssh -i /path/to/key.pem " [email protected]:/etc /tmp/etc')
     self.assertEquals(ec2_rsync_download_command(self.instancewrapper, '/etc/', '/tmp/etc'),
                       'rsync -av -e "ssh -i /path/to/key.pem " [email protected]:/etc /tmp/etc')
     self.assertEquals(ec2_rsync_download_command(self.instancewrapper, '/etc/', '/tmp/etc', sync_content=True),
                       'rsync -av -e "ssh -i /path/to/key.pem " [email protected]:/etc/ /tmp/etc')
     self.assertEquals(ec2_rsync_download_command(self.instancewrapper, '/etc/', '/tmp/etc', sync_content=False),
                       ec2_rsync_download_command(self.instancewrapper, '/etc/', '/tmp/etc'))
Ejemplo n.º 3
0
 def test_ec2_rsync_download_command_extra_ssh_args(self):
     awsfab_settings.EXTRA_SSH_ARGS = 'TEST'
     self.assertEquals(
         ec2_rsync_download_command(self.instancewrapper, '/etc/',
                                    '/tmp/etc'),
         'rsync -av -e "ssh -i /path/to/key.pem TEST" [email protected]:/etc /tmp/etc'
     )
Ejemplo n.º 4
0
 def test_ec2_rsync_download_command_extra_ssh_args(self):
     awsfab_settings.EXTRA_SSH_ARGS = 'TEST'
     self.assertEquals(ec2_rsync_download_command(self.instancewrapper, '/etc/', '/tmp/etc'),
                       'rsync -av -e "ssh -i /path/to/key.pem TEST" [email protected]:/etc /tmp/etc')