Skip to content

Commit

Permalink
add debug log for loki
Browse files Browse the repository at this point in the history
  • Loading branch information
yanksyoon committed Jul 3, 2024
1 parent a863ccb commit 8a2b693
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/integration/test_cos.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"""Integration tests for jenkins-k8s-operator with COS."""

import functools
import logging
import typing

import pytest
Expand All @@ -17,6 +18,8 @@
from .helpers import wait_for
from .types_ import UnitWebClient

logger = logging.getLogger(__name__)


@pytest.mark.abort_on_fail
async def test_prometheus_integration(
Expand Down Expand Up @@ -56,6 +59,7 @@ def log_files_exist(
"""
series = requests.get(f"http://{unit_address}:3100/loki/api/v1/series", timeout=10).json()
log_files = set(series_data["filename"] for series_data in series["data"])
logger.info("Loki log files: %s", log_files)
if not all(filename in log_files for filename in filenames):
return False
log_query = requests.get(
Expand Down

0 comments on commit 8a2b693

Please sign in to comment.