Review fixes for 'Created metric class'
- Changed metric to_json to dumpConfiguration returning LabeledTuple
- LabeledTuple can be created and assigned directly to json
- LabeledTuple can be readed from json using json.get<LabeledTuple>
- Added PrintTo for LabeledMetricParams, LabeledSensorParams
- Added helper method expectMake to ReportFactoryMock
- sensorPaths are serialized to tuple<service, path> instead of single
field with service and path separated via ':'
- Changed configuration version from 1 to 2
Change-Id: I7c45fb584687172f88fd549a93329264793b0b8e
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
diff --git a/tests/src/helpers.hpp b/tests/src/helpers.hpp
new file mode 100644
index 0000000..3cc6951
--- /dev/null
+++ b/tests/src/helpers.hpp
@@ -0,0 +1,7 @@
+#pragma once
+
+#include "helpers/interfaces/json_storage_helpers.hpp"
+#include "helpers/interfaces/labeled_reading_parameter_helpers.hpp"
+#include "helpers/interfaces/labeled_sensor_parameter_helpers.hpp"
+#include "helpers/interfaces/sensor_id_helpers.hpp"
+#include "helpers/metric_value_helpers.hpp"
\ No newline at end of file
diff --git a/tests/src/printers/interfaces/json_storage.hpp b/tests/src/helpers/interfaces/json_storage_helpers.hpp
similarity index 100%
rename from tests/src/printers/interfaces/json_storage.hpp
rename to tests/src/helpers/interfaces/json_storage_helpers.hpp
diff --git a/tests/src/helpers/interfaces/labeled_reading_parameter_helpers.hpp b/tests/src/helpers/interfaces/labeled_reading_parameter_helpers.hpp
new file mode 100644
index 0000000..3666a62
--- /dev/null
+++ b/tests/src/helpers/interfaces/labeled_reading_parameter_helpers.hpp
@@ -0,0 +1,29 @@
+#pragma once
+
+#include "helpers/interfaces/labeled_sensor_parameter_helpers.hpp"
+#include "interfaces/types.hpp"
+
+#include <ostream>
+
+#include <gmock/gmock.h>
+
+namespace utils
+{
+
+inline void PrintTo(const LabeledMetricParameters& o, std::ostream* os)
+{
+ using testing::PrintToString;
+
+ (*os) << "{ ";
+ (*os) << utils::tstring::SensorPaths::str() << ": "
+ << PrintToString(o.at_label<utils::tstring::SensorPaths>()) << ", ";
+ (*os) << utils::tstring::OperationType::str() << ": "
+ << PrintToString(o.at_label<utils::tstring::OperationType>()) << ", ";
+ (*os) << utils::tstring::Id::str() << ": "
+ << PrintToString(o.at_label<utils::tstring::Id>()) << ", ";
+ (*os) << utils::tstring::MetricMetadata::str() << ": "
+ << PrintToString(o.at_label<utils::tstring::MetricMetadata>());
+ (*os) << " }";
+}
+
+} // namespace utils
\ No newline at end of file
diff --git a/tests/src/helpers/interfaces/labeled_sensor_parameter_helpers.hpp b/tests/src/helpers/interfaces/labeled_sensor_parameter_helpers.hpp
new file mode 100644
index 0000000..ef2eb6b
--- /dev/null
+++ b/tests/src/helpers/interfaces/labeled_sensor_parameter_helpers.hpp
@@ -0,0 +1,24 @@
+#pragma once
+
+#include "interfaces/types.hpp"
+
+#include <ostream>
+
+#include <gmock/gmock.h>
+
+namespace utils
+{
+
+inline void PrintTo(const LabeledSensorParameters& o, std::ostream* os)
+{
+ using testing::PrintToString;
+
+ (*os) << "{ ";
+ (*os) << utils::tstring::Service::str() << ": "
+ << PrintToString(o.at_label<utils::tstring::Service>()) << ", ";
+ (*os) << utils::tstring::Path::str() << ": "
+ << PrintToString(o.at_label<utils::tstring::Path>());
+ (*os) << " }";
+}
+
+} // namespace utils
\ No newline at end of file
diff --git a/tests/src/helpers/sensor_id_helpers.hpp b/tests/src/helpers/interfaces/sensor_id_helpers.hpp
similarity index 100%
rename from tests/src/helpers/sensor_id_helpers.hpp
rename to tests/src/helpers/interfaces/sensor_id_helpers.hpp
diff --git a/tests/src/mocks/metric_mock.hpp b/tests/src/mocks/metric_mock.hpp
index 21f7733..98bad87 100644
--- a/tests/src/mocks/metric_mock.hpp
+++ b/tests/src/mocks/metric_mock.hpp
@@ -18,5 +18,6 @@
MOCK_METHOD(void, initialize, (), (override));
MOCK_METHOD(const std::vector<MetricValue>&, getReadings, (),
(const, override));
- MOCK_METHOD(nlohmann::json, to_json, (), (const, override));
+ MOCK_METHOD(LabeledMetricParameters, dumpConfiguration, (),
+ (const, override));
};
diff --git a/tests/src/mocks/report_factory_mock.hpp b/tests/src/mocks/report_factory_mock.hpp
index fcb9b7e..0730d9e 100644
--- a/tests/src/mocks/report_factory_mock.hpp
+++ b/tests/src/mocks/report_factory_mock.hpp
@@ -2,6 +2,7 @@
#include "interfaces/report_factory.hpp"
#include "mocks/report_mock.hpp"
+#include "params/report_params.hpp"
#include <gmock/gmock.h>
@@ -12,20 +13,73 @@
{
using namespace testing;
- ON_CALL(*this, make)
+ ON_CALL(*this,
+ make(A<boost::asio::yield_context&>(), _, _, _, _, _, _, _, _))
.WillByDefault(WithArgs<1>(Invoke([](const std::string& name) {
return std::make_unique<NiceMock<ReportMock>>(name);
})));
+ ON_CALL(*this, make(A<const std::string&>(), _, _, _, _, _, _, _, _))
+ .WillByDefault(WithArgs<0>(Invoke([](const std::string& name) {
+ return std::make_unique<NiceMock<ReportMock>>(name);
+ })));
}
- MOCK_METHOD(
- std::unique_ptr<interfaces::Report>, make,
- (std::optional<std::reference_wrapper<boost::asio::yield_context>>,
- const std::string& name, const std::string& reportingType,
- bool emitsReadingsSignal, bool logToMetricReportsCollection,
- std::chrono::milliseconds period,
- const ReadingParameters& metricParams,
- interfaces::ReportManager& reportManager,
- interfaces::JsonStorage& reportStorage),
- (const, override));
+ MOCK_METHOD(std::unique_ptr<interfaces::Report>, make,
+ (boost::asio::yield_context&, const std::string&,
+ const std::string&, bool, bool, std::chrono::milliseconds,
+ const ReadingParameters&, interfaces::ReportManager&,
+ interfaces::JsonStorage&),
+ (const, override));
+ MOCK_METHOD(std::unique_ptr<interfaces::Report>, make,
+ (const std::string&, const std::string&, bool, bool,
+ std::chrono::milliseconds, const ReadingParameters&,
+ interfaces::ReportManager&, interfaces::JsonStorage&,
+ std::vector<LabeledMetricParameters>),
+ (const, override));
+
+ auto& expectMake(
+ const testing::Matcher<boost::asio::yield_context&>& yield,
+ std::optional<std::reference_wrapper<const ReportParams>> paramsRef,
+ const testing::Matcher<interfaces::ReportManager&>& rm,
+ const testing::Matcher<interfaces::JsonStorage&>& js)
+ {
+ if (paramsRef)
+ {
+ const ReportParams& params = *paramsRef;
+ return EXPECT_CALL(*this, make(yield, params.reportName(),
+ params.reportingType(),
+ params.emitReadingUpdate(),
+ params.logToMetricReportCollection(),
+ params.interval(),
+ params.readingParameters(), rm, js));
+ }
+ else
+ {
+ using testing::_;
+ return EXPECT_CALL(*this, make(yield, _, _, _, _, _, _, rm, js));
+ }
+ }
+
+ auto& expectMake(
+ std::optional<std::reference_wrapper<const ReportParams>> paramsRef,
+ const testing::Matcher<interfaces::ReportManager&>& rm,
+ const testing::Matcher<interfaces::JsonStorage&>& js,
+ const testing::Matcher<std::vector<LabeledMetricParameters>>& lrp)
+ {
+ if (paramsRef)
+ {
+ const ReportParams& params = *paramsRef;
+ return EXPECT_CALL(*this,
+ make(params.reportName(), params.reportingType(),
+ params.emitReadingUpdate(),
+ params.logToMetricReportCollection(),
+ params.interval(),
+ params.readingParameters(), rm, js, lrp));
+ }
+ else
+ {
+ using testing::_;
+ return EXPECT_CALL(*this, make(_, _, _, _, _, _, rm, js, lrp));
+ }
+ }
};
diff --git a/tests/src/mocks/report_mock.hpp b/tests/src/mocks/report_mock.hpp
index 4943421..2f6ffac 100644
--- a/tests/src/mocks/report_mock.hpp
+++ b/tests/src/mocks/report_mock.hpp
@@ -18,8 +18,6 @@
return "/" + reportName;
});
- EXPECT_CALL(*this, getPath).Times(AnyNumber());
- EXPECT_CALL(*this, getName).Times(AnyNumber());
EXPECT_CALL(*this, Die).Times(AnyNumber());
}
diff --git a/tests/src/params/report_params.hpp b/tests/src/params/report_params.hpp
index 0edbd95..fa1340c 100644
--- a/tests/src/params/report_params.hpp
+++ b/tests/src/params/report_params.hpp
@@ -92,4 +92,4 @@
"SINGLE",
"MetricId2",
"Metadata2"}};
-};
\ No newline at end of file
+};
diff --git a/tests/src/printers.hpp b/tests/src/printers.hpp
deleted file mode 100644
index e187f35..0000000
--- a/tests/src/printers.hpp
+++ /dev/null
@@ -1,3 +0,0 @@
-#pragma once
-
-#include "printers/interfaces/json_storage.hpp"
\ No newline at end of file
diff --git a/tests/src/test_detached_timer.cpp b/tests/src/test_detached_timer.cpp
index 9e1fc35..a9dd6c0 100644
--- a/tests/src/test_detached_timer.cpp
+++ b/tests/src/test_detached_timer.cpp
@@ -1,5 +1,5 @@
#include "dbus_environment.hpp"
-#include "printers.hpp"
+#include "helpers.hpp"
#include "utils/detached_timer.hpp"
#include <gmock/gmock.h>
diff --git a/tests/src/test_metric.cpp b/tests/src/test_metric.cpp
index ff3d120..a57e123 100644
--- a/tests/src/test_metric.cpp
+++ b/tests/src/test_metric.cpp
@@ -1,8 +1,7 @@
-#include "helpers/metric_value_helpers.hpp"
+#include "helpers.hpp"
#include "interfaces/sensor.hpp"
#include "metric.hpp"
#include "mocks/sensor_mock.hpp"
-#include "printers.hpp"
#include "utils/conv_container.hpp"
#include <gmock/gmock.h>
@@ -83,19 +82,29 @@
std::out_of_range);
}
-TEST_F(TestMetric, containsIdInJsonDump)
+TEST_F(TestMetric, containsIdInConfigurationDump)
{
- ASSERT_THAT(sut->to_json().at("id"), Eq(nlohmann::json("id")));
+ const auto conf = sut->dumpConfiguration();
+
+ EXPECT_THAT(conf.at_label<utils::tstring::Id>(), Eq("id"));
+ EXPECT_THAT(conf.to_json().at("id"), Eq(nlohmann::json("id")));
}
TEST_F(TestMetric, containsOpInJsonDump)
{
- ASSERT_THAT(sut->to_json().at("operationType"), Eq(nlohmann::json("op")));
+ const auto conf = sut->dumpConfiguration();
+
+ EXPECT_THAT(conf.at_label<utils::tstring::OperationType>(), Eq("op"));
+ EXPECT_THAT(conf.to_json().at("operationType"), Eq(nlohmann::json("op")));
}
TEST_F(TestMetric, containsMetadataInJsonDump)
{
- ASSERT_THAT(sut->to_json().at("metricMetadata"),
+ const auto conf = sut->dumpConfiguration();
+
+ EXPECT_THAT(conf.at_label<utils::tstring::MetricMetadata>(),
+ Eq("metadata"));
+ EXPECT_THAT(conf.to_json().at("metricMetadata"),
Eq(nlohmann::json("metadata")));
}
@@ -109,7 +118,15 @@
Return(SensorMock::makeId("service" + no, "path" + no)));
}
- ASSERT_THAT(sut->to_json().at("sensorPaths"),
- Eq(nlohmann::json(
- {"service0:path0", "service1:path1", "service2:path2"})));
+ const auto conf = sut->dumpConfiguration();
+
+ EXPECT_THAT(conf.at_label<utils::tstring::SensorPaths>(),
+ ElementsAre(LabeledSensorParameters("service0", "path0"),
+ LabeledSensorParameters("service1", "path1"),
+ LabeledSensorParameters("service2", "path2")));
+ EXPECT_THAT(
+ conf.to_json().at("sensorPaths"),
+ Eq(nlohmann::json({{{"service", "service0"}, {"path", "path0"}},
+ {{"service", "service1"}, {"path", "path1"}},
+ {{"service", "service2"}, {"path", "path2"}}})));
}
diff --git a/tests/src/test_persistent_json_storage.cpp b/tests/src/test_persistent_json_storage.cpp
index 26600c2..cf6abd1 100644
--- a/tests/src/test_persistent_json_storage.cpp
+++ b/tests/src/test_persistent_json_storage.cpp
@@ -1,5 +1,5 @@
+#include "helpers.hpp"
#include "persistent_json_storage.hpp"
-#include "printers.hpp"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
diff --git a/tests/src/test_report.cpp b/tests/src/test_report.cpp
index b13317d..8f2228e 100644
--- a/tests/src/test_report.cpp
+++ b/tests/src/test_report.cpp
@@ -1,9 +1,9 @@
#include "dbus_environment.hpp"
+#include "helpers.hpp"
#include "mocks/json_storage_mock.hpp"
#include "mocks/metric_mock.hpp"
#include "mocks/report_manager_mock.hpp"
#include "params/report_params.hpp"
-#include "printers.hpp"
#include "report.hpp"
#include "report_manager.hpp"
#include "utils/conv_container.hpp"
@@ -43,9 +43,18 @@
for (size_t i = 0; i < metricMocks.size(); ++i)
{
- ON_CALL(*metricMocks[i], to_json())
- .WillByDefault(
- Return(nlohmann::json("metric"s + std::to_string(i))));
+ using namespace std::string_literals;
+
+ auto id = std::to_string(i);
+
+ auto sensorParameters = std::vector<LabeledSensorParameters>(
+ {LabeledSensorParameters("service"s + id, "path"s + id)});
+ auto metricParameters =
+ LabeledMetricParameters(std::move(sensorParameters), "op"s + id,
+ "id"s + id, "metadata"s + id);
+
+ ON_CALL(*metricMocks[i], dumpConfiguration())
+ .WillByDefault(Return(std::move(metricParameters)));
}
}
@@ -232,19 +241,35 @@
INSTANTIATE_TEST_SUITE_P(
_, TestReportStore,
- Values(std::make_pair("Version"s, nlohmann::json(1)),
- std::make_pair("Name"s, nlohmann::json(ReportParams().reportName())),
- std::make_pair("ReportingType",
- nlohmann::json(ReportParams().reportingType())),
- std::make_pair("EmitsReadingsUpdate",
- nlohmann::json(ReportParams().emitReadingUpdate())),
- std::make_pair(
- "LogToMetricReportsCollection",
- nlohmann::json(ReportParams().logToMetricReportCollection())),
- std::make_pair("Interval",
- nlohmann::json(ReportParams().interval().count())),
- std::make_pair("ReadingParameters",
- nlohmann::json({"metric0", "metric1", "metric2"}))));
+ Values(
+ std::make_pair("Version"s, nlohmann::json(2)),
+ std::make_pair("Name"s, nlohmann::json(ReportParams().reportName())),
+ std::make_pair("ReportingType",
+ nlohmann::json(ReportParams().reportingType())),
+ std::make_pair("EmitsReadingsUpdate",
+ nlohmann::json(ReportParams().emitReadingUpdate())),
+ std::make_pair(
+ "LogToMetricReportsCollection",
+ nlohmann::json(ReportParams().logToMetricReportCollection())),
+ std::make_pair("Interval",
+ nlohmann::json(ReportParams().interval().count())),
+ std::make_pair(
+ "ReadingParameters",
+ nlohmann::json({{{"sensorPaths",
+ {{{"service", "service0"}, {"path", "path0"}}}},
+ {"operationType", "op0"},
+ {"id", "id0"},
+ {"metricMetadata", "metadata0"}},
+ {{"sensorPaths",
+ {{{"service", "service1"}, {"path", "path1"}}}},
+ {"operationType", "op1"},
+ {"id", "id1"},
+ {"metricMetadata", "metadata1"}},
+ {{"sensorPaths",
+ {{{"service", "service2"}, {"path", "path2"}}}},
+ {"operationType", "op2"},
+ {"id", "id2"},
+ {"metricMetadata", "metadata2"}}}))));
TEST_P(TestReportStore, settingPersistencyToTrueStoresReport)
{
diff --git a/tests/src/test_report_manager.cpp b/tests/src/test_report_manager.cpp
index 02bf3ec..c780556 100644
--- a/tests/src/test_report_manager.cpp
+++ b/tests/src/test_report_manager.cpp
@@ -1,8 +1,8 @@
#include "dbus_environment.hpp"
+#include "helpers.hpp"
#include "mocks/json_storage_mock.hpp"
#include "mocks/report_factory_mock.hpp"
#include "params/report_params.hpp"
-#include "printers.hpp"
#include "report.hpp"
#include "report_manager.hpp"
#include "utils/transform.hpp"
@@ -23,6 +23,10 @@
std::make_unique<NiceMock<StorageMock>>();
StorageMock& storageMock = *storageMockPtr;
+ std::unique_ptr<ReportMock> reportMockPtr =
+ std::make_unique<NiceMock<ReportMock>>(reportParams.reportName());
+ ReportMock& reportMock = *reportMockPtr;
+
std::unique_ptr<ReportManager> sut;
MockFunction<void(std::string)> checkPoint;
@@ -89,16 +93,7 @@
TEST_F(TestReportManager, addReport)
{
- auto reportMockPtr =
- std::make_unique<NiceMock<ReportMock>>(reportParams.reportName());
- auto& reportMock = *reportMockPtr;
-
- EXPECT_CALL(reportFactoryMock,
- make(_, reportParams.reportName(), reportParams.reportingType(),
- reportParams.emitReadingUpdate(),
- reportParams.logToMetricReportCollection(),
- reportParams.interval(), reportParams.readingParameters(),
- Ref(*sut), Ref(storageMock)))
+ reportFactoryMock.expectMake(_, reportParams, Ref(*sut), Ref(storageMock))
.WillOnce(Return(ByMove(std::move(reportMockPtr))));
auto [ec, path] = addReport(reportParams);
@@ -108,7 +103,8 @@
TEST_F(TestReportManager, DISABLED_failToAddReportTwice)
{
- EXPECT_CALL(reportFactoryMock, make(_, _, _, _, _, _, _, _, _));
+ reportFactoryMock.expectMake(_, reportParams, Ref(*sut), Ref(storageMock))
+ .WillOnce(Return(ByMove(std::move(reportMockPtr))));
addReport(reportParams);
@@ -119,7 +115,10 @@
TEST_F(TestReportManager, DISABLED_failToAddReportWithInvalidInterval)
{
- EXPECT_CALL(reportFactoryMock, make).Times(0);
+ reportFactoryMock.expectMake(_, std::nullopt, Ref(*sut), Ref(storageMock))
+ .Times(0);
+ reportFactoryMock.expectMake(std::nullopt, Ref(*sut), Ref(storageMock), _)
+ .Times(0);
reportParams.interval(reportParams.interval() - 1ms);
@@ -130,7 +129,7 @@
TEST_F(TestReportManager, DISABLED_failToAddReportWhenMaxReportIsReached)
{
- EXPECT_CALL(reportFactoryMock, make(_, _, _, _, _, _, _, _, _))
+ reportFactoryMock.expectMake(_, std::nullopt, Ref(*sut), Ref(storageMock))
.Times(ReportManager::maxReports);
for (size_t i = 0; i < ReportManager::maxReports; i++)
@@ -150,13 +149,10 @@
TEST_F(TestReportManager, removeReport)
{
- auto reportMockPtr =
- std::make_unique<NiceMock<ReportMock>>(reportParams.reportName());
- auto& reportMock = *reportMockPtr;
-
{
InSequence seq;
- EXPECT_CALL(reportFactoryMock, make(_, _, _, _, _, _, _, _, _))
+ reportFactoryMock
+ .expectMake(_, reportParams, Ref(*sut), Ref(storageMock))
.WillOnce(Return(ByMove(std::move(reportMockPtr))));
EXPECT_CALL(reportMock, Die());
EXPECT_CALL(checkPoint, Call("end"));
@@ -169,10 +165,6 @@
TEST_F(TestReportManager, removingReportThatIsNotInContainerHasNoEffect)
{
- auto reportMockPtr =
- std::make_unique<NiceMock<ReportMock>>(reportParams.reportName());
- auto& reportMock = *reportMockPtr;
-
{
InSequence seq;
EXPECT_CALL(checkPoint, Call("end"));
@@ -185,14 +177,10 @@
TEST_F(TestReportManager, removingSameReportTwiceHasNoSideEffect)
{
- auto reportMockPtr =
- std::make_unique<NiceMock<ReportMock>>(reportParams.reportName());
- auto& reportMock = *reportMockPtr;
-
{
InSequence seq;
- EXPECT_CALL(reportFactoryMock,
- make(_, reportParams.reportName(), _, _, _, _, _, _, _))
+ reportFactoryMock
+ .expectMake(_, reportParams, Ref(*sut), Ref(storageMock))
.WillOnce(Return(ByMove(std::move(reportMockPtr))));
EXPECT_CALL(reportMock, Die());
EXPECT_CALL(checkPoint, Call("end"));
@@ -225,6 +213,20 @@
DbusEnvironment::getObjServer());
}
+ static std::vector<LabeledMetricParameters>
+ convertToLabeled(const ReadingParameters& params)
+ {
+ return utils::transform(params, [](const auto& item) {
+ return LabeledMetricParameters(
+ utils::transform(std::get<0>(item),
+ [](const auto& elem) {
+ return LabeledSensorParameters("service",
+ elem);
+ }),
+ std::get<1>(item), std::get<2>(item), std::get<3>(item));
+ });
+ }
+
nlohmann::json data = nlohmann::json{
{"Version", Report::reportVersion},
{"Name", reportParams.reportName()},
@@ -234,20 +236,14 @@
reportParams.logToMetricReportCollection()},
{"Interval", reportParams.interval().count()},
{"ReadingParameters",
- utils::transform(reportParams.readingParameters(),
- [](const auto& item) {
- return LabeledReadingParameter::to_json(item);
- })}};
+ convertToLabeled(reportParams.readingParameters())}};
};
TEST_F(TestReportManagerStorage, reportManagerCtorAddReportFromStorage)
{
- EXPECT_CALL(reportFactoryMock,
- make(_, reportParams.reportName(), reportParams.reportingType(),
- reportParams.emitReadingUpdate(),
- reportParams.logToMetricReportCollection(),
- reportParams.interval(), reportParams.readingParameters(),
- _, Ref(storageMock)));
+ reportFactoryMock.expectMake(
+ reportParams, _, Ref(storageMock),
+ ElementsAreArray(convertToLabeled(reportParams.readingParameters())));
makeReportManager();
}
diff --git a/tests/src/test_sensor.cpp b/tests/src/test_sensor.cpp
index 5339047..820602c 100644
--- a/tests/src/test_sensor.cpp
+++ b/tests/src/test_sensor.cpp
@@ -1,7 +1,6 @@
#include "dbus_environment.hpp"
-#include "helpers/sensor_id_helpers.hpp"
+#include "helpers.hpp"
#include "mocks/sensor_listener_mock.hpp"
-#include "printers.hpp"
#include "sensor.hpp"
#include "sensor_cache.hpp"
#include "stubs/dbus_sensor_object.hpp"
diff --git a/tests/src/test_sensor_cache.cpp b/tests/src/test_sensor_cache.cpp
index 0db3bc2..b59a062 100644
--- a/tests/src/test_sensor_cache.cpp
+++ b/tests/src/test_sensor_cache.cpp
@@ -1,6 +1,5 @@
-#include "helpers/sensor_id_helpers.hpp"
+#include "helpers.hpp"
#include "mocks/sensor_mock.hpp"
-#include "printers.hpp"
#include "sensor_cache.hpp"
#include <initializer_list>
diff --git a/tests/src/test_transform.cpp b/tests/src/test_transform.cpp
index c97cf5f..66fa855 100644
--- a/tests/src/test_transform.cpp
+++ b/tests/src/test_transform.cpp
@@ -1,3 +1,4 @@
+#include "helpers.hpp"
#include "utils/transform.hpp"
#include <set>
diff --git a/tests/src/test_unique_call.cpp b/tests/src/test_unique_call.cpp
index 43585a1..f6fb594 100644
--- a/tests/src/test_unique_call.cpp
+++ b/tests/src/test_unique_call.cpp
@@ -1,4 +1,4 @@
-#include "printers.hpp"
+#include "helpers.hpp"
#include "utils/unique_call.hpp"
#include <gmock/gmock.h>