We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 484cd27 commit 9ebc9deCopy full SHA for 9ebc9de
spec/recipes/server_spec.rb
@@ -266,6 +266,24 @@
266
end
267
268
269
+ it 'sets the login grace time to 30s' do
270
+ expect(chef_run).to render_file('/etc/ssh/sshd_config').
271
+ with_content(/LoginGraceTime 30s/)
272
+ end
273
+
274
+ context 'with configured login grace time to 60s' do
275
+ cached(:chef_run) do
276
+ ChefSpec::ServerRunner.new do |node|
277
+ node.normal['ssh-hardening']['ssh']['server']['login_grace_time'] = '60s'
278
+ end.converge(described_recipe)
279
280
281
+ it 'sets the login grace time to 60s' do
282
283
+ with_content(/LoginGraceTime 60s/)
284
285
286
287
it 'leaves deny users commented' do
288
expect(chef_run).to render_file('/etc/ssh/sshd_config').
289
with_content(/#DenyUsers */)
0 commit comments