File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6262 Optional[String] $dbdriver = undef ,
6363 Optional[String] $dbtype = undef ,
6464 Optional[String] $dburl = undef ,
65+ Optional[String] $connection_settings = undef ,
6566 $dbschema = undef ,
6667 # MySQL Connector Settings
6768 $mysql_connector_manage = true ,
Original file line number Diff line number Diff line change 2424 end
2525 it { is_expected . to contain_file ( '/opt/jira/atlassian-jira-6.3.4a-standalone/bin/user.sh' ) }
2626 it { is_expected . to contain_file ( '/opt/jira/atlassian-jira-6.3.4a-standalone/conf/server.xml' ) }
27+ # Also ensure that we actually omit elements by default
2728 it do
2829 is_expected . to contain_file ( '/home/jira/dbconfig.xml' ) .
2930 with_content ( %r{jdbc:postgresql://localhost:5432/jira} ) .
30- with_content ( %r{<schema-name>public</schema-name>} )
31+ with_content ( %r{<schema-name>public</schema-name>} ) .
32+ without_content ( %r{<pool} )
33+
3134 end
3235 it { is_expected . not_to contain_file ( '/home/jira/cluster.properties' ) }
3336 it { is_expected . not_to contain_file ( '/opt/jira/atlassian-jira-6.3.4a-standalone/bin/check-java.sh' ) }
3437 end
3538
39+ context 'database settings' do
40+ let ( :params ) do
41+ {
42+ version : '6.3.4a' ,
43+ javahome : '/opt/java' ,
44+ connection_settings : 'TEST-SETTING;' ,
45+ pool_max_size : 20 ,
46+ pool_min_size : 10 ,
47+ validation_query : 'SELECT version();' ,
48+ }
49+ end
50+
51+ it { is_expected . to contain_file ( '/opt/jira/atlassian-jira-6.3.4a-standalone/bin/setenv.sh' ) }
52+ it { is_expected . to contain_file ( '/opt/jira/atlassian-jira-6.3.4a-standalone/bin/user.sh' ) }
53+ it { is_expected . to contain_file ( '/opt/jira/atlassian-jira-6.3.4a-standalone/conf/server.xml' ) }
54+ it do
55+ is_expected . to contain_file ( '/home/jira/dbconfig.xml' ) .
56+ with_content ( %r{<connection-settings>TEST-SETTING;</connection-settings>} ) .
57+ with_content ( %r{<pool-max-size>20</pool-max-size>} ) .
58+ with_content ( %r{<pool-min-size>10</pool-min-size>} ) .
59+ with_content ( %r{<validation-query>SELECT version\( \) ;</validation-query>} )
60+ end
61+ end
62+
3663 context 'mysql params' do
3764 let ( :params ) do
3865 {
Original file line number Diff line number Diff line change 4949< % } - %>
5050<% if $jira:: time_between_eviction_runs != undef { -% >
5151 < time- between- eviction- runs- millis>< %= $jira:: time_between_eviction_runs % >< / time- between- eviction- runs- millis>
52+ < % } - %>
53+ <% if $jira:: connection_settings { -% >
54+ < connection- settings>< %= $jira:: connection_settings % >< / connection- settings>
5255< % } - %>
5356 </jdbc-datasource >
5457</jira-database-config >
You can’t perform that action at this time.
0 commit comments