File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " jmckenzie-netplan" ,
3- "version" : " 2.0.1 " ,
3+ "version" : " 2.1.0 " ,
44 "author" : " James McKenzie" ,
55 "summary" : " Manage netplan via Puppet" ,
66 "license" : " Apache-2.0" ,
1818 "operatingsystem" : " Debian" ,
1919 "operatingsystemrelease" : [
2020 " 11" ,
21- " 12"
21+ " 12" ,
22+ " 13"
2223 ]
2324 },
2425 {
2526 "operatingsystem" : " Ubuntu" ,
2627 "operatingsystemrelease" : [
2728 " 18.04" ,
2829 " 20.04" ,
29- " 22.04"
30+ " 22.04" ,
31+ " 24.04"
3032 ]
3133 }
3234 ],
Original file line number Diff line number Diff line change 99 let ( :params ) do
1010 { }
1111 end
12-
1312 it { is_expected . to compile . with_all_deps }
1413 it { is_expected . to contain_package ( 'netplan.io' ) . with_ensure ( 'present' ) }
1514 it { is_expected . to contain_file ( '/etc/netplan' ) }
4140 } ,
4241 )
4342 end
44-
45- it {
46- params [ 'configs' ] . each do |name , _hash |
47- is_expected . to contain_file ( "/etc/netplan/90-#{ name } .yaml" ) . that_notifies ( 'Exec[netplan_cmd]' )
48- end
49- }
43+ it { is_expected . to contain_netplan__config ( 'example1' ) . with_ensure ( 'present' ) }
44+ it { is_expected . to contain_netplan__config ( 'example2' ) . with_ensure ( 'present' ) }
45+ it { is_expected . to contain_netplan__config ( 'example3' ) . with_ensure ( 'present' ) }
46+ it { is_expected . to contain_exec ( 'netplan_cmd' ) . with ( refreshonly : true ) }
5047 end
5148 end
5249 end
Original file line number Diff line number Diff line change 88 let ( :params ) do
99 { }
1010 end
11-
1211 on_supported_os . each do |os , os_facts |
1312 context "on #{ os } " do
1413 let ( :facts ) { os_facts }
15-
1614 it { is_expected . to compile }
17-
1815 context 'simple_config' do
1916 let ( :title ) { 'simple_config' }
2017 let ( :params ) do
3431 } ,
3532 )
3633 end
37-
38- it { is_expected . to contain_file ( "/etc/netplan/#{ params [ 'priority' ] } -#{ title } .yaml" ) . with_mode ( '0600' ) }
39- it { is_expected . to contain_file ( "/etc/netplan/#{ params [ 'priority' ] } -#{ title } .yaml" ) . that_notifies ( 'Exec[netplan_cmd]' ) }
34+ it { is_expected . to contain_file ( "/etc/netplan/#{ params [ 'priority' ] } -#{ title } .yaml" ) . with_mode ( '0600' ) . that_notifies ( 'Exec[netplan_cmd]' ) }
4035 end
4136 end
4237 end
You can’t perform that action at this time.
0 commit comments