Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for rubocop issues introduced in 9e2c #407

Merged
merged 1 commit into from
Oct 20, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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