Beispiel #1
0
 def test_check_health_status_2(self):
     airbyte_base_url = f"http://localhost:8000/api/v1"
     responses.add(responses.GET,
                   airbyte_base_url + "/health/",
                   json={"db": False},
                   status=200)
     session = requests.Session()
     task = AirbyteConnectionTask(
         connection_id="749c19dc-4f97-4f30-bb0f-126e53506960")
     with pytest.raises(AirbyteServerNotHealthyException):
         task._check_health_status(session, airbyte_base_url)
Beispiel #2
0
 def test_check_health_status(self):
     airbyte_base_url = f"http://localhost:8000/api/v1"
     responses.add(responses.GET,
                   airbyte_base_url + "/health/",
                   json={"db": True},
                   status=200)
     session = requests.Session()
     task = AirbyteConnectionTask(
         connection_id="749c19dc-4f97-4f30-bb0f-126e53506960")
     response = task._check_health_status(session, airbyte_base_url)
     assert response