Sha256: 8421049399a5cf9daf35acd13cd03af3a05e9ead9f4c312aa4c5b65866bad9a1

Contents?: true

Size: 929 Bytes

Versions: 35

Compression:

Stored size: 929 Bytes

Contents

require_relative '../test_helper'
require 'socket'

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

		def test_basic_push_using_svnsync
			with_svn_repository('svn') do |src|
				OhlohScm::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|
				OhlohScm::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

35 entries across 35 versions & 1 rubygems

Version Path
ohloh_scm-2.4.14 test/unit/svn_push_test.rb
ohloh_scm-2.4.13 test/unit/svn_push_test.rb
ohloh_scm-2.4.12 test/unit/svn_push_test.rb
ohloh_scm-2.4.11 test/unit/svn_push_test.rb
ohloh_scm-2.4.10 test/unit/svn_push_test.rb
ohloh_scm-2.4.9 test/unit/svn_push_test.rb
ohloh_scm-2.4.8 test/unit/svn_push_test.rb
ohloh_scm-2.4.7 test/unit/svn_push_test.rb
ohloh_scm-2.4.6 test/unit/svn_push_test.rb
ohloh_scm-2.4.5 test/unit/svn_push_test.rb
ohloh_scm-2.4.4 test/unit/svn_push_test.rb
ohloh_scm-2.4.3 test/unit/svn_push_test.rb
ohloh_scm-2.4.1 test/unit/svn_push_test.rb
ohloh_scm-2.4.0 test/unit/svn_push_test.rb
ohloh_scm-2.3.5 test/unit/svn_push_test.rb
ohloh_scm-2.3.4 test/unit/svn_push_test.rb
ohloh_scm-2.3.2 test/unit/svn_push_test.rb
ohloh_scm-2.3.1 test/unit/svn_push_test.rb
ohloh_scm-2.3.0 test/unit/svn_push_test.rb
ohloh_scm-2.2.13 test/unit/svn_push_test.rb