Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
(#569) Fix logging tests for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicOram committed Apr 25, 2023
1 parent 484fd0d commit 1f0fbb4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/artemis/unit_tests/test_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ def test_no_env_variable_sets_correct_file_handler(


@patch("artemis.log.Path.mkdir")
@patch.dict(os.environ, {"ARTEMIS_LOG_DIR": "/dls_sw/s03/logs/bluesky"})
@patch.dict(
os.environ, {"ARTEMIS_LOG_DIR": "./dls_sw/s03/logs/bluesky"}
) # Note we use a relative path here so it works in CI
def test_set_env_variable_sets_correct_file_handler(
mock_dir,
clear_loggers,
Expand All @@ -47,7 +49,7 @@ def test_set_env_variable_sets_correct_file_handler(
filter(lambda h: isinstance(h, FileHandler), dodal_logger.handlers)
)

assert file_handlers.baseFilename == "/dls_sw/s03/logs/bluesky/artemis.txt"
assert file_handlers.baseFilename.endswith("/dls_sw/s03/logs/bluesky/artemis.txt")


def test_messages_logged_from_dodal_and_artemis_contain_dcgid(
Expand Down

0 comments on commit 1f0fbb4

Please sign in to comment.