
Several changes to deprecate the MidoNet's zookeeper module. Deric's Zookeeper: https://github.com/deric/puppet-zookeeper Is well mantained and it has much more functionality. So the commit replaces the dependencies and sets some changes to adapt to the new module. I have kept the ::midonet::zookeeper manifest to maintain backwards compatiblity with tools that use MidoNet 2015.01 version. So the ::midonet::zookeeper manifest is just a gangway to the actual's deric one now. Change-Id: I6e6ebe8c9fea2e3d3195d9890b1c89362bd23d58
57 lines
1.3 KiB
Ruby
57 lines
1.3 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe 'midonet::zookeeper' do
|
|
|
|
shared_examples_for 'cluster zookeeper' do
|
|
let :params do
|
|
{
|
|
:servers => [{"id" => 1, "host" => 'node_1'},
|
|
{"id" => 2, "host" => 'node_2'},
|
|
{"id" => 3, "host" => 'node_3'}],
|
|
:server_id => 3
|
|
}
|
|
end
|
|
|
|
let :zookeeper_params do
|
|
{
|
|
:servers => ['node_1', 'node_2', 'node_3'],
|
|
:id => 3
|
|
}
|
|
end
|
|
|
|
it 'should call deric/zookeeper properly' do
|
|
is_expected.to contain_class('zookeeper').with({
|
|
'servers' => zookeeper_params[:servers],
|
|
'id' => zookeeper_params[:id]
|
|
})
|
|
end
|
|
end
|
|
|
|
context 'on Debian' do
|
|
let :facts do
|
|
{
|
|
:osfamily => 'Debian',
|
|
:operatingsystem => 'Ubuntu',
|
|
:lsbdistrelease => '14.04',
|
|
:lsbdistid => 'Ubuntu',
|
|
:ipaddress => '127.0.0.1',
|
|
:hostname => 'test.puppet'
|
|
}
|
|
end
|
|
it_configures 'cluster zookeeper'
|
|
end
|
|
|
|
context 'on RedHat' do
|
|
let :facts do
|
|
{
|
|
:osfamily => 'RedHat',
|
|
:operatingsystemmajrelease => 7,
|
|
:ipaddress => '127.0.0.1',
|
|
:hostname => 'test.puppet'
|
|
}
|
|
end
|
|
it_configures 'cluster zookeeper'
|
|
end
|
|
|
|
end
|