Skip to content

Commit

Permalink
Merge pull request #407 from wyardley/test_fix
Browse files Browse the repository at this point in the history
fix for rubocop issues introduced in 9e2c
  • Loading branch information
dhollinger authored Oct 20, 2017
2 parents 8a7b099 + 278737d commit 13111e1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/classes/server_config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
is_expected.to contain_file('/etc/mongod.conf').with_content(%r{^fork=true})

is_expected.to contain_file('/root/.mongorc.js').with(ensure: 'absent')
is_expected.to_not contain_exec('fix dbpath permissions')
is_expected.not_to contain_exec('fix dbpath permissions')
}
end

Expand Down Expand Up @@ -152,15 +152,15 @@
end

describe 'with dbpath_fix enabled' do
let(:pre_condition) { "class { 'mongodb::server': config => '/etc/mongod.conf', dbpath => '/var/lib/mongo', rcfile => '/root/.mongorc.js', dbpath_fix => true, user => 'foo', group => 'bar' }" }
let(:pre_condition) { "class { 'mongodb::server': config => '/etc/mongod.conf', dbpath => '/var/lib/mongo', rcfile => '/root/.mongorc.js', dbpath_fix => true, user => 'foo', group => 'bar' }" }

it {
is_expected.to contain_exec('fix dbpath permissions').with(
:command => 'chown -R foo:bar /var/lib/mongo',
:path => ['/usr/bin', '/bin'],
:onlyif => "find /var/lib/mongo -not -user foo -o -not -group bar -print -quit | grep -q '.*'")
command: 'chown -R foo:bar /var/lib/mongo',
path: ['/usr/bin', '/bin'],
onlyif: "find /var/lib/mongo -not -user foo -o -not -group bar -print -quit | grep -q '.*'"
)
is_expected.to contain_exec('fix dbpath permissions').that_subscribes_to('File[/var/lib/mongo]')
}
end

end

0 comments on commit 13111e1

Please sign in to comment.