Merge "Remove unnecessary if statement in ceph::mon"

This commit is contained in:
Jenkins
2014-05-29 08:12:35 +00:00
committed by Gerrit Code Review
3 changed files with 11 additions and 4 deletions

View File

@@ -85,9 +85,7 @@ define ceph::mon (
status => "service ceph status mon.${id}",
}
} else {
if ! $public_addr {
fail("operatingsystem = ${::operatingsystem} is not supported")
}
fail("operatingsystem = ${::operatingsystem} is not supported")
}
$mon_service = "ceph-mon-${id}"

View File

@@ -49,6 +49,7 @@ describe 'ceph::mons' do
describe 'Ubuntu' do
let :facts do
{
:osfamily => 'Debian',
:operatingsystem => 'Ubuntu',
}
end
@@ -59,6 +60,7 @@ describe 'ceph::mons' do
describe 'Debian' do
let :facts do
{
:osfamily => 'Debian',
:operatingsystem => 'Debian',
}
end
@@ -69,6 +71,7 @@ describe 'ceph::mons' do
describe 'RedHat' do
let :facts do
{
:osfamily => 'RedHat',
:operatingsystem => 'RedHat',
}
end

View File

@@ -28,6 +28,7 @@ describe 'ceph::mon' do
let :facts do
{
:osfamily => 'Debian',
:operatingsystem => 'Ubuntu',
}
end
@@ -61,8 +62,8 @@ touch /etc/ceph/ceph.client.admin.keyring"
let :facts do
{
:osfamily => 'RedHat',
:operatingsystem => 'RHEL6',
:hostname => 'first',
}
end
@@ -78,6 +79,11 @@ touch /etc/ceph/ceph.client.admin.keyring"
end
it { should contain_service('ceph-mon-A').with('ensure' => "running") }
it { should contain_exec('ceph-mon-ceph.client.admin.keyring-A').with(
'command' => "/bin/true # comment to satisfy puppet syntax requirements
set -ex
touch /etc/ceph/ceph.client.admin.keyring"
) }
# it { p subject.resources }