Skip to content

Commit

Permalink
Add spec test for voxpupuli#291
Browse files Browse the repository at this point in the history
Closes voxpupuli#291

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
  • Loading branch information
roidelapluie committed Aug 31, 2016
1 parent c10056e commit bde58df
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions spec/classes/corosync_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,31 @@
end
end

context 'when set_quorum is true and quorum_members are an array of arrays' do
before do
params.merge!(
set_votequorum: true,
quorum_members: [
['172.31.10.1', '172.31.11.1', '172.31.12.1'],
['172.31.10.2', '172.31.11.2', '172.31.12.2'],
['172.31.10.3', '172.31.11.3', '172.31.12.3'],
['172.31.10.4', '172.31.11.4', '172.31.12.4'],
]
)
end

[
[0, 0, %r{172\.31\.10\.1}],
[1, 1, %r{172\.31\.11\.2}],
[2, 2, %r{172\.31\.12\.3}],
[2, 3, %r{172\.31\.12\.4}]
].each do |ring_id, node_id, ip_address|
it "configures ring#{ring_id} ip address of #{node_id} to #{ip_address}" do
should contain_file('/etc/corosync/corosync.conf').with_content(ip_address)
end
end
end

context 'when unicast is used' do
before do
params.merge!(
Expand Down

0 comments on commit bde58df

Please sign in to comment.