File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 22#
33# @api private
44class grafana_alloy::config (
5- Optional[String[1]] $config = undef ,
5+ Optional[Variant[ String[1],Sensitive[String[1]] ]] $config = undef ,
66) {
77 assert_private()
88
Original file line number Diff line number Diff line change 44# The contents of the configuration file, if any
55# @param manage_package_repo Installs the package repositories
66class grafana_alloy (
7- Optional[String[1]] $config = undef ,
7+ Optional[Variant[ String[1], Sensitive[String[1]] ]] $config = undef ,
88 Boolean $manage_package_repo = true ,
99) {
1010 if $grafana_alloy::manage_package_repo {
Original file line number Diff line number Diff line change 2626 it { is_expected . to compile . with_all_deps }
2727 it { is_expected . to contain_file ( '/etc/alloy/config.alloy' ) . with_content ( 'my config without managing repo' ) }
2828 end
29+
30+ context 'with sensitive configuration' do
31+ let ( :params ) { super ( ) . merge ( config : sensitive ( 'my config' ) ) }
32+
33+ it { is_expected . to compile . with_all_deps }
34+ it { is_expected . to contain_file ( '/etc/alloy/config.alloy' ) . with_content ( sensitive ( 'my config' ) ) }
35+ end
2936 end
3037 end
3138end
You can’t perform that action at this time.
0 commit comments