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'))
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'))
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')
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' )