File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 77
77
mode => ' 0644' ,
78
78
require => Exec[' createkeys' ],
79
79
}
80
+
81
+ file { '/etc/eyaml' :
82
+ ensure => directory ,
83
+ owner => ' root' ,
84
+ group => ' root' ,
85
+ mode => ' 0755' ,
86
+ }
87
+
88
+ file { '/etc/eyaml/config.yaml' :
89
+ ensure => file ,
90
+ owner => ' root' ,
91
+ group => ' root' ,
92
+ mode => ' 0644' ,
93
+ # https://github.com/voxpupuli/puppet-lint-strict_indent-check/issues/20
94
+ # lint:ignore:strict_indent
95
+ content => @(" CONF" ),
96
+ ---
97
+ # This file is managed by puppet.
98
+ pkcs7_private_key: ${privkey}
99
+ pkcs7_public_key: ${pubkey}
100
+ | CONF
101
+ # lint:endignore
102
+ }
80
103
}
81
104
}
Original file line number Diff line number Diff line change 84
84
it { is_expected . to contain_exec ( 'createkeys' ) . that_requires ( 'Hiera::Install[eyaml]' ) }
85
85
it { is_expected . to contain_file ( '/dev/null/keys/private_key.pkcs7.pem' ) . with_ensure ( 'file' ) . with_mode ( '0600' ) . that_requires ( 'Exec[createkeys]' ) }
86
86
it { is_expected . to contain_file ( '/dev/null/keys/public_key.pkcs7.pem' ) . with_ensure ( 'file' ) . with_mode ( '0644' ) . that_requires ( 'Exec[createkeys]' ) }
87
+
88
+ it do
89
+ is_expected . to contain_file ( '/etc/eyaml/config.yaml' ) .
90
+ with_ensure ( 'file' ) .
91
+ with_owner ( 'root' ) .
92
+ with_group ( 'root' ) .
93
+ with_mode ( '0644' ) .
94
+ with_content ( %r{pkcs7_private_key: /dev/null/keys/private_key.pkcs7.pem} ) .
95
+ with_content ( %r{pkcs7_public_key: /dev/null/keys/public_key.pkcs7.pem} )
96
+ end
87
97
end
88
98
89
99
describe 'other_backends' do
You can’t perform that action at this time.
0 commit comments