Skip to content

Commit b2c9cf1

Browse files
committed
ci(specs): increased readability
1 parent 1e1719d commit b2c9cf1

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed

test/integration/default/controls/config_spec.rb

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@
55
control 'OpenVPN server configuration' do
66
title 'should match desired lines'
77

8-
cfgfile = case os[:name]
9-
when 'fedora' then '/etc/openvpn/server/myserver1.conf'
10-
else '/etc/openvpn/myserver1.conf'
11-
end
8+
cfgfile =
9+
case os[:name]
10+
when 'fedora' then
11+
'/etc/openvpn/server/myserver1.conf'
12+
else
13+
'/etc/openvpn/myserver1.conf'
14+
end
1215

1316
describe file(cfgfile) do
1417
it { should be_file }
@@ -28,10 +31,13 @@
2831
control 'OpenVPN client configuration' do
2932
title 'should match desired lines'
3033

31-
cfgfile = case os[:name]
32-
when 'fedora' then '/etc/openvpn/client/myclient1.conf'
33-
else '/etc/openvpn/myclient1.conf'
34-
end
34+
cfgfile =
35+
case os[:name]
36+
when 'fedora' then
37+
'/etc/openvpn/client/myclient1.conf'
38+
else
39+
'/etc/openvpn/myclient1.conf'
40+
end
3541

3642
describe file(cfgfile) do
3743
it { should be_file }

test/integration/default/controls/services_spec.rb

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@
1313
else
1414
%w(server client).each do |role|
1515

16-
prefix = case os[:name]
17-
when 'fedora' then "openvpn-#{role}"
18-
else 'openvpn'
19-
end
16+
prefix =
17+
case os[:name]
18+
when 'fedora' then
19+
"openvpn-#{role}"
20+
else
21+
'openvpn'
22+
end
2023

2124
describe service("#{prefix}@my#{role}1.service") do
2225
it { should be_enabled }

0 commit comments

Comments
 (0)