From fcef7e42a545d1b9c49fde297cb9e941b6fa4e14 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 29 Sep 2022 13:23:55 +0200 Subject: [PATCH] some unittest fixes --- unittest/controller/testConfigFileHandler.cpp | 2 +- unittest/controller/testThermalController.cpp | 2 +- unittest/main.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/unittest/controller/testConfigFileHandler.cpp b/unittest/controller/testConfigFileHandler.cpp index 5445a558..b8147e29 100644 --- a/unittest/controller/testConfigFileHandler.cpp +++ b/unittest/controller/testConfigFileHandler.cpp @@ -12,7 +12,6 @@ TEST_CASE("Configfile Handler", "[ConfigHandler]") { sif::debug << "Testcase config file handler" << std::endl; - testEnvironment::initialize(); // Init handler GlobalConfigHandler confighandler = GlobalConfigHandler(objects::GLOBAL_JSON_CFG, "JSON.config"); REQUIRE(confighandler.initialize() == returnvalue::OK); @@ -62,4 +61,5 @@ TEST_CASE("Configfile Handler", "[ConfigHandler]") { REQUIRE(confighandler.getConfigFileValue(PARAM2, doubleData) != returnvalue::OK); // NVMParameterBase::KEY_NOT_EXISTS is private, why? REQUIRE(confighandler.setConfigFileValue(PARAM2, doubleData) != returnvalue::OK); + std::filesystem::remove("JSON.config"); } diff --git a/unittest/controller/testThermalController.cpp b/unittest/controller/testThermalController.cpp index a65ec69b..908ef1bb 100644 --- a/unittest/controller/testThermalController.cpp +++ b/unittest/controller/testThermalController.cpp @@ -15,7 +15,7 @@ TEST_CASE("Thermal Controller", "[ThermalController]") { new TemperatureSensorsDummy(); new SusDummy(); - testEnvironment::initialize(); + //testEnvironment::initialize(); ThermalController controller(THERMAL_CONTROLLER_ID, objects::NO_OBJECT); ReturnValue_t result = controller.initialize(); diff --git a/unittest/main.cpp b/unittest/main.cpp index 6438577c..760ff156 100644 --- a/unittest/main.cpp +++ b/unittest/main.cpp @@ -4,7 +4,7 @@ int main(int argc, char* argv[]) { testEnvironment::setup(); - + testEnvironment::initialize(); // Catch internal function call int result = Catch::Session().run(argc, argv);