Merge "Remove unnecessary if statement in ceph::mon"
This commit is contained in:
@@ -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}"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user