コード例 #1
0
ファイル: test_api.py プロジェクト: n0n0x/awsfabrictasks
 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'))
コード例 #2
0
ファイル: test_api.py プロジェクト: chocobn69/awsfabrictasks
 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'))
コード例 #3
0
ファイル: test_api.py プロジェクト: n0n0x/awsfabrictasks
 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'
     )
コード例 #4
0
ファイル: test_api.py プロジェクト: chocobn69/awsfabrictasks
 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')