Skip to content

Commit

Permalink
feat: add fixture to modify macos timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
juliamagan committed Apr 4, 2024
1 parent d784d5f commit 1623db4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/end_to_end/test_vulnerability_detector/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,3 +399,14 @@ def pytest_html_results_summary(prefix, summary, postfix):
def pytest_configure(config):
if not config.option.css:
config.option.css = [STYLE_PATH]


@pytest.fixture(scope="session", autouse=True)
def modify_timezone(request):
inventory_path = request.config.getoption('--inventory-path')
host_manager = HostManager(inventory_path)
hosts = host_manager.get_group_hosts('agent')

for host in hosts:
if host_manager.get_host_variables(host)['os'] and 'macos' in host_manager.get_host_variables(host)['os']:
host_manager.run_command(host, 'systemsetup -settimezone GMT')

0 comments on commit 1623db4

Please sign in to comment.