Skip to content

Commit

Permalink
Addition context for native_ssl without proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcnatt committed Dec 3, 2021
1 parent af142bb commit a6df053
Showing 1 changed file with 28 additions and 9 deletions.
37 changes: 28 additions & 9 deletions spec/classes/jira_config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -503,29 +503,27 @@

it do
is_expected.to contain_file(FILENAME_SERVER_XML).
without_content(%r{scheme="http"}).
with_content(%r{proxyName = 'www\.example\.com'}).
with_content(%r{scheme = 'https'}).
with_content(%r{proxyPort = '9999'})
end
end

context 'tomcat proxy path native ssl default params' do
context 'tomcat native ssl default params' do
let(:params) do
super().merge(
proxy: {
'scheme' => 'https',
'proxyName' => 'www.example.com',
'proxyPort' => '9999'
},
tomcat_native_ssl: true
)
end

it do
is_expected.to contain_file(FILENAME_SERVER_XML).
with_content(%r{proxyName = 'www\.example\.com'}).
with_content(%r{scheme = 'https'}).
with_content(%r{proxyPort = '9999'}).
with_content(%r{scheme="http"}).
with_content(%r{scheme="https"}).
without_content(%r{proxyName = 'www\.example\.com'}).
without_content(%r{scheme = 'https'}).
without_content(%r{proxyPort = '9999'}).
with_content(%r{redirectPort="8443"}).
with_content(%r{port="8443"}).
with_content(%r{keyAlias="jira"}).
Expand All @@ -537,6 +535,27 @@
end
end

context 'tomcat native ssl default params with proxy path' do
let(:params) do
super().merge(
proxy: {
'scheme' => 'https',
'proxyName' => 'www.example.com',
'proxyPort' => '9999'
},
tomcat_native_ssl: true
)
end

it do
is_expected.to contain_file(FILENAME_SERVER_XML).
without_content(%r{scheme="http"}).
with_content(%r{proxyName = 'www\.example\.com'}).
with_content(%r{scheme = 'https'}).
with_content(%r{proxyPort = '9999'})
end
end

context 'ajp proxy' do
context 'with valid config including protocol AJP/1.3' do
let(:params) do
Expand Down

0 comments on commit a6df053

Please sign in to comment.