Refactor to condense lines in spec test for readability
This commit is contained in:
parent
3ddacee430
commit
ebe04a0fe6
@ -31,9 +31,7 @@ describe 'ssh' do
|
||||
})
|
||||
}
|
||||
|
||||
it {
|
||||
should contain_file('ssh_config').with_content(/^# This file is being maintained by Puppet.\n# DO NOT EDIT\n\n# \$OpenBSD: ssh_config,v 1.21 2005\/12\/06 22:38:27 reyk Exp \$/)
|
||||
}
|
||||
it { should contain_file('ssh_config').with_content(/^# This file is being maintained by Puppet.\n# DO NOT EDIT\n\n# \$OpenBSD: ssh_config,v 1.21 2005\/12\/06 22:38:27 reyk Exp \$/) }
|
||||
|
||||
it { should_not contain_file('ssh_config').with_content(/^\s*ForwardAgent$/) }
|
||||
it { should_not contain_file('ssh_config').with_content(/^\s*ForwardX11$/) }
|
||||
@ -50,41 +48,14 @@ describe 'ssh' do
|
||||
})
|
||||
}
|
||||
|
||||
it {
|
||||
should contain_file('sshd_config').with_content(/^SyslogFacility AUTH$/)
|
||||
}
|
||||
|
||||
it {
|
||||
should contain_file('sshd_config').with_content(/^LoginGraceTime 120$/)
|
||||
}
|
||||
|
||||
it {
|
||||
should contain_file('sshd_config').with_content(/^PermitRootLogin no$/)
|
||||
}
|
||||
|
||||
it {
|
||||
should contain_file('sshd_config').with_content(/^ChallengeResponseAuthentication no$/)
|
||||
}
|
||||
|
||||
it {
|
||||
should contain_file('sshd_config').with_content(/^PrintMotd yes$/)
|
||||
}
|
||||
|
||||
it {
|
||||
should contain_file('sshd_config').with_content(/^UseDNS yes$/)
|
||||
}
|
||||
|
||||
it {
|
||||
should contain_file('sshd_config').with_content(/^Banner none$/)
|
||||
}
|
||||
|
||||
it {
|
||||
should contain_file('sshd_config').with_content(/^XAuthLocation \/usr\/bin\/xauth$/)
|
||||
}
|
||||
|
||||
it {
|
||||
should contain_file('sshd_config').with_content(/^Subsystem sftp \/usr\/libexec\/openssh\/sftp-server$/)
|
||||
}
|
||||
it { should contain_file('sshd_config').with_content(/^SyslogFacility AUTH$/) }
|
||||
it { should contain_file('sshd_config').with_content(/^LoginGraceTime 120$/) }
|
||||
it { should contain_file('sshd_config').with_content(/^PermitRootLogin no$/) }
|
||||
it { should contain_file('sshd_config').with_content(/^ChallengeResponseAuthentication no$/) }
|
||||
it { should contain_file('sshd_config').with_content(/^PrintMotd yes$/) }
|
||||
it { should contain_file('sshd_config').with_content(/^UseDNS yes$/) }
|
||||
it { should contain_file('sshd_config').with_content(/^XAuthLocation \/usr\/bin\/xauth$/) }
|
||||
it { should contain_file('sshd_config').with_content(/^Subsystem sftp \/usr\/libexec\/openssh\/sftp-server$/) }
|
||||
|
||||
it {
|
||||
should contain_service('sshd_service').with({
|
||||
@ -237,6 +208,7 @@ describe 'ssh' do
|
||||
'user' => 'root',
|
||||
}
|
||||
} } }
|
||||
|
||||
it {
|
||||
should contain_ssh_authorized_key('root_for_userX').with({
|
||||
'ensure' => 'present',
|
||||
|
Loading…
x
Reference in New Issue
Block a user