Sha256: 2b3ed08b728e67e0811ef09d4b6ddf81fa5ff9d95f1eb3d13be08aca95b7b83b

Contents?: true

Size: 694 Bytes

Versions: 43

Compression:

Stored size: 694 Bytes

Contents

#!/usr/bin/env ruby

$:.unshift(File.join(File.dirname(__FILE__), '..'))

require 'test/unit'
require 'rex/service_manager'

class Rex::ServiceManager::UnitTest < Test::Unit::TestCase

	Klass = Rex::ServiceManager

	def test_svcm
		begin
			c = Klass
			s = c.start(Rex::Proto::Http::Server, 8090)
			assert_not_nil(s)
			t = c.start(Rex::Proto::Http::Server, 8090)
			assert_not_nil(t)
			assert_equal(s, t)
			z = c.start(Rex::Proto::Http::Server, 8091)
			assert_not_equal(t, z)
			assert_equal("HTTP Server", s.alias)
			assert_equal("HTTP Server 1", z.alias)
		ensure
			c.stop_by_alias(s.alias) if (s)
			c.stop_by_alias(z.alias) if (z)
			c.stop_by_alias(t.alias) if (t)
		end

	end

end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
librex-0.0.65 lib/rex/service_manager.rb.ut.rb
librex-0.0.63 lib/rex/service_manager.rb.ut.rb
librex-0.0.54 lib/rex/service_manager.rb.ut.rb
librex-0.0.53 lib/rex/service_manager.rb.ut.rb
librex-0.0.52 lib/rex/service_manager.rb.ut.rb
librex-0.0.51 lib/rex/service_manager.rb.ut.rb
librex-0.0.50 lib/rex/service_manager.rb.ut.rb
librex-0.0.49 lib/rex/service_manager.rb.ut.rb
librex-0.0.48 lib/rex/service_manager.rb.ut.rb
librex-0.0.47 lib/rex/service_manager.rb.ut.rb
librex-0.0.46 lib/rex/service_manager.rb.ut.rb
librex-0.0.44 lib/rex/service_manager.rb.ut.rb
librex-0.0.43 lib/rex/service_manager.rb.ut.rb
librex-0.0.42 lib/rex/service_manager.rb.ut.rb
librex-0.0.41 lib/rex/service_manager.rb.ut.rb
librex-0.0.40 lib/rex/service_manager.rb.ut.rb
librex-0.0.39 lib/rex/service_manager.rb.ut.rb
librex-0.0.38 lib/rex/service_manager.rb.ut.rb
librex-0.0.37 lib/rex/service_manager.rb.ut.rb
librex-0.0.36 lib/rex/service_manager.rb.ut.rb