|
614 | 614 | it { is_expected.to contain_file('/etc/openvpn/test_server/keys/pre-shared.secret').with(ensure: 'absent') } |
615 | 615 | end |
616 | 616 |
|
| 617 | + context 'when pushing scripts' do |
| 618 | + let(:params) do |
| 619 | + { |
| 620 | + 'country' => 'CO', |
| 621 | + 'province' => 'ST', |
| 622 | + 'city' => 'Some City', |
| 623 | + 'organization' => 'example.org', |
| 624 | + |
| 625 | + 'scripts' => { |
| 626 | + 'add-tap-to-bridge.sh' => { |
| 627 | + 'ensure' => 'present' |
| 628 | + } |
| 629 | + } |
| 630 | + } |
| 631 | + end |
| 632 | + |
| 633 | + it { is_expected.to contain_file('/etc/openvpn/test_server/scripts/add-tap-to-bridge.sh').with(ensure: 'present') } |
| 634 | + end |
| 635 | + |
617 | 636 | case facts[:os]['family'] |
618 | 637 | when %r{FreeBSD} |
619 | 638 | context 'when FreeBSD based machine' do |
|
662 | 681 | is_expected.to contain_file('/etc/openvpn/test_server/auth'). |
663 | 682 | with(ensure: 'directory', mode: '0750', recurse: true, group: 'nogroup') |
664 | 683 | } |
| 684 | + it { |
| 685 | + is_expected.to contain_file('/etc/openvpn/test_server/scripts'). |
| 686 | + with(ensure: 'directory', mode: '0750', recurse: true, group: 'nogroup') |
| 687 | + } |
665 | 688 |
|
666 | 689 | # VPN server config file itself |
667 | 690 |
|
|
698 | 721 | is_expected.to contain_file('/etc/openvpn/test_server/auth'). |
699 | 722 | with(ensure: 'directory', mode: '0750', recurse: true, group: 'nogroup') |
700 | 723 | } |
| 724 | + it { |
| 725 | + is_expected.to contain_file('/etc/openvpn/test_server/scripts'). |
| 726 | + with(ensure: 'directory', mode: '0750', recurse: true, group: 'nogroup') |
| 727 | + } |
701 | 728 |
|
702 | 729 | # VPN server config file itself |
703 | 730 |
|
|
902 | 929 | is_expected.to contain_file('/etc/openvpn/test_server/auth'). |
903 | 930 | with(ensure: 'directory', mode: '0750', recurse: true, group: 'nobody') |
904 | 931 | } |
| 932 | + it { |
| 933 | + is_expected.to contain_file('/etc/openvpn/test_server/scripts'). |
| 934 | + with(ensure: 'directory', mode: '0750', recurse: true, group: 'nobody') |
| 935 | + } |
905 | 936 |
|
906 | 937 | # VPN server config file itself |
907 | 938 |
|
|
0 commit comments