Skip to content

Commit

Permalink
fix(style): Correct style with rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
jsczek committed Aug 4, 2024
1 parent a941e61 commit 5fdc68d
Showing 1 changed file with 14 additions and 20 deletions.
34 changes: 14 additions & 20 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,6 @@
end
end



context 'with data directories specified' do
let :params do
{
Expand All @@ -214,7 +212,6 @@
end
end


context 'with package_name => dse-full' do
let :params do
{
Expand Down Expand Up @@ -262,7 +259,6 @@
end
end


if os_facts[:os]['family'] != 'RedHat'
context 'with CASSANDRA-9822 => true' do
let :params do
Expand All @@ -280,31 +276,29 @@
end
end


context 'on RedHat with rackdc parameters' do
snitch_properties_file = 'cassandra-topology.properties'
dc_rack_properties_file_nondefault = "#{config_path}/#{snitch_properties_file}"
let :params do
{
snitch_properties_file: snitch_properties_file,
dc: 'NYC',
rack: 'R101',
dc_suffix: '_1_cassandra',
prefer_local: 'true'
}
end
snitch_properties_file: snitch_properties_file,
dc: 'NYC',
rack: 'R101',
dc_suffix: '_1_cassandra',
prefer_local: 'true'
}
end

it 'configures rackdc correctly' do
expect(subject).to contain_file(dc_rack_properties_file_nondefault).
that_requires(dc_rack_properties_file_require).
that_comes_before(dc_rack_properties_file_before).
with_content(%r{^dc=NYC$}).
with_content(%r{^rack=R101$}).
with_content(%r{^dc_suffix=_1_cassandra$}).
with_content(%r{^prefer_local=true$})
end
that_requires(dc_rack_properties_file_require).
that_comes_before(dc_rack_properties_file_before).
with_content(%r{^dc=NYC$}).
with_content(%r{^rack=R101$}).
with_content(%r{^dc_suffix=_1_cassandra$}).
with_content(%r{^prefer_local=true$})
end
end

end
end
end

0 comments on commit 5fdc68d

Please sign in to comment.