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