def create_archive(revision): tmp_folder = dir.temp_local() tmp_tar = os.path.join(tmp_folder, 'repo.tar.gz') core.local('git archive --format=tar %(rev)s | gzip > %(tar)s' % { 'rev': revision, 'tar': tmp_tar }) return tmp_tar
def create_archive(revision): tmp_folder = dir.temp_local() tmp_tar = os.path.join(tmp_folder, 'repo.tar.gz') core.local( 'git archive --format=tar %(rev)s | gzip > %(tar)s' % {'rev': revision, 'tar': tmp_tar} ) return tmp_tar
def select(): if not is_running(): log.abort("Vagrant based VM currently NOT running") return config_path = os.path.join(dir.temp_local(), "vagrant_ssh_config") core.local("vagrant ssh-config > %s" % config_path) core.env.hosts = ["default"] core.env.password = "******" core.env.ssh_config_path = config_path core.env.use_ssh_config = True
def select(): if not is_running(): log.abort("Vagrant based VM currently NOT running") return config_path = os.path.join(dir.temp_local(), "vagrant_ssh_config") core.local("vagrant ssh-config > %s" % config_path) core.env.hosts = ["default"] core.env.password = "******" core.env.ssh_config_path = config_path core.env.use_ssh_config = True
def test_temp_local(mkdtemp): mkdtemp.expects_call().returns(run_result("path")) assert directory.temp_local() == "path"
def test_temp_local(mkdtemp): mkdtemp.expects_call().returns(run_result("path")) assert directory.temp_local() == "path"