def test_config(test_case, extra_config, expected_http_kwargs): instance = extra_config check = FargateCheck('ecs_fargate', {}, instances=[instance]) with mock.patch('datadog_checks.base.utils.http.requests') as r: r.get.return_value = mock.MagicMock(status_code=200) check.check(instance) http_wargs = dict( auth=mock.ANY, cert=mock.ANY, headers=mock.ANY, proxies=mock.ANY, timeout=mock.ANY, verify=mock.ANY ) http_wargs.update(expected_http_kwargs) r.get.assert_called_with('http://169.254.170.2/v2/metadata', **http_wargs)
def check(): return FargateCheck('ecs_fargate', {}, {})
def check(): return FargateCheck('ecs_fargate', {}, [INSTANCE])