From 672f196a7623c72e2f69a903328333795f34dffe Mon Sep 17 00:00:00 2001 From: Christoph Hartmann Date: Wed, 23 Sep 2015 20:55:40 +0200 Subject: [PATCH] update port tests --- test/unit/resource_port_test.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/unit/resource_port_test.rb b/test/unit/resource_port_test.rb index ade1f6dc3..411dd2a8d 100644 --- a/test/unit/resource_port_test.rb +++ b/test/unit/resource_port_test.rb @@ -8,31 +8,31 @@ describe 'Vulcano::Resources::Port' do it 'verify port on Ubuntu 14.04' do resource = MockLoader.new(:ubuntu1404).load_resource('port', 22) _(resource.listening?).must_equal true - _(resource.protocol).must_equal 'tcp' - _(resource.pid).must_equal 1 - _(resource.process).must_equal 'sshd' + _(resource.protocol).must_equal %w{ tcp tcp6 } + _(resource.pid).must_equal [1] + _(resource.process).must_equal ['sshd'] end it 'verify port on MacOs x' do resource = MockLoader.new(:osx104).load_resource('port', 2022) _(resource.listening?).must_equal true - _(resource.protocol).must_equal 'tcp' - _(resource.process).must_equal 'VBoxHeadl' + _(resource.protocol).must_equal ['tcp'] + _(resource.process).must_equal ['VBoxHeadl'] end it 'verify port on Windows' do resource = MockLoader.new(:windows).load_resource('port', 135) _(resource.listening?).must_equal true - _(resource.protocol).must_equal 'tcp' + _(resource.protocol).must_equal ['tcp'] _(resource.process).must_equal nil end it 'verify port on FreeBSD' do resource = MockLoader.new(:freebsd10).load_resource('port', 22) _(resource.listening?).must_equal true - _(resource.protocol).must_equal 'tcp' - _(resource.pid).must_equal 668 - _(resource.process).must_equal 'sshd' + _(resource.protocol).must_equal %w{ tcp6 tcp } + _(resource.pid).must_equal [668] + _(resource.process).must_equal ['sshd'] end it 'verify running on undefined' do