Commit 9942e3b4 authored by David Foucher's avatar David Foucher

Fix remove named by version log file for kibana

parent a7b24431
......@@ -223,9 +223,7 @@ async def test_simulate_triggers_log(client):
"beneficiaire.entreprise.idcc": 2706,
}
log_path = Path(os.environ["TREFLE_LOG_DIR"]) / "trefle-simulate-v{}.log".format(
os.environ.get("TREFLE_VERSION", VERSION)
)
log_path = Path(os.environ["TREFLE_LOG_DIR"]) / "trefle-simulate.log"
log_path.write_text("")
resp = await client.post("/financement", body=body)
assert resp.status == 200
......@@ -250,9 +248,7 @@ async def test_simulate_error_triggers_log(client):
"beneficiaire.entreprise.idcc": 2706,
}
log_path = Path(os.environ["TREFLE_LOG_DIR"]) / "trefle-simulate-v{}.log".format(
os.environ.get("TREFLE_VERSION", VERSION)
)
log_path = Path(os.environ["TREFLE_LOG_DIR"]) / "trefle-simulate.log"
log_path.write_text("")
resp = await client.post("/financement", body=body)
assert resp.status == 422
......
......@@ -17,7 +17,7 @@ request_logger.addHandler(
logging.handlers.TimedRotatingFileHandler(
os.path.join(
os.environ.get("TREFLE_LOG_DIR", "/tmp"),
"trefle-simulate-v{}.log".format(os.environ.get("TREFLE_VERSION", VERSION)),
"trefle-simulate.log",
),
when="W0",
backupCount=52,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment