From 5fdc68d9e9a51eca028433d08a11050e21d467a0 Mon Sep 17 00:00:00 2001 From: Judah Sotomayor Date: Sat, 3 Aug 2024 21:43:48 -0400 Subject: [PATCH] fix(style): Correct style with rubocop --- spec/classes/init_spec.rb | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb index 42aa0d2a..a4b02f44 100644 --- a/spec/classes/init_spec.rb +++ b/spec/classes/init_spec.rb @@ -192,8 +192,6 @@ end end - - context 'with data directories specified' do let :params do { @@ -214,7 +212,6 @@ end end - context 'with package_name => dse-full' do let :params do { @@ -262,7 +259,6 @@ end end - if os_facts[:os]['family'] != 'RedHat' context 'with CASSANDRA-9822 => true' do let :params do @@ -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