Skip to content

Commit

Permalink
ci(specs): increased readability
Browse files Browse the repository at this point in the history
  • Loading branch information
alxwr committed Jul 13, 2019
1 parent 1e1719d commit b2c9cf1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
22 changes: 14 additions & 8 deletions test/integration/default/controls/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
control 'OpenVPN server configuration' do
title 'should match desired lines'

cfgfile = case os[:name]
when 'fedora' then '/etc/openvpn/server/myserver1.conf'
else '/etc/openvpn/myserver1.conf'
end
cfgfile =
case os[:name]
when 'fedora' then
'/etc/openvpn/server/myserver1.conf'
else
'/etc/openvpn/myserver1.conf'
end

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

cfgfile = case os[:name]
when 'fedora' then '/etc/openvpn/client/myclient1.conf'
else '/etc/openvpn/myclient1.conf'
end
cfgfile =
case os[:name]
when 'fedora' then
'/etc/openvpn/client/myclient1.conf'
else
'/etc/openvpn/myclient1.conf'
end

describe file(cfgfile) do
it { should be_file }
Expand Down
11 changes: 7 additions & 4 deletions test/integration/default/controls/services_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@
else
%w(server client).each do |role|

prefix = case os[:name]
when 'fedora' then "openvpn-#{role}"
else 'openvpn'
end
prefix =
case os[:name]
when 'fedora' then
"openvpn-#{role}"
else
'openvpn'
end

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

0 comments on commit b2c9cf1

Please sign in to comment.