From 0471fe1728c46c8fd779d7ee1b3c2e375b8884f5 Mon Sep 17 00:00:00 2001 From: Patrick Schlangen Date: Sat, 3 Aug 2024 15:13:16 +0200 Subject: [PATCH] chronos: Support cron variables in test runs --- chronos/NodeService.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chronos/NodeService.cpp b/chronos/NodeService.cpp index 0a6d4fc9..d3a0e221 100644 --- a/chronos/NodeService.cpp +++ b/chronos/NodeService.cpp @@ -735,7 +735,7 @@ class ChronosNodeHandler : virtual public ChronosNodeIf } std::unique_ptr req(Chronos::HTTPRequest::fromURL( - job.data.url, + Chronos::Utils::replaceVariables(job.data.url), job.identifier.userId, maxSize, requestTimeout @@ -764,10 +764,10 @@ class ChronosNodeHandler : virtual public ChronosNodeIf { for(const auto &item : job.extendedData.headers) { - req->requestHeaders.push_back({ item.first, item.second }); + req->requestHeaders.push_back({ item.first, Chronos::Utils::replaceVariables(item.second) }); } - req->requestBody = job.extendedData.body; + req->requestBody = Chronos::Utils::replaceVariables(job.extendedData.body); } //! @todo X-Forwarded-For, User-Agent for test run