Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Joanne Hugé
slapos
Commits
bb5ac3d2
Commit
bb5ac3d2
authored
May 29, 2020
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caddy-frontend: Drop unused re6st-optimal-test
parent
8934b28e
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
8 additions
and
172 deletions
+8
-172
software/caddy-frontend/buildout.hash.cfg
software/caddy-frontend/buildout.hash.cfg
+1
-1
software/caddy-frontend/instance-slave-caddy-input-schema.json
...are/caddy-frontend/instance-slave-caddy-input-schema.json
+0
-6
software/caddy-frontend/templates/apache-custom-slave-list.cfg.in
.../caddy-frontend/templates/apache-custom-slave-list.cfg.in
+0
-20
software/caddy-frontend/test/test.py
software/caddy-frontend/test/test.py
+4
-129
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
+0
-2
software/caddy-frontend/test/test_data/test.TestSlave.test_file_list_plugin-CADDY.txt
.../test_data/test.TestSlave.test_file_list_plugin-CADDY.txt
+1
-2
software/caddy-frontend/test/test_data/test.TestSlave.test_monitor_promise_list-CADDY.txt
...t_data/test.TestSlave.test_monitor_promise_list-CADDY.txt
+0
-1
software/caddy-frontend/test/test_data/test.TestSlaveBadParameters.test_file_list_log-CADDY.txt
.../test.TestSlaveBadParameters.test_file_list_log-CADDY.txt
+1
-5
software/caddy-frontend/test/test_data/test.TestSlaveBadParameters.test_monitor_promise_list-CADDY.txt
...estSlaveBadParameters.test_monitor_promise_list-CADDY.txt
+0
-1
software/caddy-frontend/test/test_data/test.TestSlaveGlobalDisableHttp2.test_file_list_log-CADDY.txt
....TestSlaveGlobalDisableHttp2.test_file_list_log-CADDY.txt
+0
-2
software/caddy-frontend/test/test_data/test.TestSlaveGlobalDisableHttp2.test_file_list_plugin-CADDY.txt
...stSlaveGlobalDisableHttp2.test_file_list_plugin-CADDY.txt
+1
-2
software/caddy-frontend/test/test_data/test.TestSlaveGlobalDisableHttp2.test_monitor_promise_list-CADDY.txt
...aveGlobalDisableHttp2.test_monitor_promise_list-CADDY.txt
+0
-1
No files found.
software/caddy-frontend/buildout.hash.cfg
View file @
bb5ac3d2
...
...
@@ -30,7 +30,7 @@ md5sum = a544bf7586f5945bbf108abe9818c7dd
[template-slave-list]
filename = templates/apache-custom-slave-list.cfg.in
md5sum =
7f63eaa17c6bfa86b3810456414a39e5
md5sum =
83992a72b440e422e6d6dae54990f3b1
[template-replicate-publish-slave-information]
filename = templates/replicate-publish-slave-information.cfg.in
...
...
software/caddy-frontend/instance-slave-caddy-input-schema.json
View file @
bb5ac3d2
...
...
@@ -139,12 +139,6 @@
"title"
:
"Prefer gzip Encoding for Backend"
,
"type"
:
"string"
},
"re6st-optimal-test"
:
{
"default"
:
""
,
"description"
:
"IPv6 and IPv6 Address for the frontend test if re6st is on the optimal status (use ipv6,ipv4)"
,
"title"
:
"IPv6 and IPv4 Address to test Re6st"
,
"type"
:
"string"
},
"server-alias"
:
{
"default"
:
""
,
"description"
:
"Server Alias List separated by space"
,
...
...
software/caddy-frontend/templates/apache-custom-slave-list.cfg.in
View file @
bb5ac3d2
...
...
@@ -281,26 +281,6 @@ config-ipv4 = true
config-frequency = 720
{% endif %}
{% set re6st_optimal_test = '' ~ slave_instance.get('re6st-optimal-test', '') %}
{% set re6st_ipv6 = None %}
{% set re6st_ipv4 = None %}
{% if ',' in re6st_optimal_test %}
{% set re6st_ipv6, re6st_ipv4 = re6st_optimal_test.split(",") %}
{% endif %}
{% if re6st_ipv6 and re6st_ipv4 %}
{% set re6st_optimal_test_section_title = 'check-%s-re6st-optimal-test' % slave_instance.get('slave_reference') %}
{% do part_list.append(re6st_optimal_test_section_title) %}
[{{ re6st_optimal_test_section_title }}]
<= monitor-promise-base
module = check_re6st_optimal_status
name = {{ re6st_optimal_test_section_title }}.py
config-ipv4 = {{ dumps(re6st_ipv4) }}
config-ipv6 = {{ dumps(re6st_ipv6) }}
# promise frequency in minutes (2 times/day)
config-frequency = 720
{% endif %}
{# ############################### #}
{# Publish Slave Information #}
...
...
software/caddy-frontend/test/test.py
View file @
bb5ac3d2
...
...
@@ -1301,9 +1301,6 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
'monitor-ipv6-test'
:
{
'monitor-ipv6-test'
:
'monitor-ipv6-test'
,
},
're6st-optimal-test'
:
{
're6st-optimal-test'
:
'ipv6,ipv4'
,
},
'ciphers'
:
{
'ciphers'
:
'RSA-3DES-EDE-CBC-SHA RSA-AES128-CBC-SHA'
,
}
...
...
@@ -1480,9 +1477,9 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
expected_parameter_dict
=
{
'monitor-base-url'
:
'https://[%s]:8401'
%
self
.
_ipv6_address
,
'domain'
:
'example.com'
,
'accepted-slave-amount'
:
'5
2
'
,
'accepted-slave-amount'
:
'5
1
'
,
'rejected-slave-amount'
:
'0'
,
'slave-amount'
:
'5
2
'
,
'slave-amount'
:
'5
1
'
,
'rejected-slave-dict'
:
{
}
}
...
...
@@ -3201,44 +3198,6 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
}
)
def test_re6st_optimal_test(self):
parameter_dict = self.assertSlaveBase('re6st-optimal-test')
result = fakeHTTPSResult(
parameter_dict['domain'], parameter_dict['public-ipv4'], 'test-path')
self.assertEqual(
self.certificate_pem,
der2pem(result.peercert))
self.assertEqual(httplib.NOT_FOUND, result.status_code)
result_http = fakeHTTPResult(
parameter_dict['domain'], parameter_dict['public-ipv4'], 'test-path')
self.assertEqual(
httplib.FOUND,
result_http.status_code
)
self.assertEqual(
'https://re6stoptimaltest.example.com/test-path',
result_http.headers['Location']
)
monitor_file = glob.glob(
os.path.join(
self.instance_path, '*', 'etc', 'plugin',
'check-_re6st-optimal-test-re6st-optimal-test.py'))[0]
# get promise module and check that parameters are ok
self.assertEqual(
getPluginParameterDict(self.software_path, monitor_file),
{
'frequency': '720',
'ipv4': 'ipv4',
'ipv6': 'ipv6'
}
)
def test_ciphers(self):
parameter_dict = self.assertSlaveBase('ciphers')
...
...
@@ -4665,13 +4624,6 @@ class TestSlaveBadParameters(SlaveHttpFrontendTestCase, TestDataMixin):
@classmethod
def getSlaveParameterDictDict(cls):
return {
're6st-optimal-test-nocomma': {
're6st-optimal-test': 'nocomma',
},
're6st-optimal-test-unsafe': {
're6st-optimal-test':
'new
\
n
line;rm -fr ~;,new line
\
n
[s${esection:eoption}',
},
'custom_domain-unsafe': {
'custom_domain': '${section:option} afterspace
\
n
afternewline',
},
...
...
@@ -4717,9 +4669,9 @@ class TestSlaveBadParameters(SlaveHttpFrontendTestCase, TestDataMixin):
expected_parameter_dict = {
'monitor-base-url': 'https://[%s]:8401' % self._ipv6_address,
'domain': 'example.com',
'accepted-slave-amount': '
8
',
'accepted-slave-amount': '
6
',
'rejected-slave-amount': '3',
'slave-amount': '
11
',
'slave-amount': '
9
',
'rejected-slave-dict': {
'_bad-ciphers': [
"Cipher 'bad' is not supported.",
...
...
@@ -4765,83 +4717,6 @@ class TestSlaveBadParameters(SlaveHttpFrontendTestCase, TestDataMixin):
self.assertEqualResultJson(result, 'Path', '/test-path')
def test_re6st_optimal_test_unsafe(self):
parameter_dict = self.parseSlaveParameterDict('re6st-optimal-test-unsafe')
self.assertLogAccessUrlWithPop(parameter_dict)
self.assertKedifaKeysWithPop(parameter_dict)
self.assertEqual(
{
'domain': 're6stoptimaltestunsafe.example.com',
'replication_number': '1',
'url': 'http://re6stoptimaltestunsafe.example.com',
'site_url': 'http://re6stoptimaltestunsafe.example.com',
'secure_access': 'https://re6stoptimaltestunsafe.example.com',
'public-ipv4': self._ipv4_address,
},
parameter_dict
)
result = fakeHTTPSResult(
parameter_dict['domain'], parameter_dict['public-ipv4'], 'test-path')
self.assertEqual(
self.certificate_pem,
der2pem(result.peercert))
self.assertEqual(httplib.NOT_FOUND, result.status_code)
monitor_file = glob.glob(
os.path.join(
self.instance_path, '*', 'etc', 'plugin',
'check-_re6st-optimal-test-unsafe-re6st-optimal-test.py'))[0]
# Note: The result is a bit differnt from the request (newlines stripped),
# but good enough to prove, that ${esection:eoption} has been
# correctly passed to the script.
self.assertEqual(
getPluginParameterDict(self.software_path, monitor_file),
{
'frequency': '720',
'ipv4': 'new line
\
n
[s${esection:eoption}',
'ipv6': 'new
\
n
line;rm -fr ~;',
}
)
def test_re6st_optimal_test_nocomma(self):
parameter_dict = self.parseSlaveParameterDict('re6st-optimal-test-nocomma')
self.assertLogAccessUrlWithPop(parameter_dict)
self.assertKedifaKeysWithPop(parameter_dict)
self.assertEqual(
{
'domain': 're6stoptimaltestnocomma.example.com',
'replication_number': '1',
'url': 'http://re6stoptimaltestnocomma.example.com',
'site_url': 'http://re6stoptimaltestnocomma.example.com',
'secure_access': 'https://re6stoptimaltestnocomma.example.com',
'public-ipv4': self._ipv4_address,
},
parameter_dict
)
result = fakeHTTPSResult(
parameter_dict['domain'], parameter_dict['public-ipv4'], 'test-path')
self.assertEqual(
self.certificate_pem,
der2pem(result.peercert))
self.assertEqual(httplib.NOT_FOUND, result.status_code)
# assert that there is no nocomma file
monitor_file_list = glob.glob(
os.path.join(
self.instance_path, '*', 'etc', 'plugin',
'check-_re6st-optimal-test-nocomma-re6st-optimal-test.py'))
self.assertEqual(
[],
monitor_file_list
)
def test_custom_domain_unsafe(self):
parameter_dict = self.parseSlaveParameterDict('custom_domain-unsafe')
self.assertEqual(
...
...
software/caddy-frontend/test/test_data/test.TestSlave.test_file_list_log-CADDY.txt
View file @
bb5ac3d2
...
...
@@ -72,8 +72,6 @@ T-2/var/log/httpd/_prefer-gzip-encoding-to-backend-https-only_access_log
T-2/var/log/httpd/_prefer-gzip-encoding-to-backend-https-only_error_log
T-2/var/log/httpd/_prefer-gzip-encoding-to-backend_access_log
T-2/var/log/httpd/_prefer-gzip-encoding-to-backend_error_log
T-2/var/log/httpd/_re6st-optimal-test_access_log
T-2/var/log/httpd/_re6st-optimal-test_error_log
T-2/var/log/httpd/_server-alias-duplicated_access_log
T-2/var/log/httpd/_server-alias-duplicated_error_log
T-2/var/log/httpd/_server-alias-wildcard_access_log
...
...
software/caddy-frontend/test/test_data/test.TestSlave.test_file_list_plugin-CADDY.txt
View file @
bb5ac3d2
...
...
@@ -27,7 +27,6 @@ T-2/etc/plugin/caddy_ssl_cached.py
T-2/etc/plugin/caucase-updater.py
T-2/etc/plugin/check-_monitor-ipv4-test-ipv4-packet-list-test.py
T-2/etc/plugin/check-_monitor-ipv6-test-ipv6-packet-list-test.py
T-2/etc/plugin/check-_re6st-optimal-test-re6st-optimal-test.py
T-2/etc/plugin/check-free-disk-space.py
T-2/etc/plugin/expose-csr_id-ip-port-listening.py
T-2/etc/plugin/frontend-caddy-configuration-promise.py
...
...
@@ -36,4 +35,4 @@ T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/trafficserver-cache-availability.py
T-2/etc/plugin/trafficserver-port-listening.py
\ No newline at end of file
T-2/etc/plugin/trafficserver-port-listening.py
software/caddy-frontend/test/test_data/test.TestSlave.test_monitor_promise_list-CADDY.txt
View file @
bb5ac3d2
T-2/etc/monitor-promise/check-_monitor-ipv4-test-ipv4-packet-list-test
T-2/etc/monitor-promise/check-_monitor-ipv6-test-ipv6-packet-list-test
T-2/etc/monitor-promise/check-_re6st-optimal-test-re6st-optimal-test
software/caddy-frontend/test/test_data/test.TestSlaveBadParameters.test_file_list_log-CADDY.txt
View file @
bb5ac3d2
...
...
@@ -12,10 +12,6 @@ T-2/var/log/httpd/_monitor-ipv4-test-unsafe_access_log
T-2/var/log/httpd/_monitor-ipv4-test-unsafe_error_log
T-2/var/log/httpd/_monitor-ipv6-test-unsafe_access_log
T-2/var/log/httpd/_monitor-ipv6-test-unsafe_error_log
T-2/var/log/httpd/_re6st-optimal-test-nocomma_access_log
T-2/var/log/httpd/_re6st-optimal-test-nocomma_error_log
T-2/var/log/httpd/_re6st-optimal-test-unsafe_access_log
T-2/var/log/httpd/_re6st-optimal-test-unsafe_error_log
T-2/var/log/httpd/_server-alias-same_access_log
T-2/var/log/httpd/_server-alias-same_error_log
T-2/var/log/httpd/_virtualhostroot-http-port-unsafe_access_log
...
...
@@ -25,4 +21,4 @@ T-2/var/log/httpd/_virtualhostroot-https-port-unsafe_error_log
T-2/var/log/monitor-httpd-access.log
T-2/var/log/monitor-httpd-error.log
T-2/var/log/trafficserver/manager.log
T-2/var/log/trafficserver/traffic.out
\ No newline at end of file
T-2/var/log/trafficserver/traffic.out
software/caddy-frontend/test/test_data/test.TestSlaveBadParameters.test_monitor_promise_list-CADDY.txt
View file @
bb5ac3d2
T-2/etc/monitor-promise/check-_monitor-ipv4-test-unsafe-ipv4-packet-list-test
T-2/etc/monitor-promise/check-_monitor-ipv6-test-unsafe-ipv6-packet-list-test
T-2/etc/monitor-promise/check-_re6st-optimal-test-unsafe-re6st-optimal-test
software/caddy-frontend/test/test_data/test.TestSlaveGlobalDisableHttp2.test_file_list_log-CADDY.txt
View file @
bb5ac3d2
...
...
@@ -72,8 +72,6 @@ T-2/var/log/httpd/_prefer-gzip-encoding-to-backend-https-only_access_log
T-2/var/log/httpd/_prefer-gzip-encoding-to-backend-https-only_error_log
T-2/var/log/httpd/_prefer-gzip-encoding-to-backend_access_log
T-2/var/log/httpd/_prefer-gzip-encoding-to-backend_error_log
T-2/var/log/httpd/_re6st-optimal-test_access_log
T-2/var/log/httpd/_re6st-optimal-test_error_log
T-2/var/log/httpd/_server-alias-duplicated_access_log
T-2/var/log/httpd/_server-alias-duplicated_error_log
T-2/var/log/httpd/_server-alias-wildcard_access_log
...
...
software/caddy-frontend/test/test_data/test.TestSlaveGlobalDisableHttp2.test_file_list_plugin-CADDY.txt
View file @
bb5ac3d2
...
...
@@ -27,7 +27,6 @@ T-2/etc/plugin/caddy_ssl_cached.py
T-2/etc/plugin/caucase-updater.py
T-2/etc/plugin/check-_monitor-ipv4-test-ipv4-packet-list-test.py
T-2/etc/plugin/check-_monitor-ipv6-test-ipv6-packet-list-test.py
T-2/etc/plugin/check-_re6st-optimal-test-re6st-optimal-test.py
T-2/etc/plugin/check-free-disk-space.py
T-2/etc/plugin/expose-csr_id-ip-port-listening.py
T-2/etc/plugin/frontend-caddy-configuration-promise.py
...
...
@@ -36,4 +35,4 @@ T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/trafficserver-cache-availability.py
T-2/etc/plugin/trafficserver-port-listening.py
\ No newline at end of file
T-2/etc/plugin/trafficserver-port-listening.py
software/caddy-frontend/test/test_data/test.TestSlaveGlobalDisableHttp2.test_monitor_promise_list-CADDY.txt
View file @
bb5ac3d2
T-1/etc/monitor-promise/check-_monitor-ipv4-test-ipv4-packet-list-test
T-1/etc/monitor-promise/check-_monitor-ipv6-test-ipv6-packet-list-test
T-1/etc/monitor-promise/check-_re6st-optimal-test-re6st-optimal-test
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