fuel-library/deployment/puppet/osnailyfacter/modular/virtual_ips/virtual_ips_post.rb
Tatyana Leontovich d2d0808a5e Rename vip__public_vrouter primitive in post check
Name of this primitive was canged in cd3f8b2cb2,
but was not changed in modular/virtual_ips/public_vip_ping_post.rb
so post check failed with false negative result.

Also note, this change is related only
to tests and does not affect deployment.
Fuel-Ci: disable

Change-Id: Ie6e87cb0001a83916b1601b19f7fa1c3caad5735
Closes-Bug: #1483756
2015-08-14 13:32:34 +00:00

53 lines
1.8 KiB
Ruby

require File.join File.dirname(__FILE__), '../test_common.rb'
class VirtualIPsPostTest < Test::Unit::TestCase
def has_public?
TestCommon::Settings.lookup 'public_vip'
end
def test_can_ping_the_default_router
ip = TestCommon::Network.default_router
assert TestCommon::Network.ping?(ip), "Cannot ping the default router '#{ip}'!"
end
def test_public_vip_ping
return unless has_public?
ip = TestCommon::Settings.public_vip
assert TestCommon::Network.ping?(ip), "Could not ping the public vip '#{ip}'!"
end
def test_public_vrouter_vip_ping
return unless has_public?
ip = TestCommon::Settings.public_vrouter_vip
assert TestCommon::Network.ping?(ip), "Could not ping the public vrouter vip '#{ip}'!"
end
def test_management_vip_ping
ip = TestCommon::Settings.management_vip
assert TestCommon::Network.ping?(ip), "Could not ping the management vip '#{ip}'!"
end
def test_management_vrouter_vip_ping
ip = TestCommon::Settings.management_vrouter_vip
assert TestCommon::Network.ping?(ip), "Could not ping the management vrouter vip '#{ip}'!"
end
def test_vip_ocf_present
file = '/usr/lib/ocf/resource.d/fuel/ns_IPaddr2'
assert File.exist?(file), 'VIP OCF file is missing!'
end
def test_paceamaker_management_vips
assert TestCommon::Pacemaker.primitive_started?('vip__management'), 'vip__management Pacemaker service is not started!'
assert TestCommon::Pacemaker.primitive_started?('vip__management_vrouter'), 'vip__management_vrouter Pacemaker service is not started!'
end
def test_paceamaker_public_vips
return unless has_public?
assert TestCommon::Pacemaker.primitive_started?('vip__public'), 'vip__public Pacemaker service is not started!'
assert TestCommon::Pacemaker.primitive_started?('vip__vrouter_pub'), 'vip__vrouter_pub Pacemaker service is not started!'
end
end