Beispiel #1
0
def test_tls_config_legacy(extra_config, expected_http_kwargs, instance_all_metrics):
    instance = instance_all_metrics
    instance.update(extra_config)
    c = ProxysqlCheck('proxysql', {}, [instance])
    c.get_tls_context()  # need to call this for config values to be saved by _tls_context_wrapper
    actual_options = {k: v for k, v in c._tls_context_wrapper.config.items() if k in expected_http_kwargs}
    assert expected_http_kwargs == actual_options
def get_check(instance):
    """Simple helper method to get a check instance from a config instance."""
    return ProxysqlCheck('proxysql', {}, [instance])