Skip to content

Commit

Permalink
refac: Truncate logs in the setup of truncate_log_files fixture #2460
Browse files Browse the repository at this point in the history
  • Loading branch information
jmv74211 committed Feb 8, 2022
1 parent 93336ee commit 72e2a53
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -883,14 +883,17 @@ def set_wazuh_configuration(configuration):

@pytest.fixture(scope='function')
def truncate_log_files():
"""Truncate all the log files after the test execution"""
yield

"""Truncate all the log files before and after the test execution"""
log_files = [LOG_FILE_PATH]

for log_file in log_files:
truncate_file(log_file)

yield

for log_file in log_files:
truncate_file(log_file)


def set_system(system):
"""Update the agent system in the global DB.
Expand Down

0 comments on commit 72e2a53

Please sign in to comment.