31a362eef7
sha1: 820bc092f443bcf540240d8d2a2081e75b3145b7 Concat 1.1.0 has idempotancy issue with `ensure => 'absent'` Bug described at https://tickets.puppetlabs.com/browse/MODULES-1311 Fix fixtures for tests as 10.108.0.2 is not available during the tests Change-Id: I900980647d865d2712c823d04481ecebe91e9a0c Partial-Bug: 1455389 Signed-off-by: Sergii Golovatiuk <sgolovatiuk@mirantis.com>
38 lines
1.1 KiB
Ruby
38 lines
1.1 KiB
Ruby
require 'spec_helper'
|
|
require 'shared-examples'
|
|
manifest = 'virtual_ips/virtual_ips.pp'
|
|
|
|
describe manifest do
|
|
shared_examples 'catalog' do
|
|
interfaces = %w(public management public_vrouter management_vrouter)
|
|
vip_interfaces = interfaces.map { |interface| "vip__#{interface}" }
|
|
let (:interfaces) { interfaces }
|
|
let (:vip_interfaces) { vip_interfaces }
|
|
|
|
vip_interfaces.each do |interface|
|
|
it do
|
|
expect(subject).to contain_cs_resource(interface).with(
|
|
:ensure => 'present',
|
|
)
|
|
end
|
|
|
|
it do
|
|
expect(subject).to contain_service(interface).with(
|
|
:provider => 'pacemaker',
|
|
:ensure => 'running',
|
|
:enable => true,
|
|
)
|
|
end
|
|
end
|
|
|
|
it do
|
|
should contain_cs_rsc_colocation('vip__public_vrouter-with-vip__management_vrouter').with(
|
|
:primitives => %w(vip__public_vrouter vip__management_vrouter),
|
|
)
|
|
end
|
|
|
|
end
|
|
|
|
test_ubuntu_and_centos manifest
|
|
end
|