From b2c9cf165ae0ad63d745533704d7c0be74540c60 Mon Sep 17 00:00:00 2001 From: Alexander Weidinger Date: Sat, 13 Jul 2019 18:20:44 +0200 Subject: [PATCH] ci(specs): increased readability --- .../default/controls/config_spec.rb | 22 ++++++++++++------- .../default/controls/services_spec.rb | 11 ++++++---- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/test/integration/default/controls/config_spec.rb b/test/integration/default/controls/config_spec.rb index 2071ebd..472f17b 100644 --- a/test/integration/default/controls/config_spec.rb +++ b/test/integration/default/controls/config_spec.rb @@ -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 } @@ -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 } diff --git a/test/integration/default/controls/services_spec.rb b/test/integration/default/controls/services_spec.rb index 3fe020b..1da50b7 100644 --- a/test/integration/default/controls/services_spec.rb +++ b/test/integration/default/controls/services_spec.rb @@ -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 }