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