Skip to content

Commit

Permalink
fix(test): Skip hostname redaction in containers
Browse files Browse the repository at this point in the history
* Card ID: CCT-934

Containers are not in control of their own hostnames, they are usually
set from the host system. Because this test runs 'hostnamectl
set-hostname', it has to be skipped when we're not running on a bare
metal/VM system.
  • Loading branch information
m-horky authored and ptoscano committed Nov 8, 2024
1 parent 964031f commit 6420dd6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions integration-tests/test_redaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ def test_redaction_on_file(insights_client, tmp_path, removed_file):
os.remove(FILE_REDACTION_FILE)


@pytest.mark.skipif(
"container" in os.environ.keys(),
reason="Containers cannot change hostnames",
)
def test_redaction_on_pattern_hostname(insights_client, tmp_path):
"""
:id: 641edf11-ace1-4a98-9fb4-198cf9e5e4d0
Expand Down

0 comments on commit 6420dd6

Please sign in to comment.