|
664 | 664 | end
|
665 | 665 | end
|
666 | 666 |
|
667 |
| -describe 'customized AuthorizedKeysFile option' do |
668 |
| - context 'without customized AuthorizedKeysFile' do |
669 |
| - cached(:chef_run) do |
670 |
| - ChefSpec::ServerRunner.new.converge(described_recipe) |
671 |
| - end |
| 667 | + describe 'customized AuthorizedKeysFile option' do |
| 668 | + context 'without customized AuthorizedKeysFile' do |
| 669 | + cached(:chef_run) do |
| 670 | + ChefSpec::ServerRunner.new.converge(described_recipe) |
| 671 | + end |
672 | 672 |
|
673 |
| - it 'does not have AuthorizedKeysFile configured' do |
674 |
| - expect(chef_run).not_to render_file('/etc/ssh/sshd_config'). |
675 |
| - with_content('AuthorizedKeysFile') |
676 |
| - end |
677 |
| - end |
| 673 | + it 'does not have AuthorizedKeysFile configured' do |
| 674 | + expect(chef_run).not_to render_file('/etc/ssh/sshd_config'). |
| 675 | + with_content('AuthorizedKeysFile') |
| 676 | + end |
| 677 | + end |
678 | 678 |
|
679 |
| - context 'with customized AuthorizedKeysFile' do |
680 |
| - cached(:chef_run) do |
681 |
| - ChefSpec::ServerRunner.new do |node| |
682 |
| - node.normal['ssh-hardening']['ssh']['server']['authorized_keys_path'] = '/some/authorizedkeysfile' |
683 |
| - end.converge(described_recipe) |
684 |
| - end |
| 679 | + context 'with customized AuthorizedKeysFile' do |
| 680 | + cached(:chef_run) do |
| 681 | + ChefSpec::ServerRunner.new do |node| |
| 682 | + node.normal['ssh-hardening']['ssh']['server']['authorized_keys_path'] = '/some/authorizedkeysfile' |
| 683 | + end.converge(described_recipe) |
| 684 | + end |
685 | 685 |
|
686 |
| - it 'has AuthorizedKeysFile configured' do |
687 |
| - expect(chef_run).to render_file('/etc/ssh/sshd_config'). |
688 |
| - with_content('AuthorizedKeysFile /some/authorizedkeysfile') |
| 686 | + it 'has AuthorizedKeysFile configured' do |
| 687 | + expect(chef_run).to render_file('/etc/ssh/sshd_config'). |
| 688 | + with_content('AuthorizedKeysFile /some/authorizedkeysfile') |
| 689 | + end |
689 | 690 | end
|
690 | 691 | end
|
691 | 692 | end
|
692 |
| - |
693 |
| -end |
0 commit comments