Skip to content

Commit 9144a50

Browse files
committed
(CONT-799) Rubocop Fixes 10-12
- Rspec/EmptyLineAfterExample - Rspec/EmptyLineAfterExampleGroup - Style/TrailingCommaHashLiteral
1 parent 1562a54 commit 9144a50

20 files changed

+350
-193
lines changed

.rubocop_todo.yml

-31
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,6 @@ RSpec/ContextWording:
2121
RSpec/DescribeClass:
2222
Enabled: false
2323

24-
# Offense count: 138
25-
# This cop supports safe autocorrection (--autocorrect).
26-
# Configuration parameters: AllowConsecutiveOneLiners.
27-
RSpec/EmptyLineAfterExample:
28-
Exclude:
29-
- 'spec/acceptance/basic_spec.rb'
30-
- 'spec/acceptance/userlist_spec.rb'
31-
- 'spec/classes/haproxy_spec.rb'
32-
- 'spec/defines/instance_service_spec.rb'
33-
- 'spec/defines/instance_spec.rb'
34-
- 'spec/defines/mapfile_entry_spec.rb'
35-
- 'spec/defines/mapfile_spec.rb'
36-
37-
# Offense count: 50
38-
# This cop supports safe autocorrection (--autocorrect).
39-
RSpec/EmptyLineAfterExampleGroup:
40-
Exclude:
41-
- 'spec/acceptance/basic_spec.rb'
42-
- 'spec/classes/haproxy_spec.rb'
43-
- 'spec/defines/balancermember_spec.rb'
44-
- 'spec/defines/frontend_spec.rb'
45-
- 'spec/defines/instance_spec.rb'
46-
- 'spec/defines/listen_spec.rb'
47-
4824
# Offense count: 3
4925
# Configuration parameters: CountAsOne.
5026
RSpec/ExampleLength:
@@ -125,10 +101,3 @@ RSpec/RepeatedExampleGroupDescription:
125101
Style/MixinUsage:
126102
Exclude:
127103
- 'spec/spec_helper.rb'
128-
129-
# Offense count: 159
130-
# This cop supports safe autocorrection (--autocorrect).
131-
# Configuration parameters: EnforcedStyleForMultiline.
132-
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
133-
Style/TrailingCommaInHashLiteral:
134-
Enabled: false

spec/acceptance/basic_spec.rb

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class { 'haproxy':
3232
describe port('9090') do
3333
it { is_expected.not_to be_listening }
3434
end
35+
3536
describe port('9091') do
3637
it { is_expected.not_to be_listening }
3738
end
@@ -124,6 +125,7 @@ class { 'haproxy': }
124125
expect(r.stderr).to contain %r{Overriding\sthe\svalue\sof\s\$sort_options_alphabetic\sto\s"false"\sdue\sto\s"httpchk"\soption\sdefined}
125126
end
126127
end
128+
127129
describe file('/etc/haproxy/haproxy.cfg') do
128130
its(:content) do
129131
is_expected.to match %r{backend\sservers\n\s+mode\shttp\n\s+option\shttpchk\n\s+http-check\s+disable-on-404}
@@ -146,6 +148,7 @@ class { 'haproxy':
146148
apply_manifest(pp_four, catch_failures: true)
147149
end
148150
end
151+
149152
describe package('haproxy') do
150153
it { is_expected.not_to be_installed }
151154
end
@@ -167,6 +170,7 @@ class { 'haproxy':
167170
apply_manifest(pp_five, catch_failures: true)
168171
end
169172
end
173+
170174
describe service('haproxy') do
171175
it { is_expected.not_to be_running }
172176
it { is_expected.not_to be_enabled }

spec/acceptance/userlist_spec.rb

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ class { 'haproxy': }
5959
it 'test1 should auth as user' do
6060
expect(run_shell('curl http://test1:elgato@localhost:5555').stdout.chomp).to eq('Response on 5556')
6161
end
62+
6263
it 'test2 should auth as user' do
6364
expect(run_shell('curl http://test2:elgato@localhost:5555').stdout.chomp).to eq('Response on 5556')
6465
end

0 commit comments

Comments
 (0)