Sha256: 4839ac9479e131fca4ad4cbe9c1b6a7b2aa6c5660440a29183d39ece65df9bc2

Contents?: true

Size: 914 Bytes

Versions: 1

Compression:

Stored size: 914 Bytes

Contents

require_relative '../test_helper'
require 'socket'

module OhlohScm::Adapters
	class SvnPushTest < Scm::Test

		def test_basic_push_using_svnsync
			with_svn_repository('svn') do |src|
				Scm::ScratchDir.new do |dest_dir|

					dest = SvnAdapter.new(:url => dest_dir).normalize
					assert !dest.exist?

					src.push(dest)
					assert dest.exist?

					assert_equal src.log, dest.log
				end
			end
		end

		# Triggers the "ssh" code path by using svn+ssh:// protocol instead of file:// protocol.
		# Simulates pushing to another server in our cluster.
		def test_ssh_push_using_svnsync
			with_svn_repository('svn') do |src|
				Scm::ScratchDir.new do |dest_dir|

					dest = SvnAdapter.new(:url => "svn+ssh://#{Socket.gethostname}#{File.expand_path(dest_dir)}").normalize
					assert !dest.exist?

					src.push(dest)
					assert dest.exist?

					assert_equal src.log, dest.log
				end
			end
		end

	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ohloh_scm-2.0.0 test/unit/svn_push_test.rb