Adjust cynara wrapper to framework
[platform/core/test/security-tests.git] / src / cynara-tests / common / cynara_test_commons.cpp
index 38c17dd..4e06b4b 100644 (file)
@@ -15,7 +15,6 @@
  */
 
 #include <cynara_test_commons.h>
-#include <cynara_test_env.h>
 #include <cynara_test_file_operations.h>
 #include <cynara_test_cynara_mask.h>
 
@@ -39,30 +38,6 @@ const std::string SERVICE_PLUGINS_DIR("/usr/lib/cynara/plugin/service/");
 
 }
 
-void environmentWrap(const char *testName, const std::function<void(void)> &func)
-{
-    CynaraTestEnv env(testName);
-    env.save();
-    env.loadDefaultDatabase();
-
-    try {
-        func();
-    } catch (const DPL::Test::TestException &e) {
-        env.restore();
-        throw;
-    } catch (const DPL::Exception &e) {
-        env.restore();
-        throw;
-    } catch (const std::exception &e) {
-        env.restore();
-        throw;
-    } catch (...) {
-        env.restore();
-        throw std::runtime_error("Unknown exception");
-    }
-    env.restore();
-}
-
 void loadServicePlugins(const DirectoryPaths &pluginDirectories)
 {
     CynaraMask mask;