Commit 3dc3fdbd authored by Łukasz Nowak's avatar Łukasz Nowak

monitor: Fix check-http-header-dict support

Since json-in-xml is used, check-http-header-dict shall be simply the JSON
object, no need to express it as a string.
parent c8b4b08f
......@@ -30,7 +30,7 @@ md5sum = a57106ee88ff3295b9ffce84105da79b
[template-monitor-edgebot]
_update_hash_filename_ = instance-monitor-edgebot.cfg.jinja2
md5sum = 621cc3d7a71676a89d92f37e6c2c45ab
md5sum = 849608f74dc8c95aea04cadde0bea0e6
[network-bench-cfg]
filename = network_bench.cfg.in
......
......@@ -15,9 +15,9 @@
"type": "number"
},
"check-http-header-dict": {
"default": "{}",
"default": {},
"title": "HTTP header dict to check",
"description": "JSON dict of expected HTTP header, like {\"Cache-Control\": \"max-age=3600, public\", \"Vary\": \"Accept-Encoding\"}",
"description": "JSON object of expected HTTP header, like {\"Cache-Control\": \"max-age=3600, public\", \"Vary\": \"Accept-Encoding\"}. Note: Shall be expressed directly as object, without any additional qouting.",
"type": "object"
},
"check-frontend-ip": {
......
......@@ -16,7 +16,7 @@
"check-http-header-dict": {
"default": "Master default",
"title": "HTTP header dict to check",
"description": "JSON dict of expected HTTP header, like {\"Cache-Control\": \"max-age=3600, public\", \"Vary\": \"Accept-Encoding\"}",
"description": "JSON object of expected HTTP header, like {\"Cache-Control\": \"max-age=3600, public\", \"Vary\": \"Accept-Encoding\"}. Note: Shall be expressed directly as object, without any additional qouting.",
"type": "object"
},
"check-frontend-ip": {
......
......@@ -54,7 +54,7 @@ name = {{ safe_name }}.py
config-report = http_query
config-url = {{ slave['url'] }}
config-status-code = {{ slave['check-status-code'] }}
config-http-header-dict = {{ slave['check-http-header-dict'] }}
config-http-header-dict = {{ json_module.dumps(slave['check-http-header-dict']) }}
config-certificate-expiration-days = {{ slave['check-certificate-expiration-days'] }}
config-failure-amount = {{ slave['failure-amount'] }}
config-maximum-elapsed-time = {{ slave['check-maximum-elapsed-time'] }}
......
......@@ -484,8 +484,7 @@ URL =
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps({
'check-http-header-dict':
'{"B": "BBB"}',
'check-http-header-dict': {"B": "BBB"},
})}
def assertSurykatkaPromises(self):
......@@ -550,7 +549,7 @@ URL =
)
self.requestEdgetestSlave(
'backend-http-header',
{'url': 'https://www.erp5.org/', 'check-http-header-dict': '{"A": "AAA"}'},
{'url': 'https://www.erp5.org/', 'check-http-header-dict': {"A": "AAA"}},
)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment