Skip to content

Commit

Permalink
enable logging in tests (#5499)
Browse files Browse the repository at this point in the history
vepatel authored May 3, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent a1c16c6 commit 30a4824
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/actions/smoke-tests/action.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
@@ -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 =====================")

0 comments on commit 30a4824

Please sign in to comment.