DCD-1299: unit tests for default Connector config updated

This commit is contained in:
Jun 2021-07-07 13:54:31 +10:00
parent 8f07d119d2
commit 025c2ae2b1
2 changed files with 15 additions and 3 deletions

View File

@ -24,14 +24,20 @@
scheme="{{ atl_tomcat_scheme | default(catalina_connector_scheme) | default('http') }}"
proxyName="{{ atl_proxy_name | default(catalina_connector_proxyname) | default('') }}"
proxyPort="{{ atl_proxy_port | default(catalina_connector_proxyport) | default('') }}"
maxHttpHeaderSize="{{ atl_tomcat_maxhttpheadersize | default('8192') }}"
<!-- For SSL Connection -->
relaxedPathChars="[]|"
relaxedQueryChars="[]|{}^\`&quot;&lt;&gt;"
<!-- Socket Binding on Connector Initialization -->
bindOnInit="false"
maxHttpHeaderSize="{{ atl_tomcat_maxhttpheadersize | default('8192') }}"
useBodyEncodingForURI="true"
disableUploadTimeout="true" />
<Engine name="Standalone"
defaultHost="localhost"
debug="0">

View File

@ -65,12 +65,14 @@ def test_server_xml_defaults(docker_cli, image):
context = xml.find('.//Context')
assert connector.get('port') == '8090'
assert connector.get('maxThreads') == '100'
assert connector.get('maxThreads') == '48'
assert connector.get('minSpareThreads') == '10'
assert connector.get('connectionTimeout') == '20000'
assert connector.get('enableLookups') == 'false'
assert connector.get('protocol') == 'HTTP/1.1'
assert connector.get('protocol') == 'org.apache.coyote.http11.Http11NioProtocol'
assert connector.get('acceptCount') == '10'
assert connector.get('URIEncoding') == 'UTF-8'
assert connector.get('debug') == '0'
assert connector.get('secure') == 'false'
assert connector.get('scheme') == 'http'
assert connector.get('proxyName') == ''
@ -115,6 +117,8 @@ def test_server_xml_params(docker_cli, image):
'ATL_PROXY_PORT': '443',
'ATL_TOMCAT_MAXHTTPHEADERSIZE': '8193',
'ATL_TOMCAT_CONTEXTPATH': '/myconf',
'ATL_TOMCAT_URI_ENCODING': 'ISO-8859-1',
'ATL_TOMCAT_DEBUG':'1',
}
container = run_image(docker_cli, image, environment=environment)
_jvm = wait_for_proc(container, get_bootstrap_proc(container))
@ -137,6 +141,8 @@ def test_server_xml_params(docker_cli, image):
assert connector.get('proxyName') == environment.get('ATL_PROXY_NAME')
assert connector.get('proxyPort') == environment.get('ATL_PROXY_PORT')
assert connector.get('maxHttpHeaderSize') == environment.get('ATL_TOMCAT_MAXHTTPHEADERSIZE')
assert connector.get('URIEncoding') == environment.get('ATL_TOMCAT_URI_ENCODING')
assert connector.get('debug') == environment.get('ATL_TOMCAT_DEBUG')
assert context.get('path') == environment.get('ATL_TOMCAT_CONTEXTPATH')