diff --git a/tests/test_telemetry.py b/tests/test_telemetry.py index f4c9606b5..d074a9bff 100644 --- a/tests/test_telemetry.py +++ b/tests/test_telemetry.py @@ -55,16 +55,16 @@ def test_emit_usage_metrics_fails(mock_httpx_get, caplog): "event_type": "dag_run", "status": "success", "dag_hash": "d151d1fa2f03270ea116cc7494f2c591", - "task_count": 3, + "cosmos_task_count": 3, } is_success = telemetry.emit_usage_metrics(sample_metrics) mock_httpx_get.assert_called_once_with( - f"""https://astronomer.gateway.scarf.sh/astronomer-cosmos/v2/1.8.0a4/2.10.1/3.11/darwin/amd64/dag_run/success/d151d1fa2f03270ea116cc7494f2c591/3""", + f"""https://astronomer.gateway.scarf.sh/astronomer-cosmos/v1/1.8.0a4/2.10.1/3.11/darwin/amd64/dag_run/success/d151d1fa2f03270ea116cc7494f2c591/3""", timeout=5.0, follow_redirects=True, ) assert not is_success - log_msg = f"""Unable to emit usage metrics to https://astronomer.gateway.scarf.sh/astronomer-cosmos/v2/1.8.0a4/2.10.1/3.11/darwin/amd64/dag_run/success/d151d1fa2f03270ea116cc7494f2c591/3. Status code: 404. Message: Non existent URL""" + log_msg = f"""Unable to emit usage metrics to https://astronomer.gateway.scarf.sh/astronomer-cosmos/v1/1.8.0a4/2.10.1/3.11/darwin/amd64/dag_run/success/d151d1fa2f03270ea116cc7494f2c591/3. Status code: 404. Message: Non existent URL""" assert caplog.text.startswith("WARNING") assert log_msg in caplog.text