File tree Expand file tree Collapse file tree 6 files changed +10
-6
lines changed Expand file tree Collapse file tree 6 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 2323 Boolean $enabled = false ,
2424 Foreman_proxy::ListenOn $listen_on = ' https' ,
2525 Optional[String] $template_path = undef ,
26- String $feature = upcase( $title),
26+ String $feature = $title.capitalize( ),
2727) {
2828 if $enabled {
2929 $module_enabled = $listen_on ? {
Original file line number Diff line number Diff line change 1111) {
1212 foreman_proxy::module { 'bmc' :
1313 enabled => $enabled ,
14+ feature => ' BMC' ,
1415 listen_on => $listen_on ,
1516 }
1617}
Original file line number Diff line number Diff line change 1111) {
1212 foreman_proxy::module { 'dhcp' :
1313 enabled => $enabled ,
14+ feature => ' DHCP' ,
1415 listen_on => $listen_on ,
1516 }
1617}
Original file line number Diff line number Diff line change 1111) {
1212 foreman_proxy::module { 'dns' :
1313 enabled => $enabled ,
14+ feature => ' DNS' ,
1415 listen_on => $listen_on ,
1516 }
1617}
Original file line number Diff line number Diff line change 1919
2020 foreman_proxy::module { 'tftp' :
2121 enabled => $enabled ,
22+ feature => ' TFTP' ,
2223 listen_on => $listen_on ,
2324 }
2425}
Original file line number Diff line number Diff line change 1010 context 'with defaults' do
1111 it { is_expected . to compile . with_all_deps }
1212 it { is_expected . to contain_foreman_proxy__settings_file ( 'test' ) . with_module_enabled ( 'false' ) }
13- it { is_expected . not_to contain_foreman_proxy__feature ( 'TEST ' ) }
13+ it { is_expected . not_to contain_foreman_proxy__feature ( 'Test ' ) }
1414 end
1515
1616 context 'with enabled => true' do
1717 let ( :params ) { { enabled : true } }
1818
1919 it { is_expected . to compile . with_all_deps }
2020 it { is_expected . to contain_foreman_proxy__settings_file ( 'test' ) . with_module_enabled ( 'https' ) }
21- it { is_expected . to contain_foreman_proxy__feature ( 'TEST ' ) }
21+ it { is_expected . to contain_foreman_proxy__feature ( 'Test ' ) }
2222
2323 context 'with listen_on => both' do
2424 let ( :params ) { super ( ) . merge ( listen_on : 'both' ) }
3636 end
3737
3838 context 'with feature' do
39- let ( :params ) { { feature : 'Test ' } }
39+ let ( :params ) { { feature : 'TEST ' } }
4040
4141 it { is_expected . to compile . with_all_deps }
42- it { is_expected . not_to contain_foreman_proxy__feature ( 'Test ' ) }
42+ it { is_expected . not_to contain_foreman_proxy__feature ( 'TEST ' ) }
4343
4444 context 'with enabled => true' do
4545 let ( :params ) { super ( ) . merge ( enabled : true ) }
4646
4747 it { is_expected . to compile . with_all_deps }
48- it { is_expected . to contain_foreman_proxy__feature ( 'Test ' ) }
48+ it { is_expected . to contain_foreman_proxy__feature ( 'TEST ' ) }
4949 end
5050 end
5151 end
You can’t perform that action at this time.
0 commit comments