Skip to content

Commit 772cf6f

Browse files
committed
fix spec tests
1 parent 01ad47b commit 772cf6f

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

spec/classes/init_spec.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,14 @@
134134
}
135135
end
136136

137-
case os_facts[:os]['family']
138-
when 'FreeBSD'
139-
sshd_binary = '/usr/local/sbin/sshd'
140-
when 'Archlinux'
141-
sshd_binary = '/usr/bin/sshd'
142-
else
143-
sshd_binary = '/usr/sbin/sshd'
144-
end
137+
sshd_binary = case os_facts[:os]['family']
138+
when 'FreeBSD'
139+
'/usr/local/sbin/sshd'
140+
when 'Archlinux'
141+
'/usr/bin/sshd'
142+
else
143+
'/usr/sbin/sshd'
144+
end
145145

146146
it { is_expected.to contain_concat('/etc/ssh/sshd_config').with_validate_cmd("#{sshd_binary} -tf %") }
147147
end

spec/classes/server_spec.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@
7676
}
7777
end
7878

79-
case os_facts[:os]['family']
80-
when 'FreeBSD'
81-
sshd_binary = '/usr/local/sbin/sshd'
82-
when 'Archlinux'
83-
sshd_binary = '/usr/bin/sshd'
84-
else
85-
sshd_binary = '/usr/sbin/sshd'
86-
end
79+
sshd_binary = case os_facts[:os]['family']
80+
when 'FreeBSD'
81+
'/usr/local/sbin/sshd'
82+
when 'Archlinux'
83+
'/usr/bin/sshd'
84+
else
85+
'/usr/sbin/sshd'
86+
end
8787

8888
it { is_expected.to contain_concat('/etc/ssh/sshd_config').with_validate_cmd("#{sshd_binary} -tf %") }
8989
end

0 commit comments

Comments
 (0)