From 30a48243deb5169c1648d3c5f729c38d629c8e60 Mon Sep 17 00:00:00 2001 From: Venktesh Shivam Patel Date: Fri, 3 May 2024 15:05:56 +0100 Subject: [PATCH] enable logging in tests (#5499) --- .github/actions/smoke-tests/action.yaml | 4 +++- tests/conftest.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/actions/smoke-tests/action.yaml b/.github/actions/smoke-tests/action.yaml index a85aba1415..bf6c4b80a0 100644 --- a/.github/actions/smoke-tests/action.yaml +++ b/.github/actions/smoke-tests/action.yaml @@ -73,6 +73,8 @@ runs: --durations=10 \ --show-ic-logs=yes \ --ad-secret=${{ inputs.azure-ad-secret }} \ - -m ${{ inputs.marker != '' && inputs.marker || '""' }} + -m ${{ inputs.marker != '' && inputs.marker || '""' }} \ + -v \ + -s working-directory: ./tests shell: bash diff --git a/tests/conftest.py b/tests/conftest.py index 403a39806b..34ef7852de 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -190,7 +190,7 @@ def pytest_runtest_makereport(item) -> None: rep = outcome.get_result() # we only look at actual failing test calls, not setup/teardown - if rep.when == "call" and rep.failed and item.config.getoption("--show-ic-logs") == "yes": + if rep.when == "call" and item.config.getoption("--show-ic-logs") == "yes": pod_namespace = item.funcargs["ingress_controller_prerequisites"].namespace pod_name = get_first_pod_name(item.funcargs["kube_apis"].v1, pod_namespace) print("\n===================== IC Logs Start =====================")