Skip to content

Commit

Permalink
Fix tests for newer RHEL versions
Browse files Browse the repository at this point in the history
  • Loading branch information
yakatz committed Jun 2, 2024
1 parent 8cfc487 commit ad7a3df
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
10 changes: 5 additions & 5 deletions spec/acceptance/openvpn_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

case fact('osfamily')
when 'RedHat'
if fact('os.release.major') == '8'
server_directory = '/etc/openvpn/server'
client_directory = '/etc/openvpn/client'
client_service = 'openvpn-client'
else
if fact('os.release.major') == '7'
server_directory = '/etc/openvpn'
client_directory = '/etc/openvpn'
client_service = 'openvpn'
else
server_directory = '/etc/openvpn/server'
client_directory = '/etc/openvpn/client'
client_service = 'openvpn-client'
end
server_crt = "#{server_directory}/test_openvpn_server/easy-rsa/keys/issued/server.crt"
key_path = "#{server_directory}/test_openvpn_server/easy-rsa/keys/private"
Expand Down
6 changes: 3 additions & 3 deletions spec/defines/openvpn_ca_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

case facts[:os]['family']
when 'RedHat'
server_directory = if facts[:os]['release']['major'] == '8'
'/etc/openvpn/server'
else
server_directory = if facts[:os]['release']['major'] == '7'
'/etc/openvpn'
else
'/etc/openvpn/server'
end

context 'creating a server with the minimum parameters' do
Expand Down
6 changes: 3 additions & 3 deletions spec/defines/openvpn_client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

server_directory = case facts[:os]['family']
when 'CentOS', 'RedHat'
if facts[:os]['release']['major'] == '8'
'/etc/openvpn/server'
else
if facts[:os]['release']['major'] == '7'
'/etc/openvpn'
else
'/etc/openvpn/server'
end
else
'/etc/openvpn'
Expand Down
6 changes: 3 additions & 3 deletions spec/defines/openvpn_client_specific_config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@

server_directory = case facts[:os]['family']
when 'CentOS', 'RedHat'
if facts[:os]['release']['major'] == '8'
'/etc/openvpn/server'
else
if facts[:os]['release']['major'] == '7'
'/etc/openvpn'
else
'/etc/openvpn/server'
end
else
'/etc/openvpn'
Expand Down
6 changes: 3 additions & 3 deletions spec/defines/openvpn_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

server_directory = case facts[:os]['family']
when 'CentOS', 'RedHat'
if facts[:os]['release']['major'] == '8'
'/etc/openvpn/server'
else
if facts[:os]['release']['major'] == '7'
'/etc/openvpn'
else
'/etc/openvpn/server'
end
when %r{FreeBSD}
'/usr/local/etc/openvpn'
Expand Down

0 comments on commit ad7a3df

Please sign in to comment.