def test_check(self):

        self.run_check(CONFIG)
        # Overrides self.service_checks attribute when values are available\
        self.service_checks = self.wait_for_async('get_service_checks', 'service_checks', 5)

        # HTTP connection error
        tags = ['url:https://thereisnosuchlink.com', 'instance:conn_error']

        self.assertServiceCheckCritical("http.can_connect", tags=tags)

        # Wrong HTTP response status code
        tags = ['url:http://httpbin.org/404', 'instance:http_error_status_code']
        self.assertServiceCheckCritical("http.can_connect", tags=tags)

        self.assertServiceCheckOK("http.can_connect", tags=tags, count=0)

        # HTTP response status code match
        tags = ['url:http://httpbin.org/404', 'instance:status_code_match', 'foo:bar']
        self.assertServiceCheckOK("http.can_connect", tags=tags)

        # Content match & mismatching
        tags = ['url:https://github.com', 'instance:cnt_mismatch']
        self.assertServiceCheckCritical("http.can_connect", tags=tags)
        self.assertServiceCheckOK("http.can_connect", tags=tags, count=0)
        tags = ['url:https://github.com', 'instance:cnt_match']
        self.assertServiceCheckOK("http.can_connect", tags=tags)

        self.coverage_report()
Check coverage.
dataset/ETHPy150Open serverdensity/sd-agent/tests/checks/integration/test_http_check.py/HTTPCheckTest.test_check