From 5e9366f5ee5b154716e4bff07491d31449ca0888 Mon Sep 17 00:00:00 2001 From: Frank Wall Date: Wed, 3 Apr 2024 11:46:27 +0200 Subject: [PATCH] add unit test for $solr_opts --- spec/classes/solr_spec.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/spec/classes/solr_spec.rb b/spec/classes/solr_spec.rb index fff6f98..a2867a2 100644 --- a/spec/classes/solr_spec.rb +++ b/spec/classes/solr_spec.rb @@ -215,6 +215,17 @@ it { is_expected.not_to contain_file('/var/solr/solr.in.sh').with_content(%r{-Dsolr.allowPaths=}) } it { is_expected.not_to contain_file('/var/solr/solr.in.sh').with_content(%r{/tmp/CustomAllowPath}) } end + + context 'solr class when solr_opts is not empty' do + let(:params) do + { + solr_opts: ['-Duser.language=de'], + version: '9.4.1', + } + end + + it { is_expected.to contain_file('/var/solr/solr.in.sh').with_content(%r{-Duser.language=de}) } + end end end end