Skip to content

Commit 0932d5f

Browse files
ListenAddress should exist (#165)
* ListenAddress should exist There can be multiple ListenAddress (for instance ipv6 and ipv4 failover). Signed-off-by: Michée Lengronne <michee.lengronne@coppint.com> * ListenAddress should be set Signed-off-by: Michée Lengronne <michee.lengronne@coppint.com> * test for more nil variants Signed-off-by: Michée Lengronne <michee.lengronne@coppint.com> * fix Signed-off-by: Michée Lengronne <michee.lengronne@coppint.com>
1 parent 0ec061f commit 0932d5f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

controls/sshd_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@
140140
title 'Server: Specify ListenAddress'
141141
desc "Limit the SSH server to listen to a specific address. Don't let it listen on all interfaces to avoid logins from unexpected sources."
142142
describe sshd_config(sshd_custom_path + '/sshd_config') do
143-
its('ListenAddress') { should match(/.*/) }
143+
its('ListenAddress') { should_not eq nil }
144+
its('ListenAddress') { should_not match(/^\s*$/) }
145+
its('ListenAddress') { should_not eq [] }
144146
end
145147
end
146148

0 commit comments

Comments
 (0)