Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
moodle_rebase10.1.2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitry Blinov
moodle_rebase10.1.2
Commits
39abfcb5
Commit
39abfcb5
authored
Jun 25, 2019
by
Łukasz Nowak
Committed by
Łukasz Nowak
Jul 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caddy-frontend/test: Cover custom_domain + server-alias
parent
e67ba43c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
2 deletions
+48
-2
software/caddy-frontend/test/test.py
software/caddy-frontend/test/test.py
+44
-2
software/caddy-frontend/test/test_data/test.TestSlave.test_file_list_log-CADDY.txt
...est/test_data/test.TestSlave.test_file_list_log-CADDY.txt
+2
-0
software/caddy-frontend/test/test_data/test.TestSlaveGlobalDisableHttp2.test_file_list_log-CADDY.txt
....TestSlaveGlobalDisableHttp2.test_file_list_log-CADDY.txt
+2
-0
No files found.
software/caddy-frontend/test/test.py
View file @
39abfcb5
...
...
@@ -1086,6 +1086,11 @@ http://apachecustomhttpsaccepted.example.com:%%(http_port)s {
'
url
': cls.backend_url,
'
custom_domain
': '
*
.
customdomain
.
example
.
com
',
},
'
custom_domain_server_alias
': {
'
url
': cls.backend_url,
'
custom_domain
': '
mycustomdomainserveralias
.
example
.
com
',
'
server
-
alias
': '
mycustomdomainserveralias1
.
example
.
com
',
},
'
custom_domain_ssl_crt_ssl_key
': {
'
url
': cls.backend_url,
'
custom_domain
': '
customdomainsslcrtsslkey
.
example
.
com
',
...
...
@@ -1353,9 +1358,9 @@ http://apachecustomhttpsaccepted.example.com:%%(http_port)s {
expected_parameter_dict
=
{
'monitor-base-url'
:
None
,
'domain'
:
'example.com'
,
'accepted-slave-amount'
:
'5
0
'
,
'accepted-slave-amount'
:
'5
1
'
,
'rejected-slave-amount'
:
'5'
,
'slave-amount'
:
'5
5
'
,
'slave-amount'
:
'5
6
'
,
'rejected-slave-dict'
:
{
"_apache_custom_http_s-rejected"
:
[
"slave not authorized"
],
"_caddy_custom_http_s"
:
[
"slave not authorized"
],
...
...
@@ -1968,6 +1973,43 @@ http://apachecustomhttpsaccepted.example.com:%%(http_port)s {
self.assertEqualResultJson(result, '
Path
', '
/
test
-
path
')
def test_custom_domain_server_alias(self):
reference = '
custom_domain_server_alias
'
hostname = '
mycustomdomainserveralias
'
parameter_dict = self.parseSlaveParameterDict(reference)
self.assertLogAccessUrlWithPop(parameter_dict)
self.assertKedifaKeysWithPop(parameter_dict, '')
self.assertEqual(
{
'
domain
': '
%
s
.
example
.
com
' % (hostname,),
'
replication_number
': '
1
',
'
url
': '
http
:
//%
s
.
example
.
com
' % (hostname, ),
'
site_url
': '
http
:
//%
s
.
example
.
com
' % (hostname, ),
'
secure_access
': '
https
:
//%
s
.
example
.
com
' % (hostname, ),
'
public
-
ipv4
': SLAPOS_TEST_IPV4,
},
parameter_dict
)
result = self.fakeHTTPSResult(
parameter_dict['
domain
'], parameter_dict['
public
-
ipv4
'], '
test
-
path
')
self.assertEqual(
self.certificate_pem,
der2pem(result.peercert))
self.assertEqualResultJson(result, '
Path
', '
/
test
-
path
')
result = self.fakeHTTPSResult(
'
mycustomdomainserveralias1
.
example
.
com
', parameter_dict['
public
-
ipv4
'],
'
test
-
path
/
deep
/
..
/
.
/
deeper
')
self.assertEqual(
self.certificate_pem,
der2pem(result.peercert))
self.assertEqualResultJson(result, '
Path
', '
/
test
-
path
/
deeper
')
def test_custom_domain_wildcard(self):
parameter_dict = self.parseSlaveParameterDict('
custom_domain_wildcard
')
self.assertLogAccessUrlWithPop(parameter_dict)
...
...
software/caddy-frontend/test/test_data/test.TestSlave.test_file_list_log-CADDY.txt
View file @
39abfcb5
...
...
@@ -28,6 +28,8 @@ T-2/var/log/httpd/_caddy_custom_http_s-accepted_access_log
T-2/var/log/httpd/_caddy_custom_http_s-accepted_error_log
T-2/var/log/httpd/_custom_domain_access_log
T-2/var/log/httpd/_custom_domain_error_log
T-2/var/log/httpd/_custom_domain_server_alias_access_log
T-2/var/log/httpd/_custom_domain_server_alias_error_log
T-2/var/log/httpd/_custom_domain_ssl_crt_ssl_key_access_log
T-2/var/log/httpd/_custom_domain_ssl_crt_ssl_key_error_log
T-2/var/log/httpd/_custom_domain_ssl_crt_ssl_key_ssl_ca_crt_access_log
...
...
software/caddy-frontend/test/test_data/test.TestSlaveGlobalDisableHttp2.test_file_list_log-CADDY.txt
View file @
39abfcb5
...
...
@@ -28,6 +28,8 @@ T-2/var/log/httpd/_caddy_custom_http_s-accepted_access_log
T-2/var/log/httpd/_caddy_custom_http_s-accepted_error_log
T-2/var/log/httpd/_custom_domain_access_log
T-2/var/log/httpd/_custom_domain_error_log
T-2/var/log/httpd/_custom_domain_server_alias_access_log
T-2/var/log/httpd/_custom_domain_server_alias_error_log
T-2/var/log/httpd/_custom_domain_ssl_crt_ssl_key_access_log
T-2/var/log/httpd/_custom_domain_ssl_crt_ssl_key_error_log
T-2/var/log/httpd/_custom_domain_ssl_crt_ssl_key_ssl_ca_crt_access_log
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment