Skip to content

Commit

Permalink
test(kitchen): debian and ubuntu use different paths now
Browse files Browse the repository at this point in the history
  • Loading branch information
alxwr committed Aug 27, 2019
1 parent 07bb5b6 commit dfd784e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 10 additions & 2 deletions test/integration/default/controls/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@

cfgfile =
case os[:name]
when 'debian' then
'/etc/openvpn/server/myserver1.conf'
when 'fedora' then
'/etc/openvpn/server/myserver1.conf'
when 'ubuntu' then
'/etc/openvpn/server/myserver1.conf'
else
'/etc/openvpn/myserver1.conf'
end
Expand All @@ -23,7 +27,7 @@
its('content') { should include 'user' }
end

describe command('ls -l /etc/openvpn/myserver1.conf') do
describe command("ls -l #{cfgfile}") do
its('stdout') { should include " #{user} #{group} " }
end
end
Expand All @@ -33,8 +37,12 @@

cfgfile =
case os[:name]
when 'debian' then
'/etc/openvpn/client/myclient1.conf'
when 'fedora' then
'/etc/openvpn/client/myclient1.conf'
when 'ubuntu' then
'/etc/openvpn/client/myclient1.conf'
else
'/etc/openvpn/myclient1.conf'
end
Expand All @@ -49,7 +57,7 @@
its('content') { should include 'user' }
end

describe command('ls -l /etc/openvpn/myclient1.conf') do
describe command("ls -l #{cfgfile}") do
its('stdout') { should include " #{user} #{group} " }
end
end
4 changes: 4 additions & 0 deletions test/integration/default/controls/services_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@

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

0 comments on commit dfd784e

Please sign in to comment.